-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various fixes related to text-indent, CSS order. Adds -cr-hint: strut-confined #326
Commits on Jan 22, 2020
-
ldomXRange/ldomMarkedRange: update enhanced drawing flag
Follow-up to a76d14e: update enhanced drawing flag from 2 to 0x11, as 0, 1, 2 and 3 might be used for categorising crengine internal bookmarks. This might avoid breaking upstream/other client code, which could then just add 'flags &= 0x10' somewhere to benefit from enhanced drawing.
Configuration menu - View commit details
-
Copy full SHA for 1bbc4d9 - Browse repository at this point
Copy the full SHA 1bbc4d9View commit details -
Hardcoded elements list: add <script>
So it gets a fixed id and we get more cache stability.
Configuration menu - View commit details
-
Copy full SHA for 0604510 - Browse repository at this point
Copy the full SHA 0604510View commit details -
CSS: ensure selectors are applied in the order met
By storing an order sequence number in the _specificity field, which will ensure selectors with the same specificity are checked and applied in the order we parsed them.
Configuration menu - View commit details
-
Copy full SHA for deded0e - Browse repository at this point
Copy the full SHA deded0eView commit details -
elementFromPoint(): fix some floats not being visited
Embedded floats overflowing their containing paragraph, and not directly children of that final node (so, wrapped by more inlines nodes), would not be visited by elementFromPoint() and text or image inside them would not be found.
Configuration menu - View commit details
-
Copy full SHA for 640b69c - Browse repository at this point
Copy the full SHA 640b69cView commit details -
Fix getPageDocumentRange() on bidi text
Made the 'direction' argument to elementFromPoint() and createXPointer() more explicite, and allow finding the first or last word on a line in logical-order. This allows not missing text and links in pages where the first or last line is RTL or bidi.
Configuration menu - View commit details
-
Copy full SHA for cb65b3c - Browse repository at this point
Copy the full SHA cb65b3cView commit details -
Text: fix: allow wrap on space around images
Previously, images were incorrectly skipped in the avoidWrap checks. So, a sequence of word-space-image-period was handled as word-space-period, and a wrap avoid before a period forced the whole thing to be on a same line.
Configuration menu - View commit details
-
Copy full SHA for 9542931 - Browse repository at this point
Copy the full SHA 9542931View commit details -
CSS/Text: adds "-cr-hint: strut-confined"
Will allow a style tweak to confine text to its paragraph line height (aka the strut): - this will prevent sub- and superscript-like inline elements from increasing line height and pushing down the baseline, and will reposition them if needed to limit their overflow. - this will resize inline images so they are not taller than the line height.
Configuration menu - View commit details
-
Copy full SHA for f86204b - Browse repository at this point
Copy the full SHA f86204bView commit details -
Rename mispelled 'ident' and field 'margin' to 'indent"
Makes thing easier to read and understand. Also use proper lInt16 for it, as it can be negative.
Configuration menu - View commit details
-
Copy full SHA for 228d18b - Browse repository at this point
Copy the full SHA 228d18bView commit details -
text-indent: some fixes, handle negative & hanging indent
Positive text-indent should apply only on the first line of a final block (paragraph), and should not apply after a <BR>. (Same for negative indent, that should apply on all but first line, including the first line after a <BR>.) Properly handle negative indents (that induce a left shift of the first line in LTR, possible overflowing its container), and hanging indents (that induce a right shift of the non-first lines in LTR, without any overflow), both in RTL a LTR cases. (Note that the text-indent "hanging" it not handled by all current browsers, but we do, as it is used in fb2.css.)
Configuration menu - View commit details
-
Copy full SHA for 080e359 - Browse repository at this point
Copy the full SHA 080e359View commit details -
(Upstream) Minor cleanup and ifdef wraps
From upstream in-progress "merge with KOReader" PR125.
Configuration menu - View commit details
-
Copy full SHA for 4403d09 - Browse repository at this point
Copy the full SHA 4403d09View commit details
Commits on Jan 24, 2020
-
lvtextfm: avoid possible segfault when hyphenating
Some word segment might start with a non-text source, without a ->t.font field, which could cause a segfault when accessed. Very rare and hard to reproduce, so did not try to make that skipping more part of the whole flow (we should probably also not provide them to HyphMan::hyphenate() to not miss some hyphenation opportunities). Also renamed inner 'start' and 'end' vars to avoid shadowing upper ones with the same names, to avoid confusion.
Configuration menu - View commit details
-
Copy full SHA for 05f0507 - Browse repository at this point
Copy the full SHA 05f0507View commit details
Commits on Jan 27, 2020
-
lvtextfm: avoid spurious spaces when hyphenating
Since f3b5958 and possibly looking for hyphenation on more than one word word, we may set hyph flags at multiple positions, and have non last words larger than they should, causing the appearance of a space. So, only add the hyphen width on the last word of a line. Noticed when hyphenating "extre<SPAN id=z/>mement", hyphenable as "extre-me-ment" and chosing the 2nd one: it would be rendered as "extre me-" (with a spurious space) on first line and "ment" on next line.
Configuration menu - View commit details
-
Copy full SHA for b2841e4 - Browse repository at this point
Copy the full SHA b2841e4View commit details -
lvtextfm: dont adjust space after initial quotation mark/dash
If a paragraph starts with a quotation mark or dash, and is followed by a space (classic or nbsp): don't have this space width widened or shortened in the process of text justification. This generalizes the existing code that was doing this only for 4 kind of dashes: we do it for more opening marks, dashes, bullets, and other ascii chars that could start a line.
Configuration menu - View commit details
-
Copy full SHA for 5c6ca22 - Browse repository at this point
Copy the full SHA 5c6ca22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e57b3a - Browse repository at this point
Copy the full SHA 9e57b3aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 60dd9ef - Browse repository at this point
Copy the full SHA 60dd9efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1471283 - Browse repository at this point
Copy the full SHA 1471283View commit details