Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6e28a1c21d744764ef47fb638a816c70d5d015bb
      
https://github.com/WebKit/WebKit/commit/6e28a1c21d744764ef47fb638a816c70d5d015bb
  Author: Diego De La Toba <[email protected]>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M LayoutTests/fast/forms/switch/click-animation-twice.html
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl

  Log Message:
  -----------
  [macOS iOS] fast/forms/switch/click-animation-twice.html is a flaky image diff
rdar://174771816
https://bugs.webkit.org/show_bug.cgi?id=312307

Reviewed by Aditya Keerthi.

The test clicks a switch checkbox twice (on, then off) and captures a 
screenshot to
verify it returns to the unchecked state. The delay before taking the 
screenshot was 75ms,
but the switch control's CSS transition animation takes 300ms on macOS 
(RenderThemeMac.h:104)
and ~488ms on iOS (RenderThemeIOS.h:96)

This was causing the test to screenshot before the animation was fully set 
which resulted
in pixel reference mismatches.

Fix (click-animation-twice.html:15): Change tests timeout to be platform 
specific based on
RenderTheme::singleton().switchAnimationVisuallyOnDuration().

Fix (Internal.pp/.h/idl): Now exposes 
RenderTheme::singleton().switchAnimationVisuallyOnDuration()
so it can be used in tests.

* LayoutTests/fast/forms/switch/click-animation-twice.html:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::switchAnimationVisuallyOnDuration const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to