WebKit Bugzilla
Attachment 359772 Details for
Bug 193683
: [iOS] Move calls to [UIKeyboard isInHardwareKeyboardMode] to the UI process.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193683-20190122142359.patch (text/plain), 6.28 KB, created by
Per Arne Vollan
on 2019-01-22 14:24:00 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2019-01-22 14:24:00 PST
Size:
6.28 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 240296) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,28 @@ >+2019-01-22 Per Arne Vollan <pvollan@apple.com> >+ >+ [iOS] Move calls to [UIKeyboard isInHardwareKeyboardMode] to the UI process. >+ https://bugs.webkit.org/show_bug.cgi?id=193683 >+ <rdar://problem/45186046> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When a keyboard is attached/deattached or the application becomes foreground, send a message from >+ the UI process to the WebContent process, notifying whether a keyboard is attached or not. In the >+ WebContent process, swizzle [UIKeyboard isInHardwareKeyboardMode], in order to avoid changing the >+ existing calls, and since the test framework already swizzle this method. >+ >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (hardwareKeyboardAvailabilityChangedCallback): >+ * UIProcess/WebPageProxy.h: >+ * UIProcess/ios/WebPageProxyIOS.mm: >+ (WebKit::WebPageProxy::applicationWillEnterForeground): >+ (WebKit::WebPageProxy::hardwareKeyboardAvailabilityChanged): >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebPage/WebPage.messages.in: >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::overrideIsInHardwareKeyboardMode): >+ (WebKit::WebPage::hardwareKeyboardAvailabilityChanged): >+ > 2019-01-22 Michael Catanzaro <mcatanzaro@igalia.com> > > Another build fix after r240292 >Index: Source/WebKit/UIProcess/WebPageProxy.h >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.h (revision 240268) >+++ Source/WebKit/UIProcess/WebPageProxy.h (working copy) >@@ -677,7 +677,7 @@ public: > void storeSelectionForAccessibility(bool); > void startAutoscrollAtPosition(const WebCore::FloatPoint& positionInWindow); > void cancelAutoscroll(); >- void hardwareKeyboardAvailabilityChanged(); >+ void hardwareKeyboardAvailabilityChanged(bool keyboardAttached); > #if ENABLE(DATA_INTERACTION) > void didHandleStartDataInteractionRequest(bool started); > void didHandleAdditionalDragItemsRequest(bool added); >Index: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (revision 240268) >+++ Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (working copy) >@@ -3235,7 +3235,7 @@ static void hardwareKeyboardAvailability > { > ASSERT(observer); > WKWebView *webView = (__bridge WKWebView *)observer; >- webView._page->hardwareKeyboardAvailabilityChanged(); >+ webView._page->hardwareKeyboardAvailabilityChanged([UIKeyboard isInHardwareKeyboardMode]); > } > > - (void)_windowDidRotate:(NSNotification *)notification >Index: Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >=================================================================== >--- Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (revision 240268) >+++ Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (working copy) >@@ -672,6 +672,8 @@ void WebPageProxy::applicationWillEnterF > { > bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock]; > m_process->send(Messages::WebPage::ApplicationWillEnterForeground(isSuspendedUnderLock), m_pageID); >+ bool keyboardAttached = [UIKeyboard isInHardwareKeyboardMode]; >+ m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(keyboardAttached), m_pageID); > } > > void WebPageProxy::applicationWillResignActive() >@@ -1109,10 +1111,10 @@ void WebPageProxy::setIsScrollingOrZoomi > m_validationBubble->show(); > } > >-void WebPageProxy::hardwareKeyboardAvailabilityChanged() >+void WebPageProxy::hardwareKeyboardAvailabilityChanged(bool keyboardAttached) > { > updateCurrentModifierState(); >- m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(), m_pageID); >+ m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(keyboardAttached), m_pageID); > } > > #if ENABLE(DATA_INTERACTION) >Index: Source/WebKit/WebProcess/WebPage/WebPage.h >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.h (revision 240268) >+++ Source/WebKit/WebProcess/WebPage/WebPage.h (working copy) >@@ -941,7 +941,7 @@ public: > bool platformPrefersTextLegibilityBasedZoomScaling() const; > const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; } > >- void hardwareKeyboardAvailabilityChanged(); >+ void hardwareKeyboardAvailabilityChanged(bool keyboardAttached); > > void updateStringForFind(const String&); > #endif >Index: Source/WebKit/WebProcess/WebPage/WebPage.messages.in >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.messages.in (revision 240268) >+++ Source/WebKit/WebProcess/WebPage/WebPage.messages.in (working copy) >@@ -107,7 +107,7 @@ messages -> WebPage LegacyReceiver { > StartAutoscrollAtPosition(WebCore::FloatPoint positionInWindow) > CancelAutoscroll() > RequestFocusedElementInformation(WebKit::CallbackID callbackID) >- HardwareKeyboardAvailabilityChanged() >+ HardwareKeyboardAvailabilityChanged(bool keyboardAttached) > #endif > > SetControlledByAutomation(bool controlled) >Index: Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >=================================================================== >--- Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (revision 240268) >+++ Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (working copy) >@@ -3119,10 +3119,20 @@ String WebPage::platformUserAgent(const > return String(); > } > >-void WebPage::hardwareKeyboardAvailabilityChanged() >+static bool sKeyboardAttached = false; >+ >+static BOOL overrideIsInHardwareKeyboardMode() >+{ >+ return sKeyboardAttached; >+} >+ >+void WebPage::hardwareKeyboardAvailabilityChanged(bool keyboardAttached) > { > if (auto* focusedFrame = m_page->focusController().focusedFrame()) > focusedFrame->eventHandler().capsLockStateMayHaveChanged(); >+ >+ sKeyboardAttached = keyboardAttached; >+ method_setImplementation(class_getClassMethod([UIKeyboard class], @selector(isInHardwareKeyboardMode)), reinterpret_cast<IMP>(overrideIsInHardwareKeyboardMode)); > } > > void WebPage::updateStringForFind(const String& findString)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193683
:
359772
|
359802
|
359920
|
360902
|
360912
|
361064
|
363007
|
363107
|
363119
|
363246
|
363249