Closed poire-z closed 1 year ago
nit: Stray indent ;).
That's my style (also in frontend) when a comment applies to the line before, when it's more a small note, and don't deserve to be (correctly non-indented) above the lines it comment :/
Don't we already set CRLog to output to stderr?
No, we don't log any CRLog by default. I use printf() when it's some valuable info we need to see in our crash.log (very few, ie. CRE WARNING: rerendering cause peculiar CSS
, CRE: cache marked as dirty, reloading document
). I figured these 2 ones can help with the cache issues I had, and that we may meet again.
CSS: optimize
:nth-child/of-type()
and:nth-last-child/of-type()
This could be painfully slow if used to highlight any other paragraph in a document made of thousands of such paragraphs (ie. to highlight character names in a dumb theater play EPUB where all character names and speeches are in a same kind of
<P>
).Page splitting: fix oversight in flags handling
Could cause some flags to leak to next elements, and unexpected page splitting and collapsing margin issues. Should allow closing https://github.com/koreader/koreader/issues/10073. See https://github.com/koreader/koreader/issues/10073#issuecomment-1416036120.
Update
_doc_rendering_hash
also when loading from cachegetDocumentRenderingHash(extended)
: add parameterAllows getting the real
doc_rendering_hash
, useextended=true
to get this hash augmented with some view-related state.Toggable support for partial rerenderings of individual DocFragments
Only available with EPUBs containing 2 or more fragments, and a file size large enough to ensure a cache file is used. The idea is simply, on any rendering setting change, to skip the rerendering of the full book and to defer any rerendering to the moment we draw a DocFragment, and render only it. Not much care has been made to keep crengine fully coherent, but enough for it to draw and allow turning pages. So, it is expected that we can soon provoke a full rerendering (in the main process when the user decides it when done tweaking settings, or in the background, building a cache that we can quickly reload from) to get back in a sane state. This would have to be ensured by the frontend. Fortunately, the changes could be made quite localized, and shouldn't have any impact on the current behaviour when partial rendering is not enabled.
Discussed and details all along https://github.com/koreader/koreader/issues/9087#issuecomment-1407432928. Should allow closing https://github.com/koreader/koreader/issues/9087. Will use the new icons proposed in https://github.com/koreader/koreader/pull/10086 (see screenshots there for the upcoming KOReader behaviour).
This change is