Title: [268873] branches/safari-611.1.4-branch

Diff

Modified: branches/safari-611.1.4-branch/LayoutTests/ChangeLog (268872 => 268873)


--- branches/safari-611.1.4-branch/LayoutTests/ChangeLog	2020-10-22 18:06:44 UTC (rev 268872)
+++ branches/safari-611.1.4-branch/LayoutTests/ChangeLog	2020-10-22 18:26:27 UTC (rev 268873)
@@ -1,3 +1,7 @@
+2020-10-22  Alan Coon  <[email protected]>
+
+        Revert r268771. rdar://problem/70578639
+
 2020-10-21  Alan Coon  <[email protected]>
 
         Cherry-pick r268771. rdar://problem/70532973

Modified: branches/safari-611.1.4-branch/LayoutTests/platform/mac-wk1/TestExpectations (268872 => 268873)


--- branches/safari-611.1.4-branch/LayoutTests/platform/mac-wk1/TestExpectations	2020-10-22 18:06:44 UTC (rev 268872)
+++ branches/safari-611.1.4-branch/LayoutTests/platform/mac-wk1/TestExpectations	2020-10-22 18:26:27 UTC (rev 268873)
@@ -1193,5 +1193,3 @@
 webkit.org/b/215325 [ Mojave ] media/remote-control-command-seek.html [ Pass Timeout ]
 
 webkit.org/b/217761 [ Mojave+ Debug ] webgl/2.0.0/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html [ Pass Crash ]
-
-webkit.org/b/217997 webanimations/accelerated-overlapping-transform-animations.html [ Pass Failure ]

Deleted: branches/safari-611.1.4-branch/LayoutTests/webanimations/accelerated-overlapping-transform-animations-expected.html (268872 => 268873)


--- branches/safari-611.1.4-branch/LayoutTests/webanimations/accelerated-overlapping-transform-animations-expected.html	2020-10-22 18:06:44 UTC (rev 268872)
+++ branches/safari-611.1.4-branch/LayoutTests/webanimations/accelerated-overlapping-transform-animations-expected.html	2020-10-22 18:26:27 UTC (rev 268873)
@@ -1,14 +0,0 @@
-<style>
-
-    #target {
-        position: absolute;
-        top: 0;
-        left: 0;
-        width: 100px;
-        height: 100px;
-        background-color: black;
-        transform: translateX(200px);
-    }
-
-</style>
-<div id="target"></div>

Deleted: branches/safari-611.1.4-branch/LayoutTests/webanimations/accelerated-overlapping-transform-animations.html (268872 => 268873)


--- branches/safari-611.1.4-branch/LayoutTests/webanimations/accelerated-overlapping-transform-animations.html	2020-10-22 18:06:44 UTC (rev 268872)
+++ branches/safari-611.1.4-branch/LayoutTests/webanimations/accelerated-overlapping-transform-animations.html	2020-10-22 18:26:27 UTC (rev 268873)
@@ -1,44 +0,0 @@
-<style>
-
-    #target {
-        position: absolute;
-        top: 0;
-        left: 0;
-        width: 100px;
-        height: 100px;
-        background-color: black;
-    }
-
-</style>
-<div id="target"></div>
-<script src=""
-<script>
-
-(async () => {
-    if (window.testRunner)
-        testRunner.waitUntilDone();
-
-    const target = document.getElementById("target");
-
-    // Make the animations last a whole minute so they don't end while the test is running. 
-    const duration = 60 * 1000;
-
-    // Start a first stationary "transform" animation.
-    const firstAnimation = target.animate({ transform: ["translateX(100px)", "translateX(100px)"] }, duration);
-
-    // Wait until this first animation has been applied.
-    await firstAnimation.ready;
-    await UIHelper.ensureStablePresentationUpdate();
-
-    // Now start a second stationary "transform" animation, which should replace the previous animation.
-    const secondAnimation = target.animate({ transform: ["translateX(200px)", "translateX(200px)"] }, duration);
-
-    // Wait until this second animation has been applied.
-    await secondAnimation.ready;
-    await UIHelper.ensureStablePresentationUpdate();
-
-    if (window.testRunner)
-        testRunner.notifyDone();
-})();
-
-</script>

