Closed Bug 7086 Opened 25 years ago Closed 25 years ago

Text selection is always in black & white

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 1137

People

(Reporter: pierre, Assigned: peterl-retired)

Details

I'll describe the bug on the Mac because I don't know how to change the highlight color on other platforms: - Open the Appearance control panel - Under the Appearance tab, select a Highlight Color that is not black & white - Close the control panel - Launch Viewer or AppRunner - Select some text in the web page ==> The selected text is always displayed as white text on black background. Notes: In layout/html/base/src/nsTextFrame.cpp, look for "XXX Get these from style" (it's currently on line #325 but it may change in the future). The values for mSelectionBGColor and mSelectionTextColor are hardcoded. They should instead be obtained from eColor_TextSelectBackground and eColor_TextSelectForeground in nsILookAndFeel. But then how is the nsILookAndFeel related to style? That's for you to find out and implement. Please try not to create a nsILookAndFeel everytime a nsTextFrame is created, painted or reflowed.
Assignee: rickg → peterl
Think this is yours.
I did not check in yet the changes in nsLookAndFeel that allow to use the hilite color on the Mac. The other platforms seem to be ok already.
Target Milestone: M10 → M11
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
*** This bug has been marked as a duplicate of 1137 ***
Status: RESOLVED → VERIFIED
Agreed. Marking as verified duplicate of 1137.
You need to log in before you can comment on or make changes to this bug.