Title: [187663] branches/safari-601.1-branch/Source/WebKit2
Revision
187663
Author
lforsch...@apple.com
Date
2015-07-31 11:22:47 -0700 (Fri, 31 Jul 2015)

Log Message

Merged r187530.  rdar://problem/21833987

Modified Paths

Diff

Modified: branches/safari-601.1-branch/Source/WebKit2/ChangeLog (187662 => 187663)


--- branches/safari-601.1-branch/Source/WebKit2/ChangeLog	2015-07-31 18:19:29 UTC (rev 187662)
+++ branches/safari-601.1-branch/Source/WebKit2/ChangeLog	2015-07-31 18:22:47 UTC (rev 187663)
@@ -1,5 +1,24 @@
 2015-07-31  Lucas Forschler  <lforsch...@apple.com>
 
+        Merge r187530
+
+    2015-07-28  Chris Fleizach  <cfleiz...@apple.com>
+
+            AX: iOS: VoiceOver hangs indefinitely when an JS alert appears
+            https://bugs.webkit.org/show_bug.cgi?id=147386
+
+            Reviewed by Anders Carlsson.
+
+            Support the iOS platform API to notify accessibility clients when the WebProcess is about to suspend (because of some modal dialog).
+            Luckily, we did all the hardwork for OSX a few years ago to support this paradigm.         
+
+            * Platform/IPC/mac/ConnectionMac.mm:
+            (IPC::AccessibilityProcessSuspendedNotification):
+            (IPC::Connection::willSendSyncMessage):
+            (IPC::Connection::didReceiveSyncReply):
+
+2015-07-31  Lucas Forschler  <lforsch...@apple.com>
+
         Merge r187522
 
     2015-07-28  Said Abou-Hallawa  <sabouhall...@apple.com>

Modified: branches/safari-601.1-branch/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm (187662 => 187663)


--- branches/safari-601.1-branch/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm	2015-07-31 18:19:29 UTC (rev 187662)
+++ branches/safari-601.1-branch/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm	2015-07-31 18:22:47 UTC (rev 187663)
@@ -39,8 +39,16 @@
 
 #if PLATFORM(IOS)
 #include "ProcessAssertion.h"
+#include <UIKit/UIAccessibility.h>
+
+#if __has_include(<AXRuntime/AXNotificationConstants.h>)
+#include <AXRuntime/AXNotificationConstants.h>
+#else
+#define kAXPidStatusChangedNotification 0
 #endif
 
+#endif
+
 #if __has_include(<HIServices/AccessibilityPriv.h>)
 #include <HIServices/AccessibilityPriv.h>
 #else
@@ -600,20 +608,27 @@
     return false;
 }
     
+static void AccessibilityProcessSuspendedNotification(bool suspended)
+{
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+    _AXUIElementNotifyProcessSuspendStatus(suspended ? AXSuspendStatusSuspended : AXSuspendStatusRunning);
+#elif PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
+    UIAccessibilityPostNotification(kAXPidStatusChangedNotification, @{ @"pid" : @(getpid()), @"suspended" : @(suspended) });
+#else
+    UNUSED_PARAM(suspended);
+#endif
+}
+    
 void Connection::willSendSyncMessage(unsigned flags)
 {
-#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     if ((flags & InformPlatformProcessWillSuspend) && WebCore::AXObjectCache::accessibilityEnabled())
-        _AXUIElementNotifyProcessSuspendStatus(AXSuspendStatusSuspended);
-#endif
+        AccessibilityProcessSuspendedNotification(true);
 }
 
 void Connection::didReceiveSyncReply(unsigned flags)
 {
-#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     if ((flags & InformPlatformProcessWillSuspend) && WebCore::AXObjectCache::accessibilityEnabled())
-        _AXUIElementNotifyProcessSuspendStatus(AXSuspendStatusRunning);
-#endif
+        AccessibilityProcessSuspendedNotification(false);
 }
 
 pid_t Connection::remoteProcessID() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to