Title: [200347] trunk
- Revision
- 200347
- Author
- an...@apple.com
- Date
- 2016-05-02 16:47:33 -0700 (Mon, 02 May 2016)
Log Message
REGRESSION(r199964): Animation on pseudo elements doesn't trigger if first frame matches the current style
https://bugs.webkit.org/show_bug.cgi?id=157284
Reviewed by Simon Fraser.
Source/WebCore:
r199964 accidentally changed the logic for computing style change for animations.
Test: fast/css/animation-pseudo-style-change.html
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
If there is an animated style determine the style change using it rather than the originally resolved style.
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):
Here too.
LayoutTests:
* fast/css/animation-pseudo-style-change-expected.html: Added.
* fast/css/animation-pseudo-style-change.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (200346 => 200347)
--- trunk/LayoutTests/ChangeLog 2016-05-02 23:14:01 UTC (rev 200346)
+++ trunk/LayoutTests/ChangeLog 2016-05-02 23:47:33 UTC (rev 200347)
@@ -1,3 +1,13 @@
+2016-05-02 Antti Koivisto <an...@apple.com>
+
+ REGRESSION(r199964): Animation on pseudo elements doesn't trigger if first frame matches the current style
+ https://bugs.webkit.org/show_bug.cgi?id=157284
+
+ Reviewed by Simon Fraser.
+
+ * fast/css/animation-pseudo-style-change-expected.html: Added.
+ * fast/css/animation-pseudo-style-change.html: Added.
+
2016-05-02 Brady Eidson <beid...@apple.com>
Add the ability to accumulate logs for specific logging channels to help diagnose test timeouts.
Added: trunk/LayoutTests/fast/css/animation-pseudo-style-change-expected.html (0 => 200347)
--- trunk/LayoutTests/fast/css/animation-pseudo-style-change-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css/animation-pseudo-style-change-expected.html 2016-05-02 23:47:33 UTC (rev 200347)
@@ -0,0 +1,15 @@
+<style>
+
+child::after {
+ display: block;
+ border: 2px solid green;
+ width: 200px;
+ height: 50px;
+ content: "after";
+}
+</style>
+
+<container>
+<child>
+</child>
+</container>
Added: trunk/LayoutTests/fast/css/animation-pseudo-style-change.html (0 => 200347)
--- trunk/LayoutTests/fast/css/animation-pseudo-style-change.html (rev 0)
+++ trunk/LayoutTests/fast/css/animation-pseudo-style-change.html 2016-05-02 23:47:33 UTC (rev 200347)
@@ -0,0 +1,38 @@
+<style>
+@keyframes slidein {
+ from {
+ width: 50px;
+ }
+
+ to {
+ width: 200px;
+ }
+}
+
+.animate::after {
+ animation-duration: 0.01s;
+ animation-name: slidein;
+ animation-fill-mode: forwards;
+}
+
+child::after {
+ display: block;
+ border: 2px solid green;
+ width: 50px;
+ height: 50px;
+ content: "after";
+}
+</style>
+
+<container>
+<child>
+</child>
+</container>
+<script>
+var child = document.querySelector("child");
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ child.addEventListener("animationend", function () { testRunner.notifyDone(); }, false);
+}
+child.className = "animate";
+</script>
Modified: trunk/Source/WebCore/ChangeLog (200346 => 200347)
--- trunk/Source/WebCore/ChangeLog 2016-05-02 23:14:01 UTC (rev 200346)
+++ trunk/Source/WebCore/ChangeLog 2016-05-02 23:47:33 UTC (rev 200347)
@@ -1,3 +1,24 @@
+2016-05-02 Antti Koivisto <an...@apple.com>
+
+ REGRESSION(r199964): Animation on pseudo elements doesn't trigger if first frame matches the current style
+ https://bugs.webkit.org/show_bug.cgi?id=157284
+
+ Reviewed by Simon Fraser.
+
+ r199964 accidentally changed the logic for computing style change for animations.
+
+ Test: fast/css/animation-pseudo-style-change.html
+
+ * style/RenderTreeUpdater.cpp:
+ (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
+
+ If there is an animated style determine the style change using it rather than the originally resolved style.
+
+ * style/StyleTreeResolver.cpp:
+ (WebCore::Style::TreeResolver::resolveElement):
+
+ Here too.
+
2016-05-02 Brady Eidson <beid...@apple.com>
Add the ability to accumulate logs for specific logging channels to help diagnose test timeouts.
Modified: trunk/Source/WebCore/style/RenderTreeUpdater.cpp (200346 => 200347)
--- trunk/Source/WebCore/style/RenderTreeUpdater.cpp 2016-05-02 23:14:01 UTC (rev 200346)
+++ trunk/Source/WebCore/style/RenderTreeUpdater.cpp 2016-05-02 23:47:33 UTC (rev 200347)
@@ -488,8 +488,8 @@
if (renderer && m_document.frame()->animation().updateAnimations(*renderer, *newStyle, animatedStyle))
elementUpdate.isSynthetic = true;
- elementUpdate.change = renderer ? Style::determineChange(renderer->style(), *newStyle) : Style::Detach;
elementUpdate.style = animatedStyle ? WTFMove(animatedStyle) : WTFMove(newStyle);
+ elementUpdate.change = renderer ? Style::determineChange(renderer->style(), *elementUpdate.style) : Style::Detach;
if (elementUpdate.change == Style::NoChange)
return;
Modified: trunk/Source/WebCore/style/StyleTreeResolver.cpp (200346 => 200347)
--- trunk/Source/WebCore/style/StyleTreeResolver.cpp 2016-05-02 23:14:01 UTC (rev 200346)
+++ trunk/Source/WebCore/style/StyleTreeResolver.cpp 2016-05-02 23:47:33 UTC (rev 200347)
@@ -198,8 +198,8 @@
if (!needsNewRenderer && m_document.frame()->animation().updateAnimations(*renderer, *newStyle, animatedStyle))
update.isSynthetic = true;
- update.change = needsNewRenderer ? Detach : determineChange(renderer->style(), *newStyle);
update.style = animatedStyle ? WTFMove(animatedStyle) : WTFMove(newStyle);
+ update.change = needsNewRenderer ? Detach : determineChange(renderer->style(), *update.style);
if (element.styleChangeType() == SyntheticStyleChange)
update.isSynthetic = true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes