[webkit-changes] [WebKit/WebKit] f40c79: REGRESSION(267119 at main): [ macOS wk2 release ] fas...

Abrar Rahman Protyasha noreply at github.com
Wed Sep 6 02:04:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f40c7929020c005654d58d882a552b06f0e3d856
      https://github.com/WebKit/WebKit/commit/f40c7929020c005654d58d882a552b06f0e3d856
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M LayoutTests/fast/events/detect-caps-lock.html
    M LayoutTests/fast/repaint/placeholder-after-caps-lock-hidden.html
    M LayoutTests/platform/mac-wk2/TestExpectations
    A LayoutTests/platform/mac-wk2/fast/repaint/placeholder-after-caps-lock-hidden-expected.txt
    M Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm

  Log Message:
  -----------
  REGRESSION(267119 at main): [ macOS wk2 release ] fast/repaint/placeholder-after-caps-lock-hidden.html is a constant timeout.
https://bugs.webkit.org/show_bug.cgi?id=260974
rdar://114772162

Reviewed by Aditya Keerthi.

267119 at main fixed the fast/repaint/placeholder-after-caps-lock-hidden.html
layout test to correctly wait on keyboard events, but this inadvertently
changed this test's failure mode to timeouts on macOS. This patch is a
two part fix that addresses two separate issues in play:

1. The macOS implementation for `toggleCapsLock` does not respect the
   (rather undocumented) contract exercised by its callees, which is that
   it mimics toggling of the capslock key by virtue of pressing the
   appropriate keys on a hardware keyboard. This was most recently
   addressed in the iOS implementation in 267119 at main. We fix this in
   macOS by sending a sequence of keyDown/keyUp/flagsChanged events with
   keycode 57 (capslock) to better reflect the sequence of events
   happening when the capslock is toggled on the Mac.

2. Layout tests exercising capslock toggles were incorrect in that they
   were not correctly calling the async `UIHelper.toggleCapsLock` method
   (were not awaiting on it) or they were listening for key events as a
   signal that capslock has been toggled. The latter is not inherently a
   problem except when a callee does not also await on `toggleCapsLock`,
   their test results become dependent on the ordering of asynchronous
   operations. We rework fast/events/detect-caps-lock.html and
   fast/repaint/placeholder-after-caps-lock-hidden.html to address this.

We also update macOS test expectations for the
fast/repaint/placeholder-after-caps-lock-hidden test. This update is
prompted by the fact that the original expectations are not applicable
for the mac platform anymore.

* LayoutTests/fast/events/detect-caps-lock.html:
* LayoutTests/fast/repaint/placeholder-after-caps-lock-hidden.html:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac-wk2/fast/repaint/placeholder-after-caps-lock-hidden-expected.txt: Added.
* Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::toggleCapsLock):

Canonical link: https://commits.webkit.org/267666@main




More information about the webkit-changes mailing list