Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 13f0b855614682b002820fa2c726acefbeb423b7
https://github.com/WebKit/WebKit/commit/13f0b855614682b002820fa2c726acefbeb423b7
Author: Nathan Solomon <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/ios/ModalDialogDuringOverlappingFocus.mm
Log Message:
-----------
REGRESSION(315733@main):
[iOS]TestWebKitAPI.ModalDialogDuringOverlappingFocus.AlertNotDeferredAfterFIFOAsyncFocusCompletions
is constant timeout
https://bugs.webkit.org/show_bug.cgi?id=317810
rdar://180581088
Reviewed by Ryan Reno.
Following 315733@main, an ElementDidFocus IPC can be deferred until the next
rendering update, except at a few flush points where any pending ElementDidFocus
IPC is forced out (e.g. when an evaluateJavaScript or synthetic click
completes).
The test ModalDialogDuringOverlappingFocus.mm (introduced in 314318@main)
assumed
that a script calling element.focus() on two elements in a row would send two
ElementDidFocus IPCs.
After 315733@main this test times out, because the two focus() calls coalesce
into
a single ElementDidFocus IPC (carrying focus info for only the second element).
Only one of the two strong-password-assistance completion handlers the test
waits
on is delivered, so the test blocks forever waiting for the second.
Fix the test by issuing each element.focus() in its own evaluateJavaScript call.
Each evaluateJavaScript forces any pending ElementDidFocus IPC to be sent when
it
completes, so both focus completions are delivered and the test proceeds.
315733@main does not re-introduce the regression that 314318@main fixed.
314318@main fixed a hang caused by two overlapping _elementDidFocus: completion
scopes unwinding in non-LIFO order. The second-to-fire scope wrote its stale
captured YES over the first's correct NO, leaving _isFocusingElementWithKeyboard
stuck and deferring every later modal dialog forever. 315733@main only ever
reduces the number of ElementDidFocus IPCs. It coalesces multiple same-turn
focus() calls into one, producing fewer scopes and never more, so it makes the
ordering problem less likely rather than more. When two focus() calls land in
separate rendering updates, two scopes are still created, and 314318@main's
generation-counter fix still resolves the unwind correctly.
*
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/ios/ModalDialogDuringOverlappingFocus.mm:
(TestWebKitAPI::TEST(ModalDialogDuringOverlappingFocus,
AlertNotDeferredAfterFIFOAsyncFocusCompletions)):
Canonical link: https://commits.webkit.org/315836@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications