Changeset 226825 in webkit


Ignore:
Timestamp:
Jan 11, 2018 5:16:59 PM (6 years ago)
Author:
jcraig@apple.com
Message:

AX: when invert colors is on, double-invert video elements in UserAgentStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=168447
<rdar://problem/30559874>

Reviewed by Simon Fraser.

Double-invert video when platform "invert colors" setting is enabled. Behavior matches
current "Smart Invert" feature of Safari Reader on macOS/iOS and other iOS native apps.

Source/WebCore:

Tests: accessibility/smart-invert-reference.html

accessibility/smart-invert.html

  • Modules/modern-media-controls/controls/media-controls.css:

(@media (inverted-colors)):
(:host):
(picture):

  • css/html.css:

(@media (inverted-colors)):
(video):

LayoutTests:

  • TestExpectations: Platform setting only available on Mac and iOS.
  • accessibility/smart-invert-expected.txt: Added.
  • accessibility/smart-invert-reference-expected.html: Added.
  • accessibility/smart-invert-reference.html: Added. Ref to ensure invert and grayscale filters render as expected.
  • accessibility/smart-invert.html: Added. Computed expectatons of filter property text values.
  • platform/ios-wk2/TestExpectations: Runs on iOS WK2.
  • platform/mac-wk2/TestExpectations: Runs on Mac WK2.
Location:
trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r226823 r226825  
     12018-01-11  James Craig  <jcraig@apple.com>
     2
     3        AX: when invert colors is on, double-invert video elements in UserAgentStyleSheet
     4        https://bugs.webkit.org/show_bug.cgi?id=168447
     5        <rdar://problem/30559874>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Double-invert video when platform "invert colors" setting is enabled. Behavior matches
     10        current "Smart Invert" feature of Safari Reader on macOS/iOS and other iOS native apps.
     11
     12        * TestExpectations: Platform setting only available on Mac and iOS.
     13        * accessibility/smart-invert-expected.txt: Added.
     14        * accessibility/smart-invert-reference-expected.html: Added.
     15        * accessibility/smart-invert-reference.html: Added. Ref to ensure invert and grayscale filters render as expected.
     16        * accessibility/smart-invert.html: Added. Computed expectatons of filter property text values.
     17        * platform/ios-wk2/TestExpectations: Runs on iOS WK2.
     18        * platform/mac-wk2/TestExpectations: Runs on Mac WK2.
     19
    1202018-01-10  Ryosuke Niwa  <rniwa@webkit.org>
    221
  • trunk/LayoutTests/TestExpectations

    r226813 r226825  
    119119
    120120# These only run on Mac and iOS WK2
     121accessibility/smart-invert.html [ Skip ]
     122accessibility/smart-invert-reference.html [ Skip ]
    121123fast/media/mq-inverted-colors-live-update.html [ Skip ]
    122124fast/media/mq-inverted-colors-live-update-in-subframes.html [ Skip ]
  • trunk/LayoutTests/platform/ios-wk2/TestExpectations

    r226737 r226825  
    1616editing/selection/character-granularity-rect.html [ Pass ]
    1717
     18accessibility/smart-invert.html [ Pass ]
     19accessibility/smart-invert-reference.html [ Pass ]
    1820fast/media/mq-inverted-colors-live-update.html [ Pass ]
    1921fast/media/mq-inverted-colors-live-update-in-subframes.html [ Pass ]
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r226771 r226825  
    1414fast/events/autoscroll-main-document.html [ Pass ]
    1515
     16accessibility/smart-invert.html [ Pass ]
     17accessibility/smart-invert-reference.html [ Pass ]
    1618fast/media/mq-inverted-colors-live-update.html [ Pass ]
    1719fast/media/mq-inverted-colors-live-update-in-subframes.html [ Pass ]
  • trunk/Source/WebCore/ChangeLog

    r226824 r226825  
     12018-01-11  James Craig  <jcraig@apple.com>
     2
     3        AX: when invert colors is on, double-invert video elements in UserAgentStyleSheet
     4        https://bugs.webkit.org/show_bug.cgi?id=168447
     5        <rdar://problem/30559874>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Double-invert video when platform "invert colors" setting is enabled. Behavior matches
     10        current "Smart Invert" feature of Safari Reader on macOS/iOS and other iOS native apps.
     11
     12        Tests: accessibility/smart-invert-reference.html
     13               accessibility/smart-invert.html
     14
     15        * Modules/modern-media-controls/controls/media-controls.css:
     16        (@media (inverted-colors)):
     17        (:host):
     18        (picture):
     19        * css/html.css:
     20        (@media (inverted-colors)):
     21        (video):
     22
    1232018-01-11  Wenson Hsieh  <wenson_hsieh@apple.com>
    224
  • trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css

    r226541 r226825  
    128128    to   { opacity: 1 }
    129129}
     130
     131/* Default support for "Smart Invert" where all content color except media is inverted. */
     132@media (inverted-colors) {
     133    :host { filter: invert(100%); } /* WebKit native audio and video. */
     134    picture { filter: none; } /* Don't invert the control buttons. */
     135}
  • trunk/Source/WebCore/css/html.css

    r226541 r226825  
    12371237/* noscript is handled internally, as it depends on settings. */
    12381238
     1239/* Default support for "Smart Invert" where all content color except media is inverted. */
     1240@media (inverted-colors) {
     1241    video { filter: invert(100%); }  /* Only videos double-inverted for now. */
     1242}
Note: See TracChangeset for help on using the changeset viewer.