bump crengine, show progress meter on load/re-rendering (#5406)

Includes:
- Adds tinyNodeCollection::getStatistics()
- epubfmt.cpp: cleanup indentation and small optimisation
- Add more progress callback events
- Optimisation: avoid re-init for EPUBs with embedded fonts
- Fix: don't draw border when border-color: transparent
- CSS: ignore 'inherit' inside font-family

Show a small progress meter at top left of screen when
crengine is loading, re-rendering, and saving cache file
(after a 2 second delay to not be bothered on small books).

Also add a wrapper for the last remaining bit of code that
was accessing _document directly (:getPageOffsetX()).
This commit is contained in:
poire-z
2019-09-21 18:59:05 +02:00
committed by GitHub
parent e2c771dd2d
commit 5bc6bf046c
3 changed files with 122 additions and 4 deletions

View File

@@ -435,6 +435,10 @@ function CreDocument:getPageFromXPointer(xp)
return self._document:getPageFromXPointer(xp)
end
function CreDocument:getPageOffsetX(page)
return self._document:getPageOffsetX(page)
end
function CreDocument:getScreenPositionFromXPointer(xp)
-- We do not ensure xp is in the current page: we may return
-- a negative screen_y, which could be useful in some contexts
@@ -806,6 +810,10 @@ function CreDocument:enableInternalHistory(toggle)
self._document:setIntProperty("crengine.highlight.bookmarks", toggle and 2 or 0)
end
function CreDocument:setCallback(func)
return self._document:setCallback(func)
end
function CreDocument:isBuiltDomStale()
return self._document:isBuiltDomStale()
end
@@ -822,6 +830,10 @@ function CreDocument:getCacheFilePath()
return self._document:getCacheFilePath()
end
function CreDocument:getStatistics()
return self._document:getStatistics()
end
function CreDocument:canHaveAlternativeToc()
return true
end