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)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Depends on 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
4.74 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
3.80 KB,
patch
|
jfkthame
:
review+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•13 years ago
|
||
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+
Assignee | ||
Comment 3•13 years ago
|
||
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)
Attachment #565721 -
Flags: review?(roc) → review+
Assignee | ||
Comment 4•13 years ago
|
||
(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.
Assignee | ||
Comment 5•13 years ago
|
||
Updated to use color:white; now passes on all platforms. Carrying forward r=roc.
Attachment #565721 -
Attachment is obsolete: true
Attachment #565743 -
Flags: review+
Assignee | ||
Comment 6•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b87e8e7e7916 (patch)
https://hg.mozilla.org/integration/mozilla-inbound/rev/bd5f05cdf119 (reftest)
Target Milestone: --- → mozilla10
Comment 7•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b87e8e7e7916
https://hg.mozilla.org/mozilla-central/rev/bd5f05cdf119
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•