WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
80382
Selection Background Color Error
https://bugs.webkit.org/show_bug.cgi?id=80382
Summary
Selection Background Color Error
James Kyle
Reported
2012-03-05 22:58:45 PST
* { color: #### } *::selection { background: #### } Selection Background color turns black or white. Whenever both #### have the same alpha transparency using HSLa or RGBa. Limited when HSL or RGB is BLACK or WHITE. Not a major one but probably a quick fix, I captured my experimenting in a jsFiddle:
http://jsfiddle.net/JamesKyle/3zAsJ/
Attachments
first attempt
(21.91 KB, patch)
2012-04-12 15:04 PDT
,
Shezan Baig
no flags
Details
Formatted Diff
Diff
simple test case
(1.43 KB, text/html)
2012-04-26 12:41 PDT
,
Shezan Baig
no flags
Details
Patch
(12.37 KB, patch)
2012-04-26 12:59 PDT
,
Shezan Baig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Shezan Baig
Comment 1
2012-04-12 15:04:25 PDT
Created
attachment 136980
[details]
first attempt First attempt at this bug. The selection background color is being compared against the regular text color instead of the selection text color. This patch fixes this by computing the selection text color first, and using that to compare with the selection background color when choosing whether or not to invert.
Alexey Proskuryakov
Comment 2
2012-04-12 17:06:15 PDT
Please set r? flag, not r+.
Shezan Baig
Comment 3
2012-04-12 17:24:23 PDT
Oops, sorry. changed to r?
Shezan Baig
Comment 4
2012-04-17 14:40:26 PDT
Behavior in other browsers: * Firefox 11.0: Seems to completely ignore the ::selection style (which is obviously wrong). * MSIE 9: Respects the ::selection style. In the selection-background-color.html test in the patch, the background for the first block is black, and the bavkground for the second block is green.
Shezan Baig
Comment 5
2012-04-26 12:32:00 PDT
update for firefox behavior: Firefox works as expected when using "::-moz-selection" (the background for the first block is black, and the background for the second block is green)
Shezan Baig
Comment 6
2012-04-26 12:33:55 PDT
Opera also works the same as IE9. Right now only WebKit paints the wrong background color
Shezan Baig
Comment 7
2012-04-26 12:41:47 PDT
Created
attachment 139046
[details]
simple test case
Shezan Baig
Comment 8
2012-04-26 12:59:33 PDT
Created
attachment 139049
[details]
Patch new patch uploaded: * same changes in WebCore * changed pixel test into a reftest
Dave Hyatt
Comment 9
2012-05-07 14:17:33 PDT
Comment on
attachment 139049
[details]
Patch r=me
WebKit Review Bot
Comment 10
2012-05-07 14:30:14 PDT
Comment on
attachment 139049
[details]
Patch Clearing flags on attachment: 139049 Committed
r116353
: <
http://trac.webkit.org/changeset/116353
>
WebKit Review Bot
Comment 11
2012-05-07 14:30:21 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug