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

Unified Diff: Source/core/css/resolver/StyleAdjuster.cpp

Issue 1318273003: Prevent will-change:transform from changing the computed value of transform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
Index: Source/core/css/resolver/StyleAdjuster.cpp
diff --git a/Source/core/css/resolver/StyleAdjuster.cpp b/Source/core/css/resolver/StyleAdjuster.cpp
index 309541916ebe02531b26b0c44755d4484bb8e86e..f0b018202b351e4a09dc28044ddc2232bbc2c5e5 100644
--- a/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/Source/core/css/resolver/StyleAdjuster.cpp
@@ -202,15 +202,6 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl
|| hasWillChangeThatCreatesStackingContext(style)))
style.setZIndex(0);
- // will-change:transform should result in the same rendering behavior as having a transform,
- // including the creation of a containing block for fixed position descendants.
- // SVG elements can skip this because they implicitly have transforms.
- bool isSVGElement = e && e->isSVGElement();
- if (!isSVGElement && !style.hasTransform() && (style.willChangeProperties().contains(CSSPropertyAliasWebkitTransform) || style.willChangeProperties().contains(CSSPropertyTransform))) {
- bool makeIdentity = true;
- style.setTransform(TransformOperations(makeIdentity));
- }
-
if (doesNotInheritTextDecoration(style, e))
style.clearAppliedTextDecorations();
@@ -237,6 +228,7 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl
|| style.hasFilter()))
style.setTransformStyle3D(TransformStyle3DFlat);
+ bool isSVGElement = e && e->isSVGElement();
if (isSVGElement) {
// Only the root <svg> element in an SVG document fragment tree honors css position
if (!(isSVGSVGElement(*e) && e->parentNode() && !e->parentNode()->isSVGElement()))
« no previous file with comments | « LayoutTests/compositing/will-change/neutral-keyframe-not-decomposed-expected.html ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698