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

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

Issue 23956012: Stop passing NodeRenderingContext except in textRendererIsNeeded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGFELightElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGElement.cpp
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp
index b9619d104b086ffb954ed2dad568c2f272e9a960..823ec39efb9b3e4df0502fe0070aa5eebb34d076 100644
--- a/Source/core/svg/SVGElement.cpp
+++ b/Source/core/svg/SVGElement.cpp
@@ -36,7 +36,6 @@
#include "core/dom/Document.h"
#include "core/dom/ElementTraversal.h"
#include "core/dom/Event.h"
-#include "core/dom/NodeRenderingContext.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/svg/RenderSVGResourceContainer.h"
@@ -147,7 +146,7 @@ void SVGElement::buildPendingResourcesIfNeeded()
}
}
-bool SVGElement::rendererIsNeeded(const NodeRenderingContext& context)
+bool SVGElement::rendererIsNeeded(const RenderStyle& style)
{
// http://www.w3.org/TR/SVG/extend.html#PrivateData
// Prevent anything other than SVG renderers from appearing in our render tree
@@ -155,7 +154,7 @@ bool SVGElement::rendererIsNeeded(const NodeRenderingContext& context)
// 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(context);
+ return Element::rendererIsNeeded(style);
return false;
}
@@ -885,7 +884,7 @@ void SVGElement::finishParsingChildren()
sendSVGLoadEventIfPossible();
}
-bool SVGElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
+bool SVGElement::childShouldCreateRenderer(const Node& child) const
{
DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, invalidTextContent, ());
@@ -897,8 +896,8 @@ bool SVGElement::childShouldCreateRenderer(const NodeRenderingContext& childCont
invalidTextContent.add(SVGNames::trefTag);
invalidTextContent.add(SVGNames::tspanTag);
}
- if (childContext.node()->isSVGElement()) {
- SVGElement* svgChild = toSVGElement(childContext.node());
+ if (child.isSVGElement()) {
+ const SVGElement* svgChild = toSVGElement(&child);
if (invalidTextContent.contains(svgChild->tagQName()))
return false;
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGFELightElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698