Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2035793007: Make sure z-index is adjusted after applying pending animations on elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/animations/transform-animation-stacking-context-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 6c7a4d1b5581b2799541bac69866ec108d4f9994..90d2caed7574571a546bcf1a1464764f657a3ff1 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1659,6 +1659,13 @@ PassRefPtr<ComputedStyle> Element::styleForLayoutObject()
if (ElementAnimations* elementAnimations = this->elementAnimations()) {
elementAnimations->cssAnimations().maybeApplyPendingUpdate(this);
elementAnimations->updateAnimationFlags(*style);
+
+ // This is supposed to be done by StyleAdjuster, but we may not have updated animation
+ // list until this point.
+ if (style->hasAutoZIndex() && (style->hasCurrentOpacityAnimation()
+ || style->hasCurrentTransformAnimation()
+ || style->hasCurrentFilterAnimation()))
+ style->setZIndex(0);
}
if (style->hasTransform()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/animations/transform-animation-stacking-context-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698