WebKit Bugzilla
Attachment 340104 Details for
Bug 185515
: REGRESSION(r230323): UIProcess needs to notify WebContent process of Accessibility setting changes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-185515-20180510105427.patch (text/plain), 5.39 KB, created by
Brent Fulgham
on 2018-05-10 10:54:27 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Brent Fulgham
Created:
2018-05-10 10:54:27 PDT
Size:
5.39 KB
patch
obsolete
>Subversion Revision: 231644 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 90ca7af004f6cde3f5acc81490d1e2893f71aac9..c0c4aa195e9272686067732ff91c9c9f1cf1dec8 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,26 @@ >+2018-05-10 Brent Fulgham <bfulgham@apple.com> >+ >+ REGRESSION(r230323): UIProcess needs to notify WebContent process of Accessibility setting changes >+ https://bugs.webkit.org/show_bug.cgi?id=185515 >+ <rdar://problem/39627764> >+ >+ Reviewed by Chris Fleizach. >+ >+ The UIProcess needs to register for relevant Accessibility preference updates so that it can notify the >+ WebContent processes that screen properties have changed. >+ >+ This is represented by NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification. >+ >+ Tested manually with the Accessibility preferences pane. >+ >+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm: >+ (WebKit::WebProcessPool::registerNotificationObservers): Add notification observer. When the notification >+ is received, call 'screenPropertiesStateChanged' to message the information to the WebContent processes. >+ (WebKit::WebProcessPool::unregisterNotificationObservers): Clean up observer. >+ * UIProcess/WebProcessPool.cpp: >+ (WebKit::WebProcessPool::screenPropertiesStateChanged): Added helper function. >+ * UIProcess/WebProcessPool.h: >+ > 2018-05-09 Carlos Garcia Campos <cgarcia@igalia.com> > > WebDriver: implement advance user interactions >diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >index 3b67d3dd6c608cdf40450b52cbb11de0707d6b80..2f8e38b6995424dff1e7fdf0eec5aa636e43992b 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >@@ -561,11 +561,14 @@ void WebProcessPool::registerNotificationObservers() > textCheckerStateChanged(); > }]; > >+ m_accessibilityDisplayOptionsNotificationObserver = [[NSWorkspace.sharedWorkspace notificationCenter] addObserverForName:NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) { >+ screenPropertiesStateChanged(); >+ }]; >+ > #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 > m_scrollerStyleNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSPreferredScrollerStyleDidChangeNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) { > auto scrollbarStyle = [NSScroller preferredScrollerStyle]; >- for (auto& processPool : WebKit::WebProcessPool::allProcessPools()) >- processPool->sendToAllProcesses(Messages::WebProcess::ScrollerStylePreferenceChanged(scrollbarStyle)); >+ sendToAllProcesses(Messages::WebProcess::ScrollerStylePreferenceChanged(scrollbarStyle)); > }]; > #endif > >@@ -580,6 +583,7 @@ void WebProcessPool::unregisterNotificationObservers() > [[NSNotificationCenter defaultCenter] removeObserver:m_automaticSpellingCorrectionNotificationObserver.get()]; > [[NSNotificationCenter defaultCenter] removeObserver:m_automaticQuoteSubstitutionNotificationObserver.get()]; > [[NSNotificationCenter defaultCenter] removeObserver:m_automaticDashSubstitutionNotificationObserver.get()]; >+ [[NSWorkspace.sharedWorkspace notificationCenter] removeObserver:m_accessibilityDisplayOptionsNotificationObserver.get()]; > #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 > [[NSNotificationCenter defaultCenter] removeObserver:m_scrollerStyleNotificationObserver.get()]; > #endif >diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp >index 0ddd8eab4afc804ba7aef5ff097b28d18563f9e5..11cc8bd5c2ceaf5132c1bfa498e8fa9129e620b3 100644 >--- a/Source/WebKit/UIProcess/WebProcessPool.cpp >+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp >@@ -416,6 +416,14 @@ void WebProcessPool::textCheckerStateChanged() > sendToAllProcesses(Messages::WebProcess::SetTextCheckerState(TextChecker::state())); > } > >+void WebProcessPool::screenPropertiesStateChanged() >+{ >+#if PLATFORM(MAC) >+ auto screenProperties = WebCore::getScreenProperties(); >+ sendToAllProcesses(Messages::WebProcess::SetScreenProperties(screenProperties.first, screenProperties.second)); >+#endif >+} >+ > NetworkProcessProxy& WebProcessPool::ensureNetworkProcess(WebsiteDataStore* withWebsiteDataStore) > { > if (m_networkProcess) { >diff --git a/Source/WebKit/UIProcess/WebProcessPool.h b/Source/WebKit/UIProcess/WebProcessPool.h >index 70c45413686069ccc94330e60b6f2e86ea557d18..01f976b631f621f629d3ce6731c8101c1cd8ba9d 100644 >--- a/Source/WebKit/UIProcess/WebProcessPool.h >+++ b/Source/WebKit/UIProcess/WebProcessPool.h >@@ -453,6 +453,8 @@ public: > void unregisterSuspendedPageProxy(SuspendedPageProxy&); > void didReachGoodTimeToPrewarm(); > >+ void screenPropertiesStateChanged(); >+ > private: > void platformInitialize(); > >@@ -603,6 +605,7 @@ private: > RetainPtr<NSObject> m_automaticSpellingCorrectionNotificationObserver; > RetainPtr<NSObject> m_automaticQuoteSubstitutionNotificationObserver; > RetainPtr<NSObject> m_automaticDashSubstitutionNotificationObserver; >+ RetainPtr<NSObject> m_accessibilityDisplayOptionsNotificationObserver; > #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 > RetainPtr<NSObject> m_scrollerStyleNotificationObserver; > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185515
:
340099
| 340104