Chromium Code Reviews| Index: third_party/WebKit/Source/core/svg/SVGElement.cpp |
| diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp |
| index 88b13cabd79b091f5a2cf4d69f8c1e4987973a16..0d703db20aed0d6d69eed24c60f69da6c99b6fc2 100644 |
| --- a/third_party/WebKit/Source/core/svg/SVGElement.cpp |
| +++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp |
| @@ -1026,6 +1026,21 @@ PassRefPtr<ComputedStyle> SVGElement::customStyleForLayoutObject() { |
| correspondingElement(), style, DisallowStyleSharing); |
| } |
| +bool SVGElement::layoutObjectIsNeeded(const ComputedStyle& style) { |
| + // SVG elements only render when inside <svg>, or if the element is an <svg> |
| + // itself. |
| + if (!isSVGSVGElement(*this) && |
| + (!parentOrShadowHostElement() || |
| + !parentOrShadowHostElement()->isSVGElement())) { |
|
rune
2017/02/09 18:09:28
Shouldn't this have been the flat tree parent? Alt
|
| + return false; |
| + } |
| + |
| + if (!isValid()) |
| + return false; |
| + |
| + return Element::layoutObjectIsNeeded(style); |
| +} |
| + |
| MutableStylePropertySet* SVGElement::animatedSMILStyleProperties() const { |
| if (hasSVGRareData()) |
| return svgRareData()->animatedSMILStyleProperties(); |