mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Adds "Better rendering of list items" to Style tweaks (#3968)
Alternate rendering of list items as block elements (instead of inline/final). Check the built DOM is still coherent with styles on stylesheet change, and propose to reload the document if not. Also invalidate cache on close in that case so a new DOM is built at next opening. ReaderStyleTweak: fix tweak css duplication; when globally enabled, when disabling and re-enabling locally, the css would be added twice to the final CSS. Also adds !important to "sub_sup_smaller" tweak, and increase its priority so it can override "font_size_all_inherit". Adds CreDocument:getCacheFilePath() for futur features.
This commit is contained in:
@@ -589,6 +589,22 @@ function CreDocument:enableInternalHistory(toggle)
|
||||
self._document:setIntProperty("crengine.highlight.bookmarks", toggle and 2 or 0)
|
||||
end
|
||||
|
||||
function CreDocument:isBuiltDomStale()
|
||||
return self._document:isBuiltDomStale()
|
||||
end
|
||||
|
||||
function CreDocument:hasCacheFile()
|
||||
return self._document:hasCacheFile()
|
||||
end
|
||||
|
||||
function CreDocument:invalidateCacheFile()
|
||||
self._document:invalidateCacheFile()
|
||||
end
|
||||
|
||||
function CreDocument:getCacheFilePath()
|
||||
return self._document:getCacheFilePath()
|
||||
end
|
||||
|
||||
function CreDocument:register(registry)
|
||||
registry:addProvider("azw", "application/vnd.amazon.mobi8-ebook", self, 90)
|
||||
registry:addProvider("chm", "application/vnd.ms-htmlhelp", self, 90)
|
||||
|
||||
Reference in New Issue
Block a user