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

Unified Diff: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp

Issue 2688343002: Unify SVG parent checks for LayoutObject construction using always the light tree parent. (Closed)
Patch Set: Unify SVG parent checks for LayoutObject construction using always the light tree parent. Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGMarkerElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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&) {
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGMarkerElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698