Unreviewed, rolling out r242222.
authortsavell@apple.com <tsavell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2019 23:11:58 +0000 (23:11 +0000)
committertsavell@apple.com <tsavell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2019 23:11:58 +0000 (23:11 +0000)
Broke internal debug testing

Reverted changeset:

"[iOS] Move calls to [UIKeyboard isInHardwareKeyboardMode] to
the UI process."
https://bugs.webkit.org/show_bug.cgi?id=193683
https://trac.webkit.org/changeset/242222

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebProcessProxy.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

index 694ee62..4544814 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-04  Truitt Savell  <tsavell@apple.com>
+
+        Unreviewed, rolling out r242222.
+
+        Broke internal debug testing
+
+        Reverted changeset:
+
+        "[iOS] Move calls to [UIKeyboard isInHardwareKeyboardMode] to
+        the UI process."
+        https://bugs.webkit.org/show_bug.cgi?id=193683
+        https://trac.webkit.org/changeset/242222
+
 2019-03-04  Brent Fulgham  <bfulgham@apple.com>
 
         Unreviewed build fix after r242378
index 7965a1e..0420ebc 100644 (file)
@@ -3303,9 +3303,7 @@ static void hardwareKeyboardAvailabilityChangedCallback(CFNotificationCenterRef,
 {
     ASSERT(observer);
     WKWebView *webView = (__bridge WKWebView *)observer;
-    auto keyboardIsAttached = GSEventIsHardwareKeyboardAttached();
-    webView._page->process().setKeyboardIsAttached(keyboardIsAttached);
-    webView._page->hardwareKeyboardAvailabilityChanged(keyboardIsAttached);
+    webView._page->hardwareKeyboardAvailabilityChanged();
 }
 
 - (void)_windowDidRotate:(NSNotification *)notification
index 2155d14..591a319 100644 (file)
@@ -688,7 +688,7 @@ public:
     void storeSelectionForAccessibility(bool);
     void startAutoscrollAtPosition(const WebCore::FloatPoint& positionInWindow);
     void cancelAutoscroll();
-    void hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached);
+    void hardwareKeyboardAvailabilityChanged();
     bool isScrollingOrZooming() const { return m_isScrollingOrZooming; }
     void requestEvasionRectsAboveSelection(CompletionHandler<void(const Vector<WebCore::FloatRect>&)>&&);
 #if ENABLE(DATA_INTERACTION)
index e3d8f8f..02ff046 100644 (file)
@@ -269,11 +269,6 @@ public:
     void sendProcessDidResume() override;
     void didSetAssertionState(AssertionState) override;
 
-#if PLATFORM(IOS_FAMILY)
-    void setKeyboardIsAttached(bool keyboardIsAttached) { m_keyboardIsAttached = keyboardIsAttached; }
-    bool keyboardIsAttached() const { return m_keyboardIsAttached; }
-#endif
-
 #if PLATFORM(COCOA)
     enum SandboxExtensionType : uint32_t {
         None = 0,
@@ -463,10 +458,6 @@ private:
     ProcessThrottler::BackgroundActivityToken m_backgroundActivityTokenForFullscreenFormControls;
 #endif
 
-#if PLATFORM(IOS_FAMILY)
-    bool m_keyboardIsAttached { false };
-#endif
-
 #if PLATFORM(COCOA)
     MediaCaptureSandboxExtensions m_mediaCaptureSandboxExtensions { SandboxExtensionType::None };
 #endif
index 37b3620..1ce4ef5 100644 (file)
@@ -4850,7 +4850,7 @@ static const double minimumFocusedElementAreaForSuppressingSelectionAssistant =
                 if (_isChangingFocus)
                     return YES;
 
-                if (_page->process().keyboardIsAttached())
+                if (UIKeyboard.isInHardwareKeyboardMode)
                     return YES;
 #endif
             }
index 6d185fd..44f4b25 100644 (file)
@@ -671,8 +671,6 @@ void WebPageProxy::applicationWillEnterForeground()
 {
     bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock];
     m_process->send(Messages::WebPage::ApplicationWillEnterForeground(isSuspendedUnderLock), m_pageID);
-    m_process->setKeyboardIsAttached([UIKeyboard isInHardwareKeyboardMode]);
-    m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(m_process->keyboardIsAttached()), m_pageID);
 }
 
 void WebPageProxy::applicationWillResignActive()
@@ -1110,10 +1108,10 @@ void WebPageProxy::setIsScrollingOrZooming(bool isScrollingOrZooming)
         m_validationBubble->show();
 }
 
-void WebPageProxy::hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached)
+void WebPageProxy::hardwareKeyboardAvailabilityChanged()
 {
     updateCurrentModifierState();
-    m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(keyboardIsAttached), m_pageID);
+    m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(), m_pageID);
 }
 
 void WebPageProxy::requestEvasionRectsAboveSelection(CompletionHandler<void(const Vector<WebCore::FloatRect>&)>&& callback)
index 26d7a99..4d9247a 100644 (file)
@@ -937,7 +937,7 @@ public:
     bool platformPrefersTextLegibilityBasedZoomScaling() const;
     const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
 
-    void hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached);
+    void hardwareKeyboardAvailabilityChanged();
 
     void updateStringForFind(const String&);
 #endif
@@ -1843,9 +1843,6 @@ private:
     OptionSet<LayerTreeFreezeReason> m_LayerTreeFreezeReasons;
     bool m_isSuspended { false };
     bool m_needsFontAttributes { false };
-#if PLATFORM(IOS_FAMILY)
-    bool m_keyboardIsAttached { false };
-#endif
 };
 
 } // namespace WebKit
index cb0b570..64950a9 100644 (file)
@@ -108,7 +108,7 @@ messages -> WebPage LegacyReceiver {
     StartAutoscrollAtPosition(WebCore::FloatPoint positionInWindow)
     CancelAutoscroll()
     RequestFocusedElementInformation(WebKit::CallbackID callbackID)
-    HardwareKeyboardAvailabilityChanged(bool keyboardIsAttached)
+    HardwareKeyboardAvailabilityChanged()
 #endif
 
     SetControlledByAutomation(bool controlled)
index 42ee757..f2e9a2e 100644 (file)
@@ -203,7 +203,7 @@ void WebPage::platformEditorState(Frame& frame, EditorState& result, IncludePost
     bool needsLayout = !frame.view() || frame.view()->needsLayout();
     bool requiresPostLayoutData = frame.editor().hasComposition();
 #if !PLATFORM(IOSMAC)
-    requiresPostLayoutData |= m_keyboardIsAttached;
+    requiresPostLayoutData |= [UIKeyboard isInHardwareKeyboardMode];
 #endif
     if (shouldIncludePostLayoutData == IncludePostLayoutDataHint::No && needsLayout && !requiresPostLayoutData) {
         result.isMissingPostLayoutData = true;
@@ -3233,10 +3233,8 @@ String WebPage::platformUserAgent(const URL&) const
     return String();
 }
 
-void WebPage::hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached)
+void WebPage::hardwareKeyboardAvailabilityChanged()
 {
-    m_keyboardIsAttached = keyboardIsAttached;
-
     if (auto* focusedFrame = m_page->focusController().focusedFrame())
         focusedFrame->eventHandler().capsLockStateMayHaveChanged();
 }