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

Unified Diff: Source/core/svg/SVGSwitchElement.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/SVGSwitchElement.h ('k') | Source/core/svg/SVGTRefElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGSwitchElement.cpp
diff --git a/Source/core/svg/SVGSwitchElement.cpp b/Source/core/svg/SVGSwitchElement.cpp
index 7d0e5f78c18dadb077f6becea419d3994837ff6e..07916668ca52793caeb41ac1af88aabdd6d7aa7c 100644
--- a/Source/core/svg/SVGSwitchElement.cpp
+++ b/Source/core/svg/SVGSwitchElement.cpp
@@ -23,7 +23,6 @@
#include "core/svg/SVGSwitchElement.h"
#include "SVGNames.h"
-#include "core/dom/NodeRenderingContext.h"
#include "core/page/UseCounter.h"
#include "core/rendering/svg/RenderSVGTransformableContainer.h"
@@ -52,7 +51,7 @@ PassRefPtr<SVGSwitchElement> SVGSwitchElement::create(const QualifiedName& tagNa
return adoptRef(new SVGSwitchElement(tagName, document));
}
-bool SVGSwitchElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
+bool SVGSwitchElement::childShouldCreateRenderer(const Node& child) const
{
// FIXME: This function does not do what the comment below implies it does.
// It will create a renderer for any valid SVG element children, not just the first one.
@@ -64,7 +63,7 @@ bool SVGSwitchElement::childShouldCreateRenderer(const NodeRenderingContext& chi
if (!element || !element->isValid())
continue;
- return node == childContext.node(); // Only allow this child if it's the first valid child
+ return node == &child; // Only allow this child if it's the first valid child
}
return false;
« no previous file with comments | « Source/core/svg/SVGSwitchElement.h ('k') | Source/core/svg/SVGTRefElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698