Diff
Modified: trunk/LayoutTests/ChangeLog (209403 => 209404)
--- trunk/LayoutTests/ChangeLog 2016-12-06 17:46:48 UTC (rev 209403)
+++ trunk/LayoutTests/ChangeLog 2016-12-06 17:58:39 UTC (rev 209404)
@@ -1,5 +1,29 @@
2016-12-06 Daniel Bates <[email protected]>
+ Make fast/selectors/040.html actually test background-color painting for ::selection when run in DRT
+ https://bugs.webkit.org/show_bug.cgi?id=79694
+
+ Reviewed by Beth Dakin.
+
+ Currently the test case fast/selectors/040.html doesn't actually test that we
+ honor the background-color of ::selection when run in DRT. In particular, it
+ doesn't programmatically select any text and hence the DRT results reflect a
+ paragraph of non-selected text. Instead, we should programmatically select the
+ test paragraph so that DRT can capture the painting of background-color for ::selection.
+
+ * fast/selectors/040-expected.html: Added.
+ * fast/selectors/040.html:
+ * platform/efl/fast/selectors/040-expected.png: Removed.
+ * platform/efl/fast/selectors/040-expected.txt: Removed.
+ * platform/gtk/fast/selectors/040-expected.png: Removed.
+ * platform/gtk/fast/selectors/040-expected.txt: Removed.
+ * platform/ios-simulator/fast/selectors/040-expected.txt: Removed.
+ * platform/mac/fast/selectors/040-expected.png: Removed.
+ * platform/mac/fast/selectors/040-expected.txt: Removed.
+ * platform/win/fast/selectors/040-expected.txt: Removed.
+
+2016-12-06 Daniel Bates <[email protected]>
+
Test insecure-xhr-sync-in-main-frame.html fails with CORS error if run before r203542
https://bugs.webkit.org/show_bug.cgi?id=165407
Added: trunk/LayoutTests/fast/selectors/040-expected.html (0 => 209404)
--- trunk/LayoutTests/fast/selectors/040-expected.html (rev 0)
+++ trunk/LayoutTests/fast/selectors/040-expected.html 2016-12-06 17:58:39 UTC (rev 209404)
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <title>::selection pseudo-element</title>
+ <style type="text/css">
+ .highlight { background-color: rgba(99, 254, 0, 0.95); }
+ </style>
+ </head>
+ <body>
+<!-- This result mimics the text-wrapping that would occur in a window with size 800 x 600 pixels. -->
+<p style="margin-bottom: 0" class="highlight">Any textual selection in this long paragraph should have green background. Any textual selection in this long paragraph</p><p style="margin-top: 0"><span class="highlight">should have green background. Any textual selection in this long paragraph should have green background.</span></p>
+</body>
+</html>
Modified: trunk/LayoutTests/fast/selectors/040.html (209403 => 209404)
--- trunk/LayoutTests/fast/selectors/040.html 2016-12-06 17:46:48 UTC (rev 209403)
+++ trunk/LayoutTests/fast/selectors/040.html 2016-12-06 17:58:39 UTC (rev 209404)
@@ -2,7 +2,7 @@
<html>
<head>
<title>::selection pseudo-element</title>
- <style type="text/css">p::selection { background-color : lime }
+ <style type="text/css">p::selection { background-color: rgba(99, 254, 0, 0.95); /* alpha < 1 so that we don't blend the background color with white. */ }
</style>
<link rel="first" href="" title="Groups of selectors">
<link rel="prev" href="" title="::first-letter pseudo-element">
@@ -13,5 +13,9 @@
</head>
<body>
<p>Any textual selection in this long paragraph should have green background. Any textual selection in this long paragraph should have green background. Any textual selection in this long paragraph should have green background.</p>
+<script>
+var p = document.querySelector("p");
+window.getSelection().setBaseAndExtent(p, 0, p, 1);
+</script>
</body>
-</html>
\ No newline at end of file
+</html>
Deleted: trunk/LayoutTests/platform/efl/fast/selectors/040-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/efl/fast/selectors/040-expected.txt (209403 => 209404)
--- trunk/LayoutTests/platform/efl/fast/selectors/040-expected.txt 2016-12-06 17:46:48 UTC (rev 209403)
+++ trunk/LayoutTests/platform/efl/fast/selectors/040-expected.txt 2016-12-06 17:58:39 UTC (rev 209404)
@@ -1,9 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x68
- RenderBlock {HTML} at (0,0) size 800x68
- RenderBody {BODY} at (8,16) size 784x36
- RenderBlock {P} at (0,0) size 784x36
- RenderText {#text} at (0,0) size 754x35
- text run at (0,0) width 754: "Any textual selection in this long paragraph should have green background. Any textual selection in this long paragraph"
- text run at (0,18) width 678: "should have green background. Any textual selection in this long paragraph should have green background."
Deleted: trunk/LayoutTests/platform/gtk/fast/selectors/040-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/gtk/fast/selectors/040-expected.txt (209403 => 209404)
--- trunk/LayoutTests/platform/gtk/fast/selectors/040-expected.txt 2016-12-06 17:46:48 UTC (rev 209403)
+++ trunk/LayoutTests/platform/gtk/fast/selectors/040-expected.txt 2016-12-06 17:58:39 UTC (rev 209404)
@@ -1,9 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x66
- RenderBlock {HTML} at (0,0) size 800x66
- RenderBody {BODY} at (8,16) size 784x34
- RenderBlock {P} at (0,0) size 784x34
- RenderText {#text} at (0,0) size 754x34
- text run at (0,0) width 754: "Any textual selection in this long paragraph should have green background. Any textual selection in this long paragraph"
- text run at (0,17) width 678: "should have green background. Any textual selection in this long paragraph should have green background."
Deleted: trunk/LayoutTests/platform/ios-simulator/fast/selectors/040-expected.txt (209403 => 209404)
--- trunk/LayoutTests/platform/ios-simulator/fast/selectors/040-expected.txt 2016-12-06 17:46:48 UTC (rev 209403)
+++ trunk/LayoutTests/platform/ios-simulator/fast/selectors/040-expected.txt 2016-12-06 17:58:39 UTC (rev 209404)
@@ -1,9 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x72
- RenderBlock {HTML} at (0,0) size 800x72
- RenderBody {BODY} at (8,16) size 784x40
- RenderBlock {P} at (0,0) size 784x40
- RenderText {#text} at (0,0) size 768x39
- text run at (0,0) width 768: "Any textual selection in this long paragraph should have green background. Any textual selection in this long paragraph"
- text run at (0,20) width 688: "should have green background. Any textual selection in this long paragraph should have green background."
Deleted: trunk/LayoutTests/platform/mac/fast/selectors/040-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/mac/fast/selectors/040-expected.txt (209403 => 209404)
--- trunk/LayoutTests/platform/mac/fast/selectors/040-expected.txt 2016-12-06 17:46:48 UTC (rev 209403)
+++ trunk/LayoutTests/platform/mac/fast/selectors/040-expected.txt 2016-12-06 17:58:39 UTC (rev 209404)
@@ -1,9 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x68
- RenderBlock {HTML} at (0,0) size 800x68
- RenderBody {BODY} at (8,16) size 784x36
- RenderBlock {P} at (0,0) size 784x36
- RenderText {#text} at (0,0) size 768x36
- text run at (0,0) width 768: "Any textual selection in this long paragraph should have green background. Any textual selection in this long paragraph"
- text run at (0,18) width 688: "should have green background. Any textual selection in this long paragraph should have green background."
Deleted: trunk/LayoutTests/platform/win/fast/selectors/040-expected.txt (209403 => 209404)
--- trunk/LayoutTests/platform/win/fast/selectors/040-expected.txt 2016-12-06 17:46:48 UTC (rev 209403)
+++ trunk/LayoutTests/platform/win/fast/selectors/040-expected.txt 2016-12-06 17:58:39 UTC (rev 209404)
@@ -1,9 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x68
- RenderBlock {HTML} at (0,0) size 800x68
- RenderBody {BODY} at (8,16) size 784x36
- RenderBlock {P} at (0,0) size 784x36
- RenderText {#text} at (0,0) size 754x36
- text run at (0,0) width 754: "Any textual selection in this long paragraph should have green background. Any textual selection in this long paragraph"
- text run at (0,18) width 678: "should have green background. Any textual selection in this long paragraph should have green background."