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

Unified Diff: Source/core/svg/SVGElement.cpp

Issue 343443003: Remove SVGElement::rendererIsNeeded (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add remaining rendererIsNeeded changes Created 6 years, 6 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
Index: Source/core/svg/SVGElement.cpp
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp
index fddac6d6e4d3eaa15604c38df356afb1eb3e51e1..a9eb2532d1ae9d5d287e25377482dcda196ba462 100644
--- a/Source/core/svg/SVGElement.cpp
+++ b/Source/core/svg/SVGElement.cpp
@@ -175,10 +175,10 @@ bool SVGElement::rendererIsNeeded(const RenderStyle& style)
// Spec: SVG allows inclusion of elements from foreign namespaces anywhere
// with the SVG content. In general, the SVG user agent will include the unknown
// elements in the DOM but will otherwise ignore unknown elements.
- if (!parentOrShadowHostElement() || parentOrShadowHostElement()->isSVGElement())
- return Element::rendererIsNeeded(style);
+ if ((parentOrShadowHostElement() && !parentOrShadowHostElement()->isSVGElement()) || !isValid())
esprehn 2014/06/17 23:09:40 Put these in separate if statements. if (parentOr
+ return false;
- return false;
+ return Element::rendererIsNeeded(style);
}
SVGElementRareData* SVGElement::ensureSVGRareData()

Powered by Google App Engine
This is Rietveld 408576698