CSS Custom Highlight API: Invalidation and prioritization
Categories
(Core :: CSS Parsing and Computation, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: jjaschke, Assigned: jjaschke)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 2 obsolete files)
Prioritization of custom highlights is not implemented yet, as well as Range upating/invalidation.
Assignee | ||
Comment 1•1 year ago
|
||
Assignee | ||
Comment 2•1 year ago
|
||
Main part of this patch is a refactoring of nsTextFrame::ResolveSelections()
,
which was necessary in order to determine the correct highlight selection to be painted.
Instead of returning the prevailing selection for a segment, it now returns
an array of Selections per segment, ordered by the priority.
In the future, this array can be used to combine different selection types properly:
- overlapping highlights where the higher prioritized highlight does not define text color,
and therefore the next-lower-priority text color should be used - When a highlighted segment is also selected by normal selection, the selections could be blended together. Right now only normal selection is painted.
Depends on D174480
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 3•1 year ago
|
||
Comment on attachment 9326634 [details]
WIP: Bug 1811823, part 1: Order highlight selections by insertion order. r=masayuki
Revision D174480 was moved to bug 1836013. Setting attachment 9326634 [details] to obsolete.
Assignee | ||
Comment 4•1 year ago
|
||
The idea of this struct is to allow live data of a highlight selection to be passed into layout.
Layout needs highlight properties such as priority or type to resolve combinations of highlights correctly.
Assignee | ||
Comment 5•1 year ago
|
||
Due to the prioritization rules for custom highlights, it is not feasible to rely on cascading.
Instead, highlights need to be stacked by their priority (and order of insertion).
Text and background color of the highest-prioritized highlight which defines that property should be used.
Since highlights are implemented as special Selection
s, the algorithm that determines the prevailing selection for a text frame needed to be adapted to instead return a list of selections.
Depends on D181142
Updated•1 year ago
|
Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a8cecdf5e3ff part 1: Added `HighlightSelectionData` struct. r=emilio https://hg.mozilla.org/integration/autoland/rev/7a9232452ebf part 2: Add correct prioritization for custom highlights. r=emilio
Comment 7•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a8cecdf5e3ff
https://hg.mozilla.org/mozilla-central/rev/7a9232452ebf
Description
•