mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
bump base: crengine, freetype, libjpeg-turbo (#3928)
Includes: - [build] FreeType: bump to 2.9.1 - [build] bump libjpeg-turbo to 1.5.3 - bump crengine: - Fix CSS selector specificity computation - [fix] crengine/src/lvfntman.cpp: improve letter_spacing limit - [fix] crengine/src/lvxml.cpp: add all empty HTML elements - html head styles: fix styles not being applied - Hyphenation: increase MAX_PATTERN_SIZE from 16 to 35 - html documents: proper handling of <BR> tags - Allows requesting old (broken) XML/DOM building code - cre.cpp: setStyleSheet(): accept filepath and/or css text, and added getIntProperty() and getStringProperty() credocument/readerrolling: request older XML/DOM building code for books previously opened, to not lose bookmarks and highlights (unit tests update because of new handling of consecutive BR via css pushed links down in the book)
This commit is contained in:
@@ -108,6 +108,28 @@ function ReaderRolling:init()
|
||||
end
|
||||
|
||||
function ReaderRolling:onReadSettings(config)
|
||||
-- 20180503: some fix in crengine has changed the way the DOM is built
|
||||
-- for HTML documents and may make XPATHs obtained from previous version
|
||||
-- invalid.
|
||||
-- We may request the previous (buggy) behaviour though, which we do
|
||||
-- if we use a DocSetting previously made that may contain bookmarks
|
||||
-- and highlights with old XPATHs.
|
||||
-- (EPUB will use the same correct DOM code no matter what DOM version
|
||||
-- we request here.)
|
||||
if not config:readSetting("cre_dom_version") then
|
||||
-- Not previously set, guess which DOM version to use
|
||||
if config:readSetting("last_xpointer") then
|
||||
-- We have a last_xpointer: this book was previously opened
|
||||
-- with possibly a very old version: request the oldest
|
||||
config:saveSetting("cre_dom_version", self.ui.document:getOldestDomVersion())
|
||||
else
|
||||
-- No previous xpointer: book never opened (or sidecar file
|
||||
-- purged): we can use the latest DOM version
|
||||
config:saveSetting("cre_dom_version", self.ui.document:getLatestDomVersion())
|
||||
end
|
||||
end
|
||||
self.ui.document:requestDomVersion(config:readSetting("cre_dom_version"))
|
||||
|
||||
local last_xp = config:readSetting("last_xpointer")
|
||||
local last_per = config:readSetting("last_percent")
|
||||
if last_xp then
|
||||
|
||||
Reference in New Issue
Block a user