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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227219
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2018-01-19 James Craig <jcraig@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 <cdumez@apple.com>
The WebContent process should not process incoming IPC while waiting for a sync IPC reply
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'.
</head>
<body>
- <img src="../compositing/resources/simple_image.png" alt="">
- <picture><img class="fallback" src="../compositing/resources/simple_image.png" alt=""></picture>
+ <img class="invert" src="../compositing/resources/simple_image.png" alt="">
+ <picture class="invert" ><img class="fallback" src="../compositing/resources/simple_image.png" alt=""></picture>
<video class="invert" poster="../compositing/resources/simple_image.png"></video>
<video class="invert" poster="../compositing/resources/simple_image.png" controls></video>
<br>
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"));
+2018-01-19 James Craig <jcraig@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 <cdumez@apple.com>
The WebContent process should not process incoming IPC while waiting for a sync IPC reply
/* 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. */
}