3 Test for: https://bugs.webkit.org/show_bug.cgi?id=80382
4 (Selection Background Color Error)
6 This bug is caused when the selection background is inverted if it
7 is the same as the text color. However, it should compare against
8 the selected text color instead of the non-selected text color.
10 The alpha component must be non-opaque for the bug to get triggered.
11 This is because when the selection background is opaque, it will be
12 blended with white, which prevents the inversion.
18 color: rgba(0,0,0,0.85);
21 background: rgba(0,0,0,0.85);
26 color: rgba(0,255,0,0.85);
29 background: rgba(0,255,0,0.85);
35 <div id="A">Test passes if the selection background is black</div>
36 <div id="B">Test passes if the selection background is green</div>
39 var body = document.getElementsByTagName("body")[0];
40 window.getSelection().selectAllChildren(body);