Closed Bug 2035083 Opened 2 months ago Closed 2 months ago

CSS highlights not rendering on inserted text nodes

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 149
defect

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: vrugtehagel, Assigned: jjaschke)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0

Steps to reproduce:

I created a text node, constructed Range objects for it, added those to a CSS highlight (using CSS.highlights.set(...)), then inserted the text node into the document.

Actual results:

The text was not highlighted.

Expected results:

The text should have been highlighted. See attached test case.

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core
Severity: -- → S3
Component: Layout: Text and Fonts → CSS Parsing and Computation

Thanks for catching this. Confirmed this works in Chrome, I'm working on a fix.

Allow detached ranges through the document check in highlight selection
population. Added two WPT reftests verifying highlights paint after
inserting a text node and after inserting a subtree containing a
highlighted range.

Assignee: nobody → jjaschke
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by jjaschke@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2ab73e6e9589 https://hg.mozilla.org/integration/autoland/rev/597b1c2d66fd Fix CSS highlights not rendering on inserted text nodes. r=layout-reviewers,emilio

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/59666 for changes under testing/web-platform/tests

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch

Upstream PR merged by moz-wptsync-bot

QA Whiteboard: [qa-triage-done-c153/b152]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: