Summary: | Selection Background Color Error | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | James Kyle <me> | ||||||||
Component: | Layout and Rendering | Assignee: | Shezan Baig <shezbaig.wk> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Trivial | CC: | andersca, ap, bdakin, hyatt, mitz, rniwa, shanestephens, shezbaig.wk, simon.fraser, webkit.review.bot | ||||||||
Priority: | P5 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Mac | ||||||||||
OS: | OS X 10.7 | ||||||||||
URL: | http://jsfiddle.net/JamesKyle/3zAsJ/ | ||||||||||
Attachments: |
|
Description
James Kyle
2012-03-05 22:58:45 PST
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.
Please set r? flag, not r+. Oops, sorry. changed to r? 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. 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) Opera also works the same as IE9. Right now only WebKit paints the wrong background color Created attachment 139046 [details]
simple test case
Created attachment 139049 [details]
Patch
new patch uploaded:
* same changes in WebCore
* changed pixel test into a reftest
Comment on attachment 139049 [details]
Patch
r=me
Comment on attachment 139049 [details] Patch Clearing flags on attachment: 139049 Committed r116353: <http://trac.webkit.org/changeset/116353> All reviewed patches have been landed. Closing bug. |