Closed Bug 692752 Opened 13 years ago Closed 13 years ago

text selection highlighting should paint behind text-shadow

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Depends on 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Currently, it appears that the text-selection highlight is painted on top of any text-shadow in effect. IMO, this makes for a jarring user experience when selecting text that uses shadows. I note that Safari paints the shadow on top of the selection highlight, and I believe this is preferable behavior. Simple demonstration: data:text/html,<p style="font-size:40px; text-shadow:2px 2px 1px red;">Hello, shadowed world</p> Drag back and forth across the text to select/unselect part of it, and note how the shadow is "lost" under the selection highlight. Compare behavior in Safari.
Something like this ought to improve the user experience - seems to work in simple testing, at least, and passes unit tests on try.
Attachment #565577 - Flags: review?(roc)
Comment on attachment 565577 [details] [diff] [review] patch, paint text-shadow after selection highlight background Review of attachment 565577 [details] [diff] [review]: ----------------------------------------------------------------- Reftest? Should at least be able to use a != test
Attachment #565577 - Flags: review?(roc) → review+
I think we can test in both != and == forms, by faking the reference rendering using two overlaid divs. Pushed this to tryserver to check that it passes on various platforms (worked ok locally).
Assignee: nobody → jfkthame
Attachment #565721 - Flags: review?(roc)
(In reply to Jonathan Kew (:jfkthame) from comment #3) > Created attachment 565721 [details] [diff] [review] [diff] [details] [review] > reftest for painting selected text with shadow > > I think we can test in both != and == forms, by faking the reference > rendering using two overlaid divs. Pushed this to tryserver to check that it > passes on various platforms (worked ok locally). Hmm, the == test fails on platforms where the text color is automagically changed to white when selected. Making the text explicitly "color:white" solves this. Re-running tryserver job to verify there are no other surprises.
Updated to use color:white; now passes on all platforms. Carrying forward r=roc.
Attachment #565721 - Attachment is obsolete: true
Attachment #565743 - Flags: review+
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
OS: Mac OS X → All
Hardware: x86 → All
Depends on: 721750
Depends on: 738239
Depends on: 755994
Depends on: 810564
Depends on: 857924
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: