Summary: | AX: "(inverted-colors)" media query only matches on page reload; should match on change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | James Craig <jcraig> | ||||||||
Component: | Accessibility | Assignee: | Dean Jackson <dino> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | dino, jcraig, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 168491 | ||||||||||
Attachments: |
|
Description
James Craig
2016-10-17 13:56:17 PDT
Created attachment 291870 [details]
test case
I commented in radar, but I'll get to this in a couple of weeks. I'll fix this, monochrome, and prefers-reduced-motion at the same time. Created attachment 295203 [details]
Patch
Created attachment 295215 [details]
Patch
Comment on attachment 295215 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295215&action=review > Source/WebCore/page/Page.cpp:2072 > + auto* styleResolver = document->styleScope().resolverIfExists(); > + if (styleResolver && styleResolver->hasMediaQueriesAffectedByAccessibilitySettingsChange()) { > + LOG(Layout, "hasMediaQueriesAffectedByAccessibilitySettingsChange, enqueueing style recalc"); > + document->styleScope().didChangeStyleSheetEnvironment(); > + // FIXME: This instrumentation event is not strictly accurate since cached media query results do not persist across StyleResolver rebuilds. > + InspectorInstrumentation::mediaQueryResultChanged(*document); Don't you need to do this for all subframes? > Tools/TestRunnerShared/UIScriptContext/UIScriptController.h:55 > + void simulateAccessibilitySettingsChangeNotification(JSValueRef callback); Do you want to make it possible to test individual settings? > Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:78 > + [webView _doAfterNextPresentationUpdate: ^ { Ignore the style checker. ^{ > Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm:101 > + [webView _doAfterNextPresentationUpdate: ^ { Ignore the style checker. ^{ Comment on attachment 295215 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295215&action=review >> Source/WebCore/page/Page.cpp:2072 >> + InspectorInstrumentation::mediaQueryResultChanged(*document); > > Don't you need to do this for all subframes? Fixed. >> Tools/TestRunnerShared/UIScriptContext/UIScriptController.h:55 >> + void simulateAccessibilitySettingsChangeNotification(JSValueRef callback); > > Do you want to make it possible to test individual settings? I can do that on iOS, but macOS has a single notification for all Accessibility changes. Committed r208915: <http://trac.webkit.org/changeset/208915> |