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

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 be3d89497722be5bfc7d69786a6c39b3ebb2b8a3..32b105bb99689228bf277f6f90f82727b863174f 100644
--- a/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/Source/core/css/resolver/StyleAdjuster.cpp
@@ -201,15 +201,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();
@@ -236,6 +227,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()))

Powered by Google App Engine
This is Rietveld 408576698