Closed Bug 2029839 Opened 4 months ago Closed 2 months ago

Consider unifying fallback color and background-color logic for ::selection, ::target-text, and custom highlights

Categories

(Core :: Layout: Text and Fonts, task)

task

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: daisuke, Assigned: emilio)

References

Details

(Keywords: webcompat:platform-bug)

Attachments

(1 file)

Currently, there are three separate code paths in nsTextPaintStyle that determine whether to use native selection colors or author-specified ones:

  1. Web content ::selection (existing path in nsTextPaintStyle.cpp)
  2. Chrome-privileged ::selection (introduced in bug 2019153, using HasAuthorSpecifiedTextColor() || NS_GET_A(bgColor) > 0)
  3. ::target-text

Ideally, these should share consistent fallback logic.

See Also: → 2043232
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Blocks: 2044815
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
QA Whiteboard: [qa-triage-done-c154/b153]
Regressions: 2058134
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: