Title: [227219] trunk
- Revision
- 227219
- Author
- jcr...@apple.com
- Date
- 2018-01-19 11:12:35 -0800 (Fri, 19 Jan 2018)
Log Message
AX: when invert colors is on, double-invert image and picture elements in UserAgentStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=181281
<rdar://problem/36291776>
Reviewed by Simon Fraser.
Source/WebCore:
Updated "Smart Invert" to include img and picture element inversion and tests.
Tests: accessibility/smart-invert-reference.html
accessibility/smart-invert.html
* css/html.css:
(@media (inverted-colors)):
(img:not(picture>img), picture, video):
LayoutTests:
Updated to include img and picture element tests.
* accessibility/smart-invert-expected.txt:
* accessibility/smart-invert-reference-expected.html:
* accessibility/smart-invert.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (227218 => 227219)
--- trunk/LayoutTests/ChangeLog 2018-01-19 19:02:05 UTC (rev 227218)
+++ trunk/LayoutTests/ChangeLog 2018-01-19 19:12:35 UTC (rev 227219)
@@ -1,3 +1,17 @@
+2018-01-19 James Craig <jcr...@apple.com>
+
+ AX: when invert colors is on, double-invert image and picture elements in UserAgentStyleSheet
+ https://bugs.webkit.org/show_bug.cgi?id=181281
+ <rdar://problem/36291776>
+
+ Reviewed by Simon Fraser.
+
+ Updated to include img and picture element tests.
+
+ * accessibility/smart-invert-expected.txt:
+ * accessibility/smart-invert-reference-expected.html:
+ * accessibility/smart-invert.html:
+
2018-01-19 Chris Dumez <cdu...@apple.com>
The WebContent process should not process incoming IPC while waiting for a sync IPC reply
Modified: trunk/LayoutTests/accessibility/smart-invert-expected.txt (227218 => 227219)
--- trunk/LayoutTests/accessibility/smart-invert-expected.txt 2018-01-19 19:02:05 UTC (rev 227218)
+++ trunk/LayoutTests/accessibility/smart-invert-expected.txt 2018-01-19 19:12:35 UTC (rev 227219)
@@ -16,8 +16,8 @@
PASS: filter for VIDEO.preserve-filter is 'grayscale(1)'.
AFTER INVERT-COLORS IS APPLIED
-PASS: filter for IMG#a is 'none'. Change once IMG/PICTURE elements are inverted, too.
-PASS: filter for PICTURE#b is 'none'. Change once IMG/PICTURE elements are inverted, too.
+PASS: filter for IMG#a is 'invert(1)'.
+PASS: filter for PICTURE#b is 'invert(1)'.
PASS: filter for VIDEO#c is 'invert(1)'.
PASS: filter for VIDEO#d is 'invert(1)'.
PASS: filter for IMG.fallback is 'none'.
Modified: trunk/LayoutTests/accessibility/smart-invert-reference-expected.html (227218 => 227219)
--- trunk/LayoutTests/accessibility/smart-invert-reference-expected.html 2018-01-19 19:02:05 UTC (rev 227218)
+++ trunk/LayoutTests/accessibility/smart-invert-reference-expected.html 2018-01-19 19:12:35 UTC (rev 227219)
@@ -11,8 +11,8 @@
</head>
<body>
- <img src="" alt="">
- <picture><img class="fallback" src="" alt=""></picture>
+ <img class="invert" src="" alt="">
+ <picture class="invert" ><img class="fallback" src="" alt=""></picture>
<video class="invert" poster="../compositing/resources/simple_image.png"></video>
<video class="invert" poster="../compositing/resources/simple_image.png" controls></video>
<br>
Modified: trunk/LayoutTests/accessibility/smart-invert.html (227218 => 227219)
--- trunk/LayoutTests/accessibility/smart-invert.html 2018-01-19 19:02:05 UTC (rev 227218)
+++ trunk/LayoutTests/accessibility/smart-invert.html 2018-01-19 19:12:35 UTC (rev 227219)
@@ -61,7 +61,7 @@
document.getElementById("result").innerHTML += "<br>AFTER INVERT-COLORS IS APPLIED<br>";
// Eventually elements img amd picture will be double-inverted when invert colors is on. Not shipping yet.
- expectFilterValueForElements(NONE_VALUE, document.querySelectorAll("#a, #b"), "Change once IMG/PICTURE elements are inverted, too.");
+ expectFilterValueForElements(INVERTED_VALUE, document.querySelectorAll("#a, #b"));
// Element <video> should be double-inverted when invert colors is on.
expectFilterValueForElements(INVERTED_VALUE, document.querySelectorAll("#c, #d"));
Modified: trunk/Source/WebCore/ChangeLog (227218 => 227219)
--- trunk/Source/WebCore/ChangeLog 2018-01-19 19:02:05 UTC (rev 227218)
+++ trunk/Source/WebCore/ChangeLog 2018-01-19 19:12:35 UTC (rev 227219)
@@ -1,3 +1,20 @@
+2018-01-19 James Craig <jcr...@apple.com>
+
+ AX: when invert colors is on, double-invert image and picture elements in UserAgentStyleSheet
+ https://bugs.webkit.org/show_bug.cgi?id=181281
+ <rdar://problem/36291776>
+
+ Reviewed by Simon Fraser.
+
+ Updated "Smart Invert" to include img and picture element inversion and tests.
+
+ Tests: accessibility/smart-invert-reference.html
+ accessibility/smart-invert.html
+
+ * css/html.css:
+ (@media (inverted-colors)):
+ (img:not(picture>img), picture, video):
+
2018-01-19 Chris Dumez <cdu...@apple.com>
The WebContent process should not process incoming IPC while waiting for a sync IPC reply
Modified: trunk/Source/WebCore/css/html.css (227218 => 227219)
--- trunk/Source/WebCore/css/html.css 2018-01-19 19:02:05 UTC (rev 227218)
+++ trunk/Source/WebCore/css/html.css 2018-01-19 19:12:35 UTC (rev 227219)
@@ -1238,5 +1238,5 @@
/* Default support for "Smart Invert" where all content color except media is inverted. */
@media (inverted-colors) {
- video { filter: invert(100%); } /* Only videos double-inverted for now. */
+ img:not(picture>img), picture, video { filter: invert(100%); } /* Images and videos double-inverted. */
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes