| Index: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
|
| index eec5eb4625d4fd4ce95c32121b79cb9a1acc8b7d..0206083aec5460f851ef289eace97eb73169bb8d 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
|
| @@ -265,7 +265,10 @@ void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) {
|
| // to mark it for updating.
|
| if (widthOrHeightChanged) {
|
| LayoutObject* layoutObject = this->layoutObject();
|
| - if (layoutObject && layoutObject->isSVGRoot()) {
|
| + // If the element is not attached, we cannot be sure if it is (going to
|
| + // be) an outermost root, so always mark presentation attributes dirty in
|
| + // that case.
|
| + if (!layoutObject || layoutObject->isSVGRoot()) {
|
| invalidateSVGPresentationAttributeStyle();
|
| setNeedsStyleRecalc(LocalStyleChange,
|
| StyleChangeReasonForTracing::create(
|
|
|