From b6159fd57da4ab42eb96af295378b6b38e6837ca Mon Sep 17 00:00:00 2001 From: "jcraig@apple.com" Date: Fri, 19 Jan 2018 19:12:35 +0000 Subject: [PATCH] AX: when invert colors is on, double-invert image and picture elements in UserAgentStyleSheet https://bugs.webkit.org/show_bug.cgi?id=181281 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 --- LayoutTests/ChangeLog | 14 ++++++++++++++ LayoutTests/accessibility/smart-invert-expected.txt | 4 ++-- .../accessibility/smart-invert-reference-expected.html | 4 ++-- LayoutTests/accessibility/smart-invert.html | 2 +- Source/WebCore/ChangeLog | 17 +++++++++++++++++ Source/WebCore/css/html.css | 2 +- 6 files changed, 37 insertions(+), 6 deletions(-) diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 8f20cc6..ef0fedb 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,17 @@ +2018-01-19 James Craig + + AX: when invert colors is on, double-invert image and picture elements in UserAgentStyleSheet + https://bugs.webkit.org/show_bug.cgi?id=181281 + + + 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 The WebContent process should not process incoming IPC while waiting for a sync IPC reply diff --git a/LayoutTests/accessibility/smart-invert-expected.txt b/LayoutTests/accessibility/smart-invert-expected.txt index 91ececb..c2f2082 100644 --- a/LayoutTests/accessibility/smart-invert-expected.txt +++ b/LayoutTests/accessibility/smart-invert-expected.txt @@ -16,8 +16,8 @@ PASS: filter for VIDEO.preserve-filter is 'grayscale(1)'. 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'. diff --git a/LayoutTests/accessibility/smart-invert-reference-expected.html b/LayoutTests/accessibility/smart-invert-reference-expected.html index fb576cc..bcffdb3 100644 --- a/LayoutTests/accessibility/smart-invert-reference-expected.html +++ b/LayoutTests/accessibility/smart-invert-reference-expected.html @@ -11,8 +11,8 @@ - - + +
diff --git a/LayoutTests/accessibility/smart-invert.html b/LayoutTests/accessibility/smart-invert.html index 2aaf650..3ff6e17 100644 --- a/LayoutTests/accessibility/smart-invert.html +++ b/LayoutTests/accessibility/smart-invert.html @@ -61,7 +61,7 @@ function runTest() { document.getElementById("result").innerHTML += "
AFTER INVERT-COLORS IS APPLIED
"; // 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