Title: [270346] trunk/Source/WebCore
Revision
270346
Author
[email protected]
Date
2020-12-02 07:46:24 -0800 (Wed, 02 Dec 2020)

Log Message

REGRESSION: [iOS] imported/w3c/web-platform-tests/css/css-ui/appearance-revert-001.tentative.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=219410
<rdar://problem/71868276>

Reviewed by Wenson Hsieh.

The flaky failure started appearing after r270065, which introduced a
new look for progress bars when the iOSFormControlRefresh setting is
enabled. Animated indeterminate progress bars were added as part of the
new appearance.

However, since the setting is disabled by default, there should have
been no effect on existing tests. r270065 omitted an early return in
RenderThemeIOS::animationRepeatIntervalForProgressBar, which would
lead to the existing progress bar being repainted 30 times per second.
This repainting is the likely cause of the flaky image failure.

Furthermore, this test uses a determinate progress bar, so repainting
due to animation should never occur, regardless of whether or not the
iOSFormControlRefresh setting is enabled. To fix the incorrect behavior,
a change was made to RenderProgress::updateAnimationState.

* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::updateAnimationState):

Only indeterminate progress bars have an animation.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar const):

Use the original value if the iOSFormControlRefresh setting is disabled.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (270345 => 270346)


--- trunk/Source/WebCore/ChangeLog	2020-12-02 14:44:42 UTC (rev 270345)
+++ trunk/Source/WebCore/ChangeLog	2020-12-02 15:46:24 UTC (rev 270346)
@@ -1,3 +1,37 @@
+2020-12-02  Aditya Keerthi  <[email protected]>
+
+        REGRESSION: [iOS] imported/w3c/web-platform-tests/css/css-ui/appearance-revert-001.tentative.html is a flaky image failure
+        https://bugs.webkit.org/show_bug.cgi?id=219410
+        <rdar://problem/71868276>
+
+        Reviewed by Wenson Hsieh.
+
+        The flaky failure started appearing after r270065, which introduced a
+        new look for progress bars when the iOSFormControlRefresh setting is
+        enabled. Animated indeterminate progress bars were added as part of the
+        new appearance.
+
+        However, since the setting is disabled by default, there should have
+        been no effect on existing tests. r270065 omitted an early return in
+        RenderThemeIOS::animationRepeatIntervalForProgressBar, which would
+        lead to the existing progress bar being repainted 30 times per second.
+        This repainting is the likely cause of the flaky image failure.
+
+        Furthermore, this test uses a determinate progress bar, so repainting
+        due to animation should never occur, regardless of whether or not the
+        iOSFormControlRefresh setting is enabled. To fix the incorrect behavior,
+        a change was made to RenderProgress::updateAnimationState.
+
+        * rendering/RenderProgress.cpp:
+        (WebCore::RenderProgress::updateAnimationState):
+
+        Only indeterminate progress bars have an animation.
+
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar const):
+
+        Use the original value if the iOSFormControlRefresh setting is disabled.
+
 2020-12-01  Tim Horton  <[email protected]>
 
         GPU Process: IOSurfaces should not be mapped into the Web Content Process

Modified: trunk/Source/WebCore/rendering/RenderProgress.cpp (270345 => 270346)


--- trunk/Source/WebCore/rendering/RenderProgress.cpp	2020-12-02 14:44:42 UTC (rev 270345)
+++ trunk/Source/WebCore/rendering/RenderProgress.cpp	2020-12-02 15:46:24 UTC (rev 270346)
@@ -88,7 +88,7 @@
     m_animationDuration = theme().animationDurationForProgressBar(*this);
     m_animationRepeatInterval = theme().animationRepeatIntervalForProgressBar(*this);
 
-    bool animating = style().hasAppearance() && m_animationRepeatInterval > 0_s;
+    bool animating = style().hasAppearance() && m_animationRepeatInterval > 0_s && !isDeterminate();
     if (animating == m_animating)
         return;
 

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (270345 => 270346)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2020-12-02 14:44:42 UTC (rev 270345)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2020-12-02 15:46:24 UTC (rev 270346)
@@ -2069,8 +2069,11 @@
 // progress bar is repainted.
 constexpr Seconds progressAnimationRepeatInterval = 33_ms;
 
-Seconds RenderThemeIOS::animationRepeatIntervalForProgressBar(const RenderProgress&) const
+Seconds RenderThemeIOS::animationRepeatIntervalForProgressBar(const RenderProgress& renderProgress) const
 {
+    if (!renderProgress.settings().iOSFormControlRefreshEnabled())
+        return RenderTheme::animationRepeatIntervalForProgressBar(renderProgress);
+
     return progressAnimationRepeatInterval;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to