Title: [241959] branches/safari-608.1.5.1-branch/Source

Diff

Modified: branches/safari-608.1.5.1-branch/Source/WebCore/ChangeLog (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebCore/ChangeLog	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebCore/ChangeLog	2019-02-22 20:31:17 UTC (rev 241959)
@@ -1,3 +1,7 @@
+2019-02-22  Babak Shafiei  <[email protected]>
+
+        Revert r241721. rdar://problem/47677951
+
 2019-02-19  Alan Coon  <[email protected]>
 
         Cherry-pick r241721. rdar://problem/47677951

Modified: branches/safari-608.1.5.1-branch/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm	2019-02-22 20:31:17 UTC (rev 241959)
@@ -259,19 +259,15 @@
     axShouldRepostNotificationsForTests = value;
 }
 
-static void AXPostNotificationWithUserInfo(AccessibilityObjectWrapper *object, NSString *notification, id userInfo, bool skipSystemNotification = false)
+static void AXPostNotificationWithUserInfo(AccessibilityObjectWrapper *object, NSString *notification, id userInfo)
 {
     if (id associatedPluginParent = [object associatedPluginParent])
         object = associatedPluginParent;
-
+    
+    NSAccessibilityPostNotificationWithUserInfo(object, notification, userInfo);
     // To simplify monitoring for notifications in tests, repost as a simple NSNotification instead of forcing test infrastucture to setup an IPC client and do all the translation between WebCore types and platform specific IPC types and back
     if (UNLIKELY(axShouldRepostNotificationsForTests))
         [object accessibilityPostedNotification:notification userInfo:userInfo];
-
-    if (skipSystemNotification)
-        return;
-
-    NSAccessibilityPostNotificationWithUserInfo(object, notification, userInfo);
 }
 
 void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotification notification)
@@ -278,8 +274,7 @@
 {
     if (!obj)
         return;
-
-    bool skipSystemNotification = false;
+    
     // Some notifications are unique to Safari and do not have NSAccessibility equivalents.
     NSString *macNotification;
     switch (notification) {
@@ -307,11 +302,6 @@
             break;
         case AXLoadComplete:
             macNotification = @"AXLoadComplete";
-            // Frame loading events are handled by the UIProcess on macOS to improve reliability.
-            // On macOS, before notifications are allowed by AppKit to be sent to clients, you need to have a client (e.g. VoiceOver)
-            // register for that notification. Because these new processes appear before VO has a chance to register, it will often
-            // miss AXLoadComplete notifications. By moving them to the UIProcess, we can eliminate that issue.
-            skipSystemNotification = true;
             break;
         case AXInvalidStatusChanged:
             macNotification = @"AXInvalidStatusChanged";
@@ -369,7 +359,7 @@
     ASSERT([obj->wrapper() accessibilityIsIgnored] || true);
     ALLOW_DEPRECATED_DECLARATIONS_END
 
-    AXPostNotificationWithUserInfo(obj->wrapper(), macNotification, nil, skipSystemNotification);
+    AXPostNotificationWithUserInfo(obj->wrapper(), macNotification, nil);
 }
 
 void AXObjectCache::postTextStateChangePlatformNotification(AccessibilityObject* object, const AXTextStateChangeIntent& intent, const VisibleSelection& selection)

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/ChangeLog (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebKit/ChangeLog	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/ChangeLog	2019-02-22 20:31:17 UTC (rev 241959)
@@ -1,5 +1,9 @@
 2019-02-22  Babak Shafiei  <[email protected]>
 
+        Revert r241721. rdar://problem/47677951
+
+2019-02-22  Babak Shafiei  <[email protected]>
+
         Revert r241752. rdar://problem/48055151
 
 2019-02-19  Kocsen Chung  <[email protected]>

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/UIProcess/mac/PageClientImplMac.mm (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebKit/UIProcess/mac/PageClientImplMac.mm	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/UIProcess/mac/PageClientImplMac.mm	2019-02-22 20:31:17 UTC (rev 241959)
@@ -89,8 +89,6 @@
 #include <WebCore/WebMediaSessionManager.h>
 #endif
 
-static NSString * const kAXLoadCompleteNotification = @"AXLoadComplete";
-
 @interface NSApplication (WebNSApplicationDetails)
 - (NSCursor *)_cursorRectCursor;
 @end
@@ -832,8 +830,6 @@
 {
     if (auto gestureController = m_impl->gestureController())
         gestureController->didFinishLoadForMainFrame();
-
-    NSAccessibilityPostNotification(NSAccessibilityUnignoredAncestor(m_view), kAXLoadCompleteNotification);
 }
 
 void PageClientImpl::didFailLoadForMainFrame()
@@ -840,8 +836,6 @@
 {
     if (auto gestureController = m_impl->gestureController())
         gestureController->didFailLoadForMainFrame();
-
-    NSAccessibilityPostNotification(NSAccessibilityUnignoredAncestor(m_view), kAXLoadCompleteNotification);
 }
 
 void PageClientImpl::didSameDocumentNavigationForMainFrame(SameDocumentNavigationType type)

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm	2019-02-22 20:31:17 UTC (rev 241959)
@@ -183,12 +183,6 @@
     return dictionaryPopupInfo;
 }
 
-void WebPage::accessibilityTransferRemoteToken(RetainPtr<NSData> remoteToken)
-{
-    IPC::DataReference dataToken = IPC::DataReference(reinterpret_cast<const uint8_t*>([remoteToken bytes]), [remoteToken length]);
-    send(Messages::WebPageProxy::RegisterWebProcessAccessibilityToken(dataToken));
-}
-
 } // namespace WebKit
 
 #endif // PLATFORM(COCOA)

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2019-02-22 20:31:17 UTC (rev 241959)
@@ -710,8 +710,6 @@
         setActivityState(parameters.activityState, ActivityStateChangeAsynchronous, Vector<CallbackID>());
     if (m_layerHostingMode != parameters.layerHostingMode)
         setLayerHostingMode(parameters.layerHostingMode);
-
-    platformReinitialize();
 }
 
 void WebPage::updateThrottleState()

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-02-22 20:31:17 UTC (rev 241959)
@@ -1155,7 +1155,6 @@
     uint64_t messageSenderDestinationID() override;
 
     void platformInitialize();