Modified: branches/safari-611.1.4-branch/Source/WebCore/ChangeLog (268872 => 268873)


--- branches/safari-611.1.4-branch/Source/WebCore/ChangeLog	2020-10-22 18:06:44 UTC (rev 268872)
+++ branches/safari-611.1.4-branch/Source/WebCore/ChangeLog	2020-10-22 18:26:27 UTC (rev 268873)
@@ -1,3 +1,7 @@
+2020-10-22  Alan Coon  <[email protected]>
+
+        Revert r268771. rdar://problem/70578639
+
 2020-10-21  Alan Coon  <[email protected]>
 
         Cherry-pick r268771. rdar://problem/70532973

Modified: branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (268872 => 268873)


--- branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2020-10-22 18:06:44 UTC (rev 268872)
+++ branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2020-10-22 18:26:27 UTC (rev 268873)
@@ -1079,16 +1079,18 @@
 {
     LOG_WITH_STREAM(Animations, stream << "GraphicsLayerCA " << this << " id " << primaryLayerID() << " pauseAnimation " << animationName << " (is running " << animationIsRunning(animationName) << ")");
 
-    for (auto& animation : m_animations) {
-        // There may be several animations with the same name in the case of transform animations
-        // animating multiple components as individual animations.
-        if (animation.m_name == animationName && !animation.m_pendingRemoval) {
-            animation.m_playState = PlayState::PausePending;
-            animation.m_timeOffset = Seconds { timeOffset };
+    auto index = m_animations.findMatching([&](LayerPropertyAnimation animation) {
+        return animation.m_name == animationName && !animation.m_pendingRemoval;
+    });
 
-            noteLayerPropertyChanged(AnimationChanged);
-        }
-    }
+    if (index == notFound)
+        return;
+
+    auto& animation = m_animations[index];
+    animation.m_playState = PlayState::PausePending;
+    animation.m_timeOffset = Seconds { timeOffset };
+
+    noteLayerPropertyChanged(AnimationChanged);
 }
 
 void GraphicsLayerCA::removeAnimation(const String& animationName)
@@ -1095,14 +1097,16 @@
 {
     LOG_WITH_STREAM(Animations, stream << "GraphicsLayerCA " << this << " id " << primaryLayerID() << " removeAnimation " << animationName << " (is running " << animationIsRunning(animationName) << ")");
 
-    for (auto& animation : m_animations) {
-        // There may be several animations with the same name in the case of transform animations
-        // animating multiple components as individual animations.
-        if (animation.m_name == animationName && !animation.m_pendingRemoval) {
-            animation.m_pendingRemoval = true;
-            noteLayerPropertyChanged(AnimationChanged | CoverageRectChanged);
-        }
-    }
+    auto index = m_animations.findMatching([&](LayerPropertyAnimation animation) {
+        return animation.m_name == animationName && !animation.m_pendingRemoval;
+    });
+
+    if (index == notFound)
+        return;
+
+    m_animations[index].m_pendingRemoval = true;
+
+    noteLayerPropertyChanged(AnimationChanged | CoverageRectChanged);
 }
 
 void GraphicsLayerCA::platformCALayerAnimationStarted(const String& animationKey, MonotonicTime startTime)
@@ -2956,14 +2960,6 @@
             rotateAnimation = &animation;
             break;
         case AnimatedPropertyTransform:
-            // In the case of animations targeting the "transform" CSS property, there may be several
-            // animations created for a single KeyframeEffect, one for each transform component. In that
-            // case the animation index starts at 0 and increases for each component. If we encounter an
-            // index of 0 this means this animation establishes a new group of animation belonging to a
-            // single KeyframeEffect. As such, since the top-most KeyframeEffect replaces the previous
-            // ones, we can remove all the previously-added "transform" animations.
-            if (!animation.m_index)
-                transformAnimations.clear();
             transformAnimations.append(&animation);
             break;
         case AnimatedPropertyOpacity:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to