Skip to content

bump base & crengine: CSS enhancements and other fixes#14979

Merged
poire-z merged 2 commits into
koreader:masterfrom
poire-z:bump_crengine
Feb 14, 2026
Merged

bump base & crengine: CSS enhancements and other fixes#14979
poire-z merged 2 commits into
koreader:masterfrom
poire-z:bump_crengine

Conversation

@poire-z

@poire-z poire-z commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

bump base & crengine: CSS enhancements and other fixes

Includes:

base/cre.cpp koreader/koreader-base#2270

base:

ReaderHighlight:onHoldPan(): remove abort on empty selection

We may happen to have an empty selection while panning, no reason to abort the selection yet before release. See #13392 (comment).
Also add get_segments=true to remaining calls to getScreenBoxesFromPositions() that we forgot to update to use it. See #12810 (comment)


This change is Reviewable

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

cre.cpp:
- add requestRender()
- getTextFromPositions(): improvements

base:
- Fix offs_x/offs_y typo in BB_add_blit_from fast path
- lua-Spore: fix matching plain application/json
- libpng: update to 1.6.55
- luajit: update to 2.1.1770989063
- ci/circle: bump docker images
We may happen to have an empty selection while panning,
no reason to abort the selection yet before release.
Also add get_segments=true to remaining calls to
getScreenBoxesFromPositions() that we forgot to
update to use it.
@poire-z poire-z added this to the 2026.02 milestone Feb 14, 2026
@poire-z poire-z merged commit e535b2b into koreader:master Feb 14, 2026
4 checks passed
@poire-z poire-z deleted the bump_crengine branch February 14, 2026 21:19
@poire-z

poire-z commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

With my changes to text selection, when hold on that blue cross, we would get selected:
image
which is fine - before, we grabbed the end of the previous line, and stripped, we would always get a word. If holding not-on-a-word and in a margin, it's probably to go do some real highlighting.

This causes that ReaderDictionary:onLookupWord() will strip that ' to an empty string:

function ReaderDictionary:onLookupWord(word, is_sane, boxes, highlight, link, dict_close_callback)
logger.dbg("dict lookup word:", word, boxes)
-- escape quotes and other funny characters in word
word = self:cleanSelection(word, is_sane)
logger.dbg("dict stripped word:", word)
self.highlight = highlight
local disable_fuzzy_search
if self.ui.doc_settings then
disable_fuzzy_search = self.disable_fuzzy_search
else
disable_fuzzy_search = self.disable_fuzzy_search_fm
end
-- Wrapped through Trapper, as we may be using Trapper:dismissablePopen() in it
Trapper:wrap(function()
self:stardictLookup(word, self.enabled_dict_names, not disable_fuzzy_search, boxes, link, dict_close_callback)
end)
return true
end

and have this return:
function ReaderDictionary:stardictLookup(word, dict_names, fuzzy_search, boxes, link, dict_close_callback)
if word == "" then
return
end

and we will never unhighlight, and we would be stuck in that state (tap would not change pages) until we start another highlight.

I plan to remove this if word == "" then return end so we will give that empty string to stardict lookup, and we will get as what we have if we would select thisworddoesnotexist:
image
Then, on closing that window, all the cleanup/unhighlight would be done, the normal behaviour.

Nothing against that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment