Title: [242400] trunk/Source/WebKit
Revision
242400
Author
tsav...@apple.com
Date
2019-03-04 16:09:15 -0800 (Mon, 04 Mar 2019)

Log Message

Unreviewed, rolling out r242396.

Found issue to be unrelated. reverting my rollout.

Reverted changeset:

"Unreviewed, rolling out r242222."
https://bugs.webkit.org/show_bug.cgi?id=193683
https://trac.webkit.org/changeset/242396

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (242399 => 242400)


--- trunk/Source/WebKit/ChangeLog	2019-03-04 23:51:22 UTC (rev 242399)
+++ trunk/Source/WebKit/ChangeLog	2019-03-05 00:09:15 UTC (rev 242400)
@@ -1,3 +1,15 @@
+2019-03-04  Truitt Savell  <tsav...@apple.com>
+
+        Unreviewed, rolling out r242396.
+
+        Found issue to be unrelated. reverting my rollout.
+
+        Reverted changeset:
+
+        "Unreviewed, rolling out r242222."
+        https://bugs.webkit.org/show_bug.cgi?id=193683
+        https://trac.webkit.org/changeset/242396
+
 2019-03-04  Jiewen Tan  <jiewen_...@apple.com>
 
         Unreviewed, a followup after r242336

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (242399 => 242400)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-03-04 23:51:22 UTC (rev 242399)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-03-05 00:09:15 UTC (rev 242400)
@@ -3303,7 +3303,9 @@
 {
     ASSERT(observer);
     WKWebView *webView = (__bridge WKWebView *)observer;
-    webView._page->hardwareKeyboardAvailabilityChanged();
+    auto keyboardIsAttached = GSEventIsHardwareKeyboardAttached();
+    webView._page->process().setKeyboardIsAttached(keyboardIsAttached);
+    webView._page->hardwareKeyboardAvailabilityChanged(keyboardIsAttached);
 }
 
 - (void)_windowDidRotate:(NSNotification *)notification

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (242399 => 242400)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.h	2019-03-04 23:51:22 UTC (rev 242399)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h	2019-03-05 00:09:15 UTC (rev 242400)
@@ -688,7 +688,7 @@
     void storeSelectionForAccessibility(bool);
     void startAutoscrollAtPosition(const WebCore::FloatPoint& positionInWindow);
     void cancelAutoscroll();
-    void hardwareKeyboardAvailabilityChanged();
+    void hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached);
     bool isScrollingOrZooming() const { return m_isScrollingOrZooming; }
     void requestEvasionRectsAboveSelection(CompletionHandler<void(const Vector<WebCore::FloatRect>&)>&&);
 #if ENABLE(DATA_INTERACTION)

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.h (242399 => 242400)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.h	2019-03-04 23:51:22 UTC (rev 242399)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.h	2019-03-05 00:09:15 UTC (rev 242400)
@@ -269,6 +269,11 @@
     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,
@@ -458,6 +463,10 @@
     ProcessThrottler::BackgroundActivityToken m_backgroundActivityTokenForFullscreenFormControls;
 #endif
 
+#if PLATFORM(IOS_FAMILY)
+    bool m_keyboardIsAttached { false };
+#endif
+
 #if PLATFORM(COCOA)
     MediaCaptureSandboxExtensions m_mediaCaptureSandboxExtensions { SandboxExtensionType::None };
 #endif

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (242399 => 242400)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-03-04 23:51:22 UTC (rev 242399)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-03-05 00:09:15 UTC (rev 242400)
@@ -4850,7 +4850,7 @@
                 if (_isChangingFocus)
                     return YES;
 
-                if (UIKeyboard.isInHardwareKeyboardMode)
+                if (_page->process().keyboardIsAttached())
                     return YES;
 #endif
             }

Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (242399 => 242400)


--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2019-03-04 23:51:22 UTC (rev 242399)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2019-03-05 00:09:15 UTC (rev 242400)
@@ -671,6 +671,8 @@
 {
     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()
@@ -1108,10 +1110,10 @@
         m_validationBubble->show();
 }
 
-void WebPageProxy::hardwareKeyboardAvailabilityChanged()
+void WebPageProxy::hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached)
 {
     updateCurrentModifierState();
-    m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(), m_pageID);
+    m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(keyboardIsAttached), m_pageID);
 }
 
 void WebPageProxy::requestEvasionRectsAboveSelection(CompletionHandler<void(const Vector<WebCore::FloatRect>&)>&& callback)

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (242399 => 242400)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-03-04 23:51:22 UTC (rev 242399)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-03-05 00:09:15 UTC (rev 242400)
@@ -937,7 +937,7 @@
     bool platformPrefersTextLegibilityBasedZoomScaling() const;
     const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
 
-    void hardwareKeyboardAvailabilityChanged();
+    void hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached);
 
     void updateStringForFind(const String&);
 #endif
@@ -1843,6 +1843,9 @@
     OptionSet<LayerTreeFreezeReason> m_LayerTreeFreezeReasons;
     bool m_isSuspended { false };
     bool m_needsFontAttributes { false };
+#if PLATFORM(IOS_FAMILY)
+    bool m_keyboardIsAttached { false };
+#endif
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in (242399 => 242400)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in	2019-03-04 23:51:22 UTC (rev 242399)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in	2019-03-05 00:09:15 UTC (rev 242400)
@@ -108,7 +108,7 @@
     StartAutoscrollAtPosition(WebCore::FloatPoint positionInWindow)
     CancelAutoscroll()
     RequestFocusedElementInformation(WebKit::CallbackID callbackID)
-    HardwareKeyboardAvailabilityChanged()
+    HardwareKeyboardAvailabilityChanged(bool keyboardIsAttached)
 #endif
 
     SetControlledByAutomation(bool controlled)

Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (242399 => 242400)


--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-03-04 23:51:22 UTC (rev 242399)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-03-05 00:09:15 UTC (rev 242400)
@@ -203,7 +203,7 @@
     bool needsLayout = !frame.view() || frame.view()->needsLayout();
     bool requiresPostLayoutData = frame.editor().hasComposition();
 #if !PLATFORM(IOSMAC)
-    requiresPostLayoutData |= [UIKeyboard isInHardwareKeyboardMode];
+    requiresPostLayoutData |= m_keyboardIsAttached;
 #endif
     if (shouldIncludePostLayoutData == IncludePostLayoutDataHint::No && needsLayout && !requiresPostLayoutData) {
         result.isMissingPostLayoutData = true;
@@ -3233,8 +3233,10 @@
     return String();
 }
 
-void WebPage::hardwareKeyboardAvailabilityChanged()
+void WebPage::hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached)
 {
+    m_keyboardIsAttached = keyboardIsAttached;
+
     if (auto* focusedFrame = m_page->focusController().focusedFrame())
         focusedFrame->eventHandler().capsLockStateMayHaveChanged();
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to