Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d97068f942ec3f1375bc824131b0d989f7a0c44a
https://github.com/WebKit/WebKit/commit/d97068f942ec3f1375bc824131b0d989f7a0c44a
Author: Jessica Cheung <[email protected]>
Date: 2026-07-10 (Fri, 10 Jul 2026)
Changed paths:
M LayoutTests/editing/caret/ios/caret-in-overflow-area.html
M LayoutTests/editing/input/ios/typing-with-inline-predictions.html
M
LayoutTests/editing/selection/ios/extend-selection-with-inline-predictions.html
M LayoutTests/editing/selection/ios/place-selection-in-overflow-area.html
M
LayoutTests/editing/selection/ios/select-text-by-long-press-with-focused-element.html
M
LayoutTests/editing/selection/ios/selection-extends-into-overflow-area.html
M
LayoutTests/editing/selection/ios/tap-focused-input-clears-outside-selection.html
M
LayoutTests/editing/selection/ios/tap-to-change-selection-after-accepting-inline-prediction.html
M
LayoutTests/editing/text-placeholder/insert-into-content-editable-non-zero-width-and-height.html
M LayoutTests/fast/events/ios/contenteditable-autocapitalize.html
M LayoutTests/fast/forms/ios/accessory-bar-navigation.html
M LayoutTests/fast/forms/password-scrolled-after-caps-lock-toggled.html
M
LayoutTests/platform/ios/fast/forms/ios/focus-input-via-button-expected.txt
M LayoutTests/platform/ios/fast/forms/ios/focus-long-textarea-expected.txt
M LayoutTests/platform/ios/fast/forms/ios/zoom-after-input-tap-expected.txt
M
LayoutTests/platform/ios/fast/forms/ios/zoom-after-input-tap-wide-input-expected.txt
M LayoutTests/resources/ui-helper.js
M Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
M Tools/TestRunnerShared/UIScriptContext/UIScriptContext.h
M Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
M Tools/TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp
M Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h
M Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm
M Tools/WebKitTestRunner/ios/TestControllerIOS.mm
M Tools/WebKitTestRunner/ios/UIScriptControllerIOS.h
M Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm
Log Message:
-----------
[iOS] Quite a few tests time out while awaiting the keyboard
https://bugs.webkit.org/show_bug.cgi?id=318190
rdar://178016084
Reviewed by Abrar Rahman Protyasha and Aditya Keerthi.
WebKit test harness' use of keyboard state manipulation and
overriding UIKit's implementation may cause unexpected behavior.
It seems matching GSEventSetHardwareKeyboardAttached and
isInHardwareKeyboardMode fixes the failing tests.
Previously where there was a mismatch, GSEventSetHardwareKeyboardAttached
would always be true while isInHardwareKeyboardMode could be false. That
could mean the system believes a hardware keyboard is attached but when
isInHardwareKeyboardMode reports false, the software keyboard doesn't show up.
Due to this behavior change, some EWS tests were failing. To mimic the old
behavior, some needed to add `useHardwareKeyboardMode=true`.
There was an issue where the keyboard state would be up for the first iteration
of
the test, then fail because each iteration of a test would not do the full
keyboard
reset. So, when the second iteration waits for the keyboard (which is considered
already up), the test timeouts. Then it fails, the full tear-down happens for
the
third iteration, and the test passes again. Thus, there was a pattern of Pass,
Fail, Pass,
Fail when running tests in multiple iterations. To fix this, instead of waiting
for the
keyboard presentation, have a new helper called
`activateAndWaitForInputSessionStartAt`
similar to `activateAndWaitForInputSessionAt`, that instead checks for an
active input session.
Other tests (specifically the zoom/scroll tests) failed because the results were
generated under the mismatched behavior. Now that
GSEventSetHardwareKeyboardAttached and
isInHardwareKeyboardMode match, both flags agree in the case when the hardware
keyboard
isn't toggled on, the software keyboard should actually appear now which
offsets the
previous results. So, regenerate the results according to the new offset.
* LayoutTests/editing/caret/ios/caret-in-overflow-area.html:
* LayoutTests/editing/input/ios/typing-with-inline-predictions.html:
*
LayoutTests/editing/selection/ios/extend-selection-with-inline-predictions.html:
* LayoutTests/editing/selection/ios/place-selection-in-overflow-area.html:
*
LayoutTests/editing/selection/ios/select-text-by-long-press-with-focused-element.html:
* LayoutTests/editing/selection/ios/selection-extends-into-overflow-area.html:
*
LayoutTests/editing/selection/ios/tap-focused-input-clears-outside-selection.html:
*
LayoutTests/editing/selection/ios/tap-to-change-selection-after-accepting-inline-prediction.html:
*
LayoutTests/editing/text-placeholder/insert-into-content-editable-non-zero-width-and-height.html:
* LayoutTests/fast/events/ios/contenteditable-autocapitalize.html:
* LayoutTests/fast/forms/ios/accessory-bar-navigation.html:
* LayoutTests/fast/forms/password-scrolled-after-caps-lock-toggled.html:
* LayoutTests/platform/ios/fast/forms/ios/focus-input-via-button-expected.txt:
* LayoutTests/platform/ios/fast/forms/ios/focus-long-textarea-expected.txt:
* LayoutTests/platform/ios/fast/forms/ios/zoom-after-input-tap-expected.txt:
*
LayoutTests/platform/ios/fast/forms/ios/zoom-after-input-tap-wide-input-expected.txt:
* LayoutTests/resources/ui-helper.js:
(window.UIHelper.await.new.Promise.):
(window.UIHelper.await.new.Promise):
(window.UIHelper.return.new.Promise.):
(window.UIHelper.return.new.Promise):
(window.UIHelper.async activateAndWaitForInputSessionStartAt):
(window.UIHelper.activateElementAndWaitForInputSessionStart):
* Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* Tools/TestRunnerShared/UIScriptContext/UIScriptContext.h:
* Tools/TestRunnerShared/UIScriptContext/UIScriptController.h:
* Tools/TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp:
(WTR::UIScriptController::setDidStartInputSessionCallback):
(WTR::UIScriptController::didStartInputSessionCallback const):
* Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView resetInteractionCallbacks]):
(-[TestRunnerWKWebView _webView:didStartInputSession:]):
* Tools/WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
* Tools/WebKitTestRunner/ios/UIScriptControllerIOS.h:
* Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::setDidStartInputSessionCallback):
Canonical link: https://commits.webkit.org/316922@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications