* { 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/
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.