Add the "force" option for inverted-colors and monochrome.
<rdar://problem/29338292>
Created attachment 295188 [details] Patch
Comment on attachment 295188 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295188&action=review > Source/WebCore/css/MediaQueryEvaluator.cpp:264 > + bool isMonochrome = screenIsMonochrome(frame.mainFrame().view()); I suggest putting this inside a conditional below so it doesn't have to be called. > Source/WebCore/css/MediaQueryEvaluator.cpp:280 > + if (frame.settings().forcedColorsAreInvertedAccessibilityValue() == Settings::ForcedAccessibilityValue::On) Ditto. > Source/WebCore/css/MediaQueryEvaluator.cpp:675 > bool userPrefersReducedMotion = platformTheme()->userPrefersReducedMotion(); Ditto. > Source/WebCore/testing/InternalSettings.idl:97 > + attribute ForcedAccessibilityValue forcedColorsAreInvertedAccessibilityValue; > + attribute ForcedAccessibilityValue forcedDisplayIsMonochromeAccessibilityValue; > + attribute ForcedAccessibilityValue forcedPrefersReducedMotionAccessibilityValue; It's pretty awesome you don't need to make SPI for this. It keeps the patch much simpler than it would otherwise be.
Created attachment 295193 [details] Patch
Committed r208899: <http://trac.webkit.org/changeset/208899>