mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
bump crengine: fix max image height, handle <epub:switch> (#4390)
Includes: - (Upstream) Fix dangerous compile warnings - Fix max image height to prevent spurious page breaks - Hide <epub:case> in <epub:switch>, show only <epub:default> Adds a style tweak to show <epub:case> and hide <epub:default> for the curious person.
This commit is contained in:
2
base
2
base
Submodule base updated: 03267b1e19...66aa4585de
@@ -257,10 +257,23 @@ width: 100% !important;
|
||||
css = [[img { vertical-align: middle; }]],
|
||||
},
|
||||
},
|
||||
-- No current need for Miscellaneous
|
||||
-- {
|
||||
-- title = _("Miscellaneous"),
|
||||
-- },
|
||||
{
|
||||
title = _("Miscellaneous"),
|
||||
{
|
||||
id = "epub_switch_show_case";
|
||||
title = _("Toggle alternative EPUB content"),
|
||||
description = _([[
|
||||
The EPUB3 format allows a
|
||||
<epub:switch> <epub:case> <epub:default>
|
||||
construct to provide alternative content to engines that support optional features.
|
||||
KOReader currently falls back to hiding all <epub:case> content and shows the <epub:default> content (usually an image).
|
||||
This tweak toggles this behavior, and may show the <epub:case> content as plain text.]]),
|
||||
css = [[
|
||||
switch > case { display: inline; }
|
||||
switch > default { display: none; }
|
||||
]],
|
||||
},
|
||||
},
|
||||
-- No current need for workarounds
|
||||
-- {
|
||||
-- title = _("Workarounds"),
|
||||
|
||||
@@ -146,7 +146,7 @@ describe("Readerfooter module", function()
|
||||
local timeinfo = footer.textGeneratorMap.time()
|
||||
local page_count = readerui.document:getPageCount()
|
||||
-- stats has not been initialized here, so we get na TB and TC
|
||||
assert.are.same('1 / '..page_count..' | '..timeinfo..' | => 1 | B:0% | R:0% | TB: na | TC: na',
|
||||
assert.are.same('1 / '..page_count..' | '..timeinfo..' | => 0 | B:0% | R:0% | TB: na | TC: na',
|
||||
footer.footer_text.text)
|
||||
end)
|
||||
|
||||
|
||||
@@ -186,13 +186,13 @@ describe("Readerrolling module", function()
|
||||
it("should show pages for different word gap", function()
|
||||
readerui.document:setSpaceCondensing(100)
|
||||
readerui:handleEvent(Event:new("ChangeScreenMode", "portrait"))
|
||||
assert.are.same(267, readerui.document:getPageCount())
|
||||
assert.are.same(266, readerui.document:getPageCount())
|
||||
readerui.document:setSpaceCondensing(75)
|
||||
readerui:handleEvent(Event:new("ChangeScreenMode", "portrait"))
|
||||
assert.are.same(262, readerui.document:getPageCount())
|
||||
assert.are.same(261, readerui.document:getPageCount())
|
||||
readerui.document:setSpaceCondensing(50)
|
||||
readerui:handleEvent(Event:new("ChangeScreenMode", "portrait"))
|
||||
assert.are.same(248, readerui.document:getPageCount())
|
||||
assert.are.same(247, readerui.document:getPageCount())
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ describe("Readersearch module", function()
|
||||
it("should find the last occurrence", function()
|
||||
-- local logger = require("logger")
|
||||
-- logger.info("nb of pages", doc:getPageCount())
|
||||
-- 20181206: currently 267 pages
|
||||
-- 20181208: currently 266 pages
|
||||
for i = 100, 180, 10 do
|
||||
rolling:onGotoPage(i)
|
||||
local words = search:searchFromEnd("Verona")
|
||||
|
||||
Reference in New Issue
Block a user