Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r182546 - Fill list style background with same color with that …
…of list background. https://bugs.webkit.org/show_bug.cgi?id=143483 Reviewed by Simon Fraser. Source/WebCore: LayoutListMarker does not have a node so its selectionBackgroundColor alway returns the default theme color for selection. We can make it more natural by filling the same color with that of LayoutListItem into it. Tests: fast/backgrounds/selection-background-color-of-image-list-style.html fast/backgrounds/selection-background-color-of-list-style.html * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint): LayoutTests: * fast/backgrounds/selection-background-color-of-image-list-style.html: Added. * fast/backgrounds/selection-background-color-of-list-style.html: Added. * platform/gtk/fast/backgrounds/selection-background-color-of-image-list-style-expected.png: Added. * platform/gtk/fast/backgrounds/selection-background-color-of-image-list-style-expected.txt: Added. * platform/gtk/fast/backgrounds/selection-background-color-of-list-style-expected.png: Added. * platform/gtk/fast/backgrounds/selection-background-color-of-list-style-expected.txt: Added. * platform/mac/fast/backgrounds/selection-background-color-of-image-list-style-expected.png: Added. * platform/mac/fast/backgrounds/selection-background-color-of-image-list-style-expected.txt: Added. * platform/mac/fast/backgrounds/selection-background-color-of-list-style-expected.png: Added. * platform/mac/fast/backgrounds/selection-background-color-of-list-style-expected.txt: Added.
- Loading branch information
1 parent
0b3abad
commit 40fc608
Showing
13 changed files
with
174 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
LayoutTests/fast/backgrounds/selection-background-color-of-image-list-style.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
ul { list-style-image: url('./resources/diamond.png'); } | ||
ul>li::selection { background: yellow; } | ||
</style> | ||
<div> | ||
Test pass if background of image list style in ul is yellow. | ||
<ul> | ||
<li>One</li> | ||
<li>Two</li> | ||
</ul> | ||
</div> | ||
<script> | ||
var range = document.createRange(); | ||
range.selectNode(document.querySelector('ul')); | ||
getSelection().addRange(range); | ||
</script> |
22 changes: 22 additions & 0 deletions
22
LayoutTests/fast/backgrounds/selection-background-color-of-list-style.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
ul>li::selection { background: green; } | ||
ol>li::selection { background: yellow; } | ||
</style> | ||
<div> | ||
Test passes if backgrounds of list style in ul and ol are each green and yellow. | ||
<ul> | ||
<li>One</li> | ||
<li>Two</li> | ||
</ul> | ||
<ol> | ||
<li>One</li> | ||
<li>Two</li> | ||
</ol> | ||
</div> | ||
<script> | ||
var range = document.createRange(); | ||
range.setStartBefore(document.querySelector('ul')); | ||
range.setEndAfter(document.querySelector('ol')); | ||
getSelection().addRange(range); | ||
</script> |
Binary file added
BIN
+8.49 KB
...tk/fast/backgrounds/selection-background-color-of-image-list-style-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions
20
...platform/gtk/fast/backgrounds/selection-background-color-of-image-list-style-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
layer at (0,0) size 800x600 | ||
RenderView at (0,0) size 800x600 | ||
layer at (0,0) size 800x91 | ||
RenderBlock {HTML} at (0,0) size 800x91 | ||
RenderBody {BODY} at (8,8) size 784x67 | ||
RenderBlock {DIV} at (0,0) size 784x67 | ||
RenderBlock (anonymous) at (0,0) size 784x17 | ||
RenderText {#text} at (0,0) size 361x17 | ||
text run at (0,0) width 361: "Test pass if background of image list style in ul is yellow." | ||
RenderBlock {UL} at (0,33) size 784x34 | ||
RenderListItem {LI} at (40,0) size 744x17 | ||
RenderListMarker at (-17,4) size 10x10 | ||
RenderText {#text} at (0,0) size 27x17 | ||
text run at (0,0) width 27: "One" | ||
RenderListItem {LI} at (40,17) size 744x17 | ||
RenderListMarker at (-17,4) size 10x10 | ||
RenderText {#text} at (0,0) size 30x17 | ||
text run at (0,0) width 30: "Two" | ||
selection start: position 66 of child 0 {#text} of child 0 {DIV} of body | ||
selection end: position 3 of child 0 {#text} of child 3 {LI} of child 1 {UL} of child 0 {DIV} of body |
Binary file added
BIN
+10.6 KB
...form/gtk/fast/backgrounds/selection-background-color-of-list-style-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
...Tests/platform/gtk/fast/backgrounds/selection-background-color-of-list-style-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
layer at (0,0) size 800x600 | ||
RenderView at (0,0) size 800x600 | ||
layer at (0,0) size 800x141 | ||
RenderBlock {HTML} at (0,0) size 800x141 | ||
RenderBody {BODY} at (8,8) size 784x117 | ||
RenderBlock {DIV} at (0,0) size 784x117 | ||
RenderBlock (anonymous) at (0,0) size 784x17 | ||
RenderText {#text} at (0,0) size 489x17 | ||
text run at (0,0) width 489: "Test passes if backgrounds of list style in ul and ol are each green and yellow." | ||
RenderBlock {UL} at (0,33) size 784x34 | ||
RenderListItem {LI} at (40,0) size 744x17 | ||
RenderListMarker at (-17,0) size 7x17: bullet | ||
RenderText {#text} at (0,0) size 27x17 | ||
text run at (0,0) width 27: "One" | ||
RenderListItem {LI} at (40,17) size 744x17 | ||
RenderListMarker at (-17,0) size 7x17: bullet | ||
RenderText {#text} at (0,0) size 30x17 | ||
text run at (0,0) width 30: "Two" | ||
RenderBlock {OL} at (0,83) size 784x34 | ||
RenderListItem {LI} at (40,0) size 744x17 | ||
RenderListMarker at (-20,0) size 16x17: "1" | ||
RenderText {#text} at (0,0) size 27x17 | ||
text run at (0,0) width 27: "One" | ||
RenderListItem {LI} at (40,17) size 744x17 | ||
RenderListMarker at (-20,0) size 16x17: "2" | ||
RenderText {#text} at (0,0) size 30x17 | ||
text run at (0,0) width 30: "Two" | ||
selection start: position 86 of child 0 {#text} of child 0 {DIV} of body | ||
selection end: position 3 of child 0 {#text} of child 3 {LI} of child 3 {OL} of child 0 {DIV} of body |
Binary file added
BIN
+17.9 KB
...ac/fast/backgrounds/selection-background-color-of-image-list-style-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions
20
...platform/mac/fast/backgrounds/selection-background-color-of-image-list-style-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
layer at (0,0) size 800x600 | ||
RenderView at (0,0) size 800x600 | ||
layer at (0,0) size 800x94 | ||
RenderBlock {HTML} at (0,0) size 800x94 | ||
RenderBody {BODY} at (8,8) size 784x70 | ||
RenderBlock {DIV} at (0,0) size 784x70 | ||
RenderBlock (anonymous) at (0,0) size 784x18 | ||
RenderText {#text} at (0,0) size 368x18 | ||
text run at (0,0) width 368: "Test pass if background of image list style in ul is yellow." | ||
RenderBlock {UL} at (0,34) size 784x36 | ||
RenderListItem {LI} at (40,0) size 744x18 | ||
RenderListMarker at (-17,4) size 10x10 | ||
RenderText {#text} at (0,0) size 27x18 | ||
text run at (0,0) width 27: "One" | ||
RenderListItem {LI} at (40,18) size 744x18 | ||
RenderListMarker at (-17,4) size 10x10 | ||
RenderText {#text} at (0,0) size 29x18 | ||
text run at (0,0) width 29: "Two" | ||
selection start: position 66 of child 0 {#text} of child 0 {DIV} of body | ||
selection end: position 3 of child 0 {#text} of child 3 {LI} of child 1 {UL} of child 0 {DIV} of body |
Binary file added
BIN
+19.5 KB
...form/mac/fast/backgrounds/selection-background-color-of-list-style-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
...Tests/platform/mac/fast/backgrounds/selection-background-color-of-list-style-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
layer at (0,0) size 800x600 | ||
RenderView at (0,0) size 800x600 | ||
layer at (0,0) size 800x146 | ||
RenderBlock {HTML} at (0,0) size 800x146 | ||
RenderBody {BODY} at (8,8) size 784x122 | ||
RenderBlock {DIV} at (0,0) size 784x122 | ||
RenderBlock (anonymous) at (0,0) size 784x18 | ||
RenderText {#text} at (0,0) size 497x18 | ||
text run at (0,0) width 497: "Test passes if backgrounds of list style in ul and ol are each green and yellow." | ||
RenderBlock {UL} at (0,34) size 784x36 | ||
RenderListItem {LI} at (40,0) size 744x18 | ||
RenderListMarker at (-17,0) size 7x18: bullet | ||
RenderText {#text} at (0,0) size 27x18 | ||
text run at (0,0) width 27: "One" | ||
RenderListItem {LI} at (40,18) size 744x18 | ||
RenderListMarker at (-17,0) size 7x18: bullet | ||
RenderText {#text} at (0,0) size 29x18 | ||
text run at (0,0) width 29: "Two" | ||
RenderBlock {OL} at (0,86) size 784x36 | ||
RenderListItem {LI} at (40,0) size 744x18 | ||
RenderListMarker at (-20,0) size 16x18: "1" | ||
RenderText {#text} at (0,0) size 27x18 | ||
text run at (0,0) width 27: "One" | ||
RenderListItem {LI} at (40,18) size 744x18 | ||
RenderListMarker at (-20,0) size 16x18: "2" | ||
RenderText {#text} at (0,0) size 29x18 | ||
text run at (0,0) width 29: "Two" | ||
selection start: position 86 of child 0 {#text} of child 0 {DIV} of body | ||
selection end: position 3 of child 0 {#text} of child 3 {LI} of child 3 {OL} of child 0 {DIV} of body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters