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 7b4c270694113cd60594d33841d7675b923ca2b0..79dcc61cc0e289a71c46106bd7cefbed214a7be9 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp |
@@ -510,7 +510,10 @@ bool SVGSVGElement::layoutObjectIsNeeded(const ComputedStyle& style) { |
// https://bugs.webkit.org/show_bug.cgi?id=103493 |
if (document().documentElement() == this) |
return true; |
- return SVGElement::layoutObjectIsNeeded(style); |
+ |
+ // <svg> elements don't need an SVG parent to render, so we bypass |
+ // SVGElement::layoutObjectIsNeeded. |
+ return isValid() && Element::layoutObjectIsNeeded(style); |
} |
LayoutObject* SVGSVGElement::createLayoutObject(const ComputedStyle&) { |