REGRESSION(225597): Can't select a text box or web view on a page when VO is on.
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Dec 2017 20:19:08 +0000 (20:19 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Dec 2017 20:19:08 +0000 (20:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=180756
<rdar://problem/35996158>

Reviewed by Brent Fulgham.

Source/WebCore:

No new tests.

* platform/mac/EventLoopMac.mm:
(WebCore::EventLoop::cycle):

Source/WebKit:

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::AccessibilityProcessSuspendedNotification):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::shouldLeakBoost):
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeProcess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225863 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/EventLoopMac.mm
Source/WebKit/ChangeLog
Source/WebKit/Platform/IPC/mac/ConnectionMac.mm
Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm
Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist
Source/WebKit/WebProcess/WebProcess.cpp

index 275f600..1996ce2 100644 (file)
@@ -1,3 +1,16 @@
+2017-12-13  Per Arne Vollan  <pvollan@apple.com>
+
+        REGRESSION(225597): Can't select a text box or web view on a page when VO is on.
+        https://bugs.webkit.org/show_bug.cgi?id=180756
+        <rdar://problem/35996158>
+
+        Reviewed by Brent Fulgham.
+
+        No new tests.
+
+        * platform/mac/EventLoopMac.mm:
+        (WebCore::EventLoop::cycle):
+
 2017-12-13  Antoine Quint  <graouts@apple.com>
 
         [Web Animations] Implement the "updating the finished state" procedure
index 8c98be2..8300445 100644 (file)
@@ -30,10 +30,12 @@ namespace WebCore {
 
 void EventLoop::cycle()
 {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     if (![NSApp isRunning]) {
         [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]];
         return;
     }
+#endif
     [NSApp setWindowsNeedUpdate:YES];
     if (NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny untilDate:[NSDate dateWithTimeIntervalSinceNow:0.05] inMode:NSDefaultRunLoopMode dequeue:YES])
         [NSApp sendEvent:event];
index 090b84e..8f96a61 100644 (file)
@@ -1,3 +1,19 @@
+2017-12-13  Per Arne Vollan  <pvollan@apple.com>
+
+        REGRESSION(225597): Can't select a text box or web view on a page when VO is on.
+        https://bugs.webkit.org/show_bug.cgi?id=180756
+        <rdar://problem/35996158>
+
+        Reviewed by Brent Fulgham.
+
+        * Platform/IPC/mac/ConnectionMac.mm:
+        (IPC::AccessibilityProcessSuspendedNotification):
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::shouldLeakBoost):
+        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::initializeProcess):
+
 2017-12-13  Brent Fulgham  <bfulgham@apple.com>
 
         [iOS] Further Trim WebContent Process sandbox
index 3d21e81..e7e15b0 100644 (file)
@@ -586,9 +586,11 @@ bool Connection::kill()
 static void AccessibilityProcessSuspendedNotification(bool suspended)
 {
 #if PLATFORM(MAC)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     // Calling _AXUIElementNotifyProcessSuspendStatus will crash if the NSApplication event loop is not running.
     if (![NSApp isRunning])
         return;
+#endif
     _AXUIElementNotifyProcessSuspendStatus(suspended ? AXSuspendStatusSuspended : AXSuspendStatusRunning);
 #elif PLATFORM(IOS)
     UIAccessibilityPostNotification(kAXPidStatusChangedNotification, @{ @"pid" : @(getpid()), @"suspended" : @(suspended) });
index d176bfc..2db6ba4 100644 (file)
@@ -76,9 +76,13 @@ static bool shouldLeakBoost(const ProcessLauncher::LaunchOptions& launchOptions)
     UNUSED_PARAM(launchOptions);
     return true;
 #else
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+    // Boost the WebContent process if the NSApplication run loop is not used.
+    if (launchOptions.processType == ProcessLauncher::ProcessType::Web)
+        return true;
+#endif
     // On Mac, leak a boost onto the NetworkProcess.
-    return launchOptions.processType == ProcessLauncher::ProcessType::Network
-        || launchOptions.processType == ProcessLauncher::ProcessType::Web;
+    return launchOptions.processType == ProcessLauncher::ProcessType::Network;
 #endif
 }
 
index 1f139fe..3e5deb9 100644 (file)
@@ -45,7 +45,7 @@
                <key>ServiceType</key>
                <string>Application</string>
                <key>RunLoopType</key>
-               <string>NSRunLoop</string>
+               <string>_NSApplicationMain</string>
                <key>_MultipleInstances</key>
                <true/>
                <key>_HighBitsASLR</key>
index 8294e38..099fa9d 100644 (file)
@@ -216,7 +216,7 @@ WebProcess::~WebProcess()
 
 void WebProcess::initializeProcess(const ChildProcessInitializationParameters& parameters)
 {
-#if PLATFORM(COCOA) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     // This call is needed when the WebProcess is not running the NSApplication event loop.
     // Otherwise, calling enableSandboxStyleFileQuarantine() will fail.
     launchServicesCheckIn();