bump crengine: CSS enhancements and other fixes, improve text selection#2270
Merged
Conversation
Includes: - Add support for CSS width: fit-content - fb2def.h: add a few common attributes - lvtext: includes src->t.offset in word->t.start - CSS: support for pseudo element ::first-letter - ::first-letter: fix when single letter text node - ldomXPointer::getRectEx(): return optional context - ldomXRange::getSegmentRects(): fix when BiDi/RTL - testAuthorDotTitleFormat: fix off-by-one error - Epub ncx TOC: don't skip items with invalid href - Avoid some compiler warnings - ldomDocument::createXPointer(pt): better consistency - CSS: add support for "ruby-position: over/under/alternate" - MathML: don't handle anything when no def style set
Currently not used, but was requested for some user-patch. Might be useful some day for frontend to trigger a re-rendering, bypassing crengine own hashes checks.
Update logic to account for crengine's change "ldomDocument::createXPointer(pt): better consistency" after which we no longer get different xpointers whether in the left or right half of a glyph. This make single char selection easier and consistent. Also make selection when pointing in the margins more natural, avoiding grabbing any content on prev/next lines when panning in the opposite direction. (the diff shows not-real changes because of switch from annoying tabs to spaces.)
Frenzie
approved these changes
Feb 14, 2026
Frenzie
left a comment
Member
There was a problem hiding this comment.
Bump together with those other PRs?
Contributor
Author
|
Yes, go ahead, merge them first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bump crengine: CSS enhancements and other fixes
Includes:
fit-contentsrc->t.offsetinword->t.start::first-letter::first-letter: fix when single letter text nodeldomXPointer::getRectEx(): return optional contextldomXRange::getSegmentRects(): fix when BiDi/RTLtestAuthorDotTitleFormat: fix off-by-one error for last character in bookTitleldomDocument::createXPointer(pt): better consistencyruby-position: over/under/alternatecre.cpp: add requestRender()
Currently not used, but was requested for some user-patch koreader/koreader#13462.
Might be useful some day for frontend to trigger a re-rendering, bypassing crengine own hashes checks.
cre.cpp: getTextFromPositions(): improvements
Update logic to account for crengine's change "
ldomDocument::createXPointer(pt): better consistency" after which we no longer get different xpointers whether in the left or right half of a glyph.This make single char selection easier and consistent.
Also make selection when pointing in the margins more natural, avoiding grabbing any content on prev/next lines when panning in the opposite direction.
(the diff shows not-real changes because of switch from annoying tabs to spaces.)
Painfully achieved over the last 18 months and the many edge cases noticed in koreader/koreader#12135. It's not perfect, the changes are not always accurately explainable, but after many ideas, these ones seem to get me something I'm satisfied with, while staying quite simple.
Should allow closing koreader/koreader#12135.
This change is