mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
bump crengine: support inline-block, better text selection (#5763)
Includes: - lvtinydom.cpp: fix Use-after-free - lvtextfm: fix/cleanup lastnonspace code bits - lvtextfm: fix vertical-align: top & bottom - renderBlockElementEnhanced: minor fixes related to floats - renderBlockElementEnhanced: compute baseline of block - Add support for display: inline-block/inline-table - Better selection highlighting by using getSegmentRects() - getHtml(): add flag to get text soft-hyphenated cre.cpp: toggable text selection highlighting method, default to the new one using segments. Update various cre flags to use the new features (and to conform with some flags re-ordering): - support display: inline-block in flat, book and web render modes. - get HTML with soft-hyphens for footnote popups, so MuPDF can use them when rendering the footnote.
This commit is contained in:
@@ -1064,13 +1064,15 @@ function ReaderLink:showAsFootnotePopup(link, neglect_current_location)
|
||||
-- then just ignore the whole stylesheet, including our own declarations
|
||||
-- we add at start)
|
||||
--
|
||||
-- flags = 0x0001 to get the simplest/purest HTML without CSS, and dir=
|
||||
-- and lang= attributes grabbed from parent nodes
|
||||
-- flags = 0x1001 to get the simplest/purest HTML without CSS, with added
|
||||
-- soft-hyphens where hyphenation is allowed (done by crengine according
|
||||
-- to user's hyphenation settings), and dir= and lang= attributes grabbed
|
||||
-- from parent nodes
|
||||
local html
|
||||
if extStartXP and extEndXP then
|
||||
html = self.ui.document:getHTMLFromXPointers(extStartXP, extEndXP, 0x0001)
|
||||
html = self.ui.document:getHTMLFromXPointers(extStartXP, extEndXP, 0x1001)
|
||||
else
|
||||
html = self.ui.document:getHTMLFromXPointer(target_xpointer, 0x0001, true)
|
||||
html = self.ui.document:getHTMLFromXPointer(target_xpointer, 0x1001, true)
|
||||
-- from_final_parent = true to get a possibly more complete footnote
|
||||
end
|
||||
if not html then
|
||||
|
||||
Reference in New Issue
Block a user