-    void platformReinitialize();
     void platformDetach();
     void platformEditorState(WebCore::Frame&, EditorState& result, IncludePostLayoutDataHint) const;
     void sendEditorStateUpdate();
@@ -1450,8 +1449,6 @@
 
 #if PLATFORM(COCOA)
     void requestActiveNowPlayingSessionInfo(CallbackID);
-    RetainPtr<NSData> accessibilityRemoteTokenData() const;
-    void accessibilityTransferRemoteToken(RetainPtr<NSData>);
 #endif
 
     void setShouldDispatchFakeMouseMoveEvents(bool dispatch) { m_shouldDispatchFakeMouseMoveEvents = dispatch; }

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp	2019-02-22 20:31:17 UTC (rev 241959)
@@ -67,10 +67,6 @@
 #endif
 }
 
-void WebPage::platformReinitialize()
-{
-}
-
 void WebPage::platformDetach()
 {
 }

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-02-22 20:31:17 UTC (rev 241959)
@@ -141,20 +141,12 @@
 {
     m_mockAccessibilityElement = adoptNS([[WKAccessibilityWebPageObject alloc] init]);
     [m_mockAccessibilityElement setWebPage:this];
-
-    accessibilityTransferRemoteToken(accessibilityRemoteTokenData());
+    
+    NSData *remoteToken = newAccessibilityRemoteToken([NSUUID UUID]);
+    IPC::DataReference dataToken = IPC::DataReference(reinterpret_cast<const uint8_t*>([remoteToken bytes]), [remoteToken length]);
+    send(Messages::WebPageProxy::RegisterWebProcessAccessibilityToken(dataToken));
 }
 
-void WebPage::platformReinitialize()
-{
-    accessibilityTransferRemoteToken(accessibilityRemoteTokenData());
-}
-
-RetainPtr<NSData> WebPage::accessibilityRemoteTokenData() const
-{
-    return newAccessibilityRemoteToken([NSUUID UUID]);
-}
-
 static void computeEditableRootHasContentAndPlainText(const VisibleSelection& selection, EditorState::PostLayoutData& data)
 {
     data.hasContent = false;

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm	2019-02-22 20:31:17 UTC (rev 241959)
@@ -111,22 +111,14 @@
     if ([mockAccessibilityElement respondsToSelector:@selector(accessibilitySetPresenterProcessIdentifier:)])
         [(id)mockAccessibilityElement accessibilitySetPresenterProcessIdentifier:pid];
     [mockAccessibilityElement setWebPage:this];
+
+    // send data back over
+    NSData* remoteToken = [NSAccessibilityRemoteUIElement remoteTokenForLocalUIElement:mockAccessibilityElement];
+    IPC::DataReference dataToken = IPC::DataReference(reinterpret_cast<const uint8_t*>([remoteToken bytes]), [remoteToken length]);
+    send(Messages::WebPageProxy::RegisterWebProcessAccessibilityToken(dataToken));
     m_mockAccessibilityElement = mockAccessibilityElement;
-
-    accessibilityTransferRemoteToken(accessibilityRemoteTokenData());
 }
 
-void WebPage::platformReinitialize()
-{
-    accessibilityTransferRemoteToken(accessibilityRemoteTokenData());
-}
-
-RetainPtr<NSData> WebPage::accessibilityRemoteTokenData() const
-{
-    ASSERT(m_mockAccessibilityElement);
-    return [NSAccessibilityRemoteUIElement remoteTokenForLocalUIElement:m_mockAccessibilityElement.get()];
-}
-
 void WebPage::platformDetach()
 {
     [m_mockAccessibilityElement setWebPage:nullptr];

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp	2019-02-22 20:31:17 UTC (rev 241959)
@@ -55,10 +55,6 @@
 {
 }
 
-void WebPage::platformReinitialize()
-{
-}
-
 void WebPage::platformDetach()
 {
 }

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp (241958 => 241959)


--- branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp	2019-02-22 20:31:13 UTC (rev 241958)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp	2019-02-22 20:31:17 UTC (rev 241959)
@@ -39,10 +39,6 @@
 {
 }
 
-void WebPage::platformReinitialize()
-{
-}
-
 void WebPage::platformDetach()
 {
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to