Chromium Code Reviews| Index: Source/core/css/resolver/StyleAdjuster.cpp |
| diff --git a/Source/core/css/resolver/StyleAdjuster.cpp b/Source/core/css/resolver/StyleAdjuster.cpp |
| index 733e50a61fb46c2684ba9ef0e8434d79e1581285..bde89655e5b0c883de11f1d9566610b60db48fd6 100644 |
| --- a/Source/core/css/resolver/StyleAdjuster.cpp |
| +++ b/Source/core/css/resolver/StyleAdjuster.cpp |
| @@ -197,7 +197,9 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl |
| // 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. |
| - if (!style.hasTransform() && (style.willChangeProperties().contains(CSSPropertyWebkitTransform) || style.willChangeProperties().contains(CSSPropertyTransform))) { |
| + // can skip this because they implicitly have transforms. |
|
pdr.
2015/04/11 17:04:25
Almost there but this is still not correct. Please
|
| + bool isSVGElement = e && e->isSVGElement(); |
| + if (!isSVGElement && !style.hasTransform() && (style.willChangeProperties().contains(CSSPropertyWebkitTransform) || style.willChangeProperties().contains(CSSPropertyTransform))) { |
| bool makeIdentity = true; |
| style.setTransform(TransformOperations(makeIdentity)); |
| } |
| @@ -228,7 +230,7 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl |
| || style.hasFilter())) |
| style.setTransformStyle3D(TransformStyle3DFlat); |
| - if (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())) |
| style.setPosition(ComputedStyle::initialPosition()); |