Changeset 243630 in webkit
- Timestamp:
- Mar 28, 2019, 4:30:52 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 11 edited
-
ChangeLog (modified) (1 diff)
-
Shared/WebPageCreationParameters.cpp (modified) (2 diffs)
-
Shared/WebPageCreationParameters.h (modified) (1 diff)
-
UIProcess/API/Cocoa/WKWebView.mm (modified) (1 diff)
-
UIProcess/WebPageProxy.cpp (modified) (1 diff)
-
UIProcess/WebPageProxy.h (modified) (1 diff)
-
UIProcess/WebProcessProxy.h (modified) (2 diffs)
-
UIProcess/ios/WKContentViewInteraction.mm (modified) (1 diff)
-
UIProcess/ios/WebPageProxyIOS.mm (modified) (1 diff)
-
WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
-
WebProcess/WebPage/WebPage.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r243618 r243630 1 2019-03-28 Per Arne Vollan <pvollan@apple.com> 2 3 [iOS] Automatic focus of input field is flaky 4 https://bugs.webkit.org/show_bug.cgi?id=196302 5 6 Reviewed by Brent Fulgham. 7 8 Sometimes the status of whether a keyboard is connected can be incorrect, both in the UI process, and in 9 the WebContent process. Fix this by sending the keyboard status to the WebContent process as part of the 10 Web page creation parameters. Stop caching the keyboard status in the Web process proxy, and call 11 [UIKeyboard isInHardwareKeyboardMode] instead, since this method is swizzled in the test harness. 12 13 * Shared/WebPageCreationParameters.cpp: 14 (WebKit::WebPageCreationParameters::encode const): 15 (WebKit::WebPageCreationParameters::decode): 16 * Shared/WebPageCreationParameters.h: 17 * UIProcess/API/Cocoa/WKWebView.mm: 18 (hardwareKeyboardAvailabilityChangedCallback): 19 * UIProcess/WebPageProxy.cpp: 20 (WebKit::WebPageProxy::creationParameters): 21 * UIProcess/WebPageProxy.h: 22 * UIProcess/WebProcessProxy.cpp: 23 * UIProcess/WebProcessProxy.h: 24 (WebKit::WebProcessProxy::setKeyboardIsAttached): Deleted. 25 (WebKit::WebProcessProxy::keyboardIsAttached const): Deleted. 26 * UIProcess/ios/WKContentViewInteraction.mm: 27 (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]): 28 * UIProcess/ios/WebPageProxyIOS.mm: 29 (WebKit::WebPageProxy::isInHardwareKeyboardMode): 30 (WebKit::WebPageProxy::applicationWillEnterForeground): 31 * WebProcess/WebPage/WebPage.cpp: 32 * WebProcess/WebPage/WebPage.h: 33 1 34 2019-03-28 Tim Horton <timothy_horton@apple.com> 2 35 -
trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp
r243163 r243630 94 94 encoder << maximumUnobscuredSize; 95 95 encoder << deviceOrientation; 96 encoder << keyboardIsAttached; 96 97 #endif 97 98 #if PLATFORM(COCOA) … … 274 275 if (!decoder.decode(parameters.deviceOrientation)) 275 276 return WTF::nullopt; 277 if (!decoder.decode(parameters.keyboardIsAttached)) 278 return WTF::nullopt; 276 279 #endif 277 280 -
trunk/Source/WebKit/Shared/WebPageCreationParameters.h
r242082 r243630 152 152 WebCore::FloatSize maximumUnobscuredSize; 153 153 int32_t deviceOrientation { 0 }; 154 bool keyboardIsAttached { false }; 154 155 #endif 155 156 #if PLATFORM(COCOA) -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r243523 r243630 3323 3323 ASSERT(observer); 3324 3324 WKWebView *webView = (__bridge WKWebView *)observer; 3325 auto keyboardIsAttached = GSEventIsHardwareKeyboardAttached(); 3326 webView._page->process().setKeyboardIsAttached(keyboardIsAttached); 3327 webView._page->hardwareKeyboardAvailabilityChanged(keyboardIsAttached); 3325 webView._page->hardwareKeyboardAvailabilityChanged(GSEventIsHardwareKeyboardAttached()); 3328 3326 } 3329 3327 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r243384 r243630 7023 7023 parameters.maximumUnobscuredSize = m_maximumUnobscuredSize; 7024 7024 parameters.deviceOrientation = m_deviceOrientation; 7025 parameters.keyboardIsAttached = isInHardwareKeyboardMode(); 7025 7026 #endif 7026 7027 -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r243354 r243630 2051 2051 #endif 2052 2052 2053 #if PLATFORM(IOS_FAMILY) 2054 static bool isInHardwareKeyboardMode(); 2055 #endif 2056 2053 2057 WeakPtr<PageClient> m_pageClient; 2054 2058 Ref<API::PageConfiguration> m_configuration; -
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
r243388 r243630 276 276 void didSetAssertionState(AssertionState) override; 277 277 278 #if PLATFORM(IOS_FAMILY)279 void setKeyboardIsAttached(bool keyboardIsAttached) { m_keyboardIsAttached = keyboardIsAttached; }280 bool keyboardIsAttached() const { return m_keyboardIsAttached; }281 #endif282 283 278 #if PLATFORM(COCOA) 284 279 enum SandboxExtensionType : uint32_t { … … 476 471 #endif 477 472 478 #if PLATFORM(IOS_FAMILY)479 bool m_keyboardIsAttached { false };480 #endif481 482 473 #if PLATFORM(COCOA) 483 474 MediaCaptureSandboxExtensions m_mediaCaptureSandboxExtensions { SandboxExtensionType::None }; -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r243618 r243630 4931 4931 return YES; 4932 4932 4933 if ( _page->process().keyboardIsAttached())4933 if ([UIKeyboard isInHardwareKeyboardMode]) 4934 4934 return YES; 4935 4935 #endif -
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r243354 r243630 664 664 } 665 665 666 bool WebPageProxy::isInHardwareKeyboardMode() 667 { 668 return [UIKeyboard isInHardwareKeyboardMode]; 669 } 670 666 671 void WebPageProxy::applicationWillEnterForeground() 667 672 { 668 673 bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock]; 669 674 m_process->send(Messages::WebPage::ApplicationWillEnterForeground(isSuspendedUnderLock), m_pageID); 670 m_process->setKeyboardIsAttached([UIKeyboard isInHardwareKeyboardMode]); 671 m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(m_process->keyboardIsAttached()), m_pageID); 675 m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(isInHardwareKeyboardMode()), m_pageID); 672 676 } 673 677 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r243461 r243630 407 407 , m_overrideScreenSize(parameters.overrideScreenSize) 408 408 , m_deviceOrientation(parameters.deviceOrientation) 409 , m_keyboardIsAttached(parameters.keyboardIsAttached) 409 410 #endif 410 411 , m_layerVolatilityTimer(*this, &WebPage::layerVolatilityTimerFired) -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r243461 r243630 1805 1805 WebCore::FloatSize m_maximumUnobscuredSize; 1806 1806 int32_t m_deviceOrientation { 0 }; 1807 bool m_keyboardIsAttached { false }; 1807 1808 bool m_inDynamicSizeUpdate { false }; 1808 1809 HashMap<std::pair<WebCore::IntSize, double>, WebCore::IntPoint> m_dynamicSizeUpdateHistory; … … 1885 1886 bool m_isSuspended { false }; 1886 1887 bool m_needsFontAttributes { false }; 1887 #if PLATFORM(IOS_FAMILY)1888 bool m_keyboardIsAttached { false };1889 #endif1890 1888 }; 1891 1889
Note:
See TracChangeset
for help on using the changeset viewer.