WebKit Bugzilla
Attachment 360912 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-20190201153014.patch (text/plain), 8.00 KB, created by
Per Arne Vollan
on 2019-02-01 15:30:15 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2019-02-01 15:30:15 PST
Size:
8.00 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 240877) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,27 @@ >+2019-02-01 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 >+ >+ 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. >+ >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (hardwareKeyboardAvailabilityChangedCallback): >+ * UIProcess/WebPageProxy.h: >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]): >+ * 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::WebPage::platformEditorState const): >+ (WebKit::WebPage::hardwareKeyboardAvailabilityChanged): >+ > 2019-02-01 Antoine Quint <graouts@apple.com> > > Dispatch pointercancel events when content is panned or zoomed on iOS >Index: Source/WebKit/UIProcess/WebPageProxy.h >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.h (revision 240875) >+++ 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 keyboardIsAttached); > bool isScrollingOrZooming() const { return m_isScrollingOrZooming; } > #if ENABLE(DATA_INTERACTION) > void didHandleDragStartRequest(bool started); >Index: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (revision 240875) >+++ Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (working copy) >@@ -3279,7 +3279,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/WKContentViewInteraction.mm >=================================================================== >--- Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (revision 240875) >+++ Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (working copy) >@@ -4610,6 +4610,8 @@ static bool isAssistableInputType(WebKit > > static const double minimumFocusedElementAreaForSuppressingSelectionAssistant = 4; > >+extern bool keyboardIsAttached; >+ > - (void)_elementDidFocus:(const WebKit::FocusedElementInformation&)information userIsInteracting:(BOOL)userIsInteracting blurPreviousNode:(BOOL)blurPreviousNode changingActivityState:(BOOL)changingActivityState userObject:(NSObject <NSSecureCoding> *)userObject > { > SetForScope<BOOL> isChangingFocusForScope { _isChangingFocus, hasFocusedElement(_focusedElementInformation) }; >@@ -4653,7 +4655,7 @@ - (void)_elementDidFocus:(const WebKit:: > || (_isChangingFocus && ![_focusedFormControlView isHidden]) > #else > || _isChangingFocus >- || [UIKeyboard isInHardwareKeyboardMode] >+ || keyboardIsAttached > #endif > #if ENABLE(DRAG_SUPPORT) > || _dragDropInteractionState.isPerformingDrop() >Index: Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >=================================================================== >--- Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (revision 240875) >+++ Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (working copy) >@@ -62,6 +62,8 @@ > #import <wtf/text/WTFString.h> > #endif > >+bool keyboardIsAttached; >+ > namespace WebKit { > using namespace WebCore; > >@@ -672,6 +674,8 @@ void WebPageProxy::applicationWillEnterF > { > bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock]; > m_process->send(Messages::WebPage::ApplicationWillEnterForeground(isSuspendedUnderLock), m_pageID); >+ keyboardIsAttached = [UIKeyboard isInHardwareKeyboardMode]; >+ m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(keyboardIsAttached), m_pageID); > } > > void WebPageProxy::applicationWillResignActive() >@@ -1109,10 +1113,10 @@ void WebPageProxy::setIsScrollingOrZoomi > 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); > } > > #if ENABLE(DATA_INTERACTION) >Index: Source/WebKit/WebProcess/WebPage/WebPage.h >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.h (revision 240875) >+++ 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 keyboardIsAttached); > > void updateStringForFind(const String&); > #endif >@@ -1808,6 +1808,9 @@ 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: Source/WebKit/WebProcess/WebPage/WebPage.messages.in >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.messages.in (revision 240875) >+++ 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 keyboardIsAttached) > #endif > > SetControlledByAutomation(bool controlled) >Index: Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >=================================================================== >--- Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (revision 240875) >+++ Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (working copy) >@@ -201,7 +201,7 @@ void WebPage::platformEditorState(Frame& > 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; >@@ -3121,8 +3121,10 @@ String WebPage::platformUserAgent(const > return String(); > } > >-void WebPage::hardwareKeyboardAvailabilityChanged() >+void WebPage::hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached) > { >+ m_keyboardIsAttached = keyboardIsAttached; >+ > if (auto* focusedFrame = m_page->focusController().focusedFrame()) > focusedFrame->eventHandler().capsLockStateMayHaveChanged(); > }
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