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

Unified Diff: Source/core/svg/SVGForeignObjectElement.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/SVGForeignObjectElement.h ('k') | Source/core/svg/SVGGElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGForeignObjectElement.cpp
diff --git a/Source/core/svg/SVGForeignObjectElement.cpp b/Source/core/svg/SVGForeignObjectElement.cpp
index 7d8ef8225dc99c48d2e497b9f9c548e232ff9473..e8a99a2b701716f0a75d5df8a3391af0a3d5b125 100644
--- a/Source/core/svg/SVGForeignObjectElement.cpp
+++ b/Source/core/svg/SVGForeignObjectElement.cpp
@@ -23,7 +23,6 @@
#include "SVGNames.h"
#include "XLinkNames.h"
-#include "core/dom/NodeRenderingContext.h"
#include "core/rendering/svg/RenderSVGForeignObject.h"
#include "core/rendering/svg/RenderSVGResource.h"
#include "core/svg/SVGElementInstance.h"
@@ -127,17 +126,17 @@ RenderObject* SVGForeignObjectElement::createRenderer(RenderStyle*)
return new RenderSVGForeignObject(this);
}
-bool SVGForeignObjectElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
+bool SVGForeignObjectElement::childShouldCreateRenderer(const Node& child) const
{
// Disallow arbitary SVG content. Only allow proper <svg xmlns="svgNS"> subdocuments.
- if (childContext.node()->isSVGElement())
- return childContext.node()->hasTagName(SVGNames::svgTag);
+ if (child.isSVGElement())
+ return child.hasTagName(SVGNames::svgTag);
// Skip over SVG rules which disallow non-SVG kids
- return Element::childShouldCreateRenderer(childContext);
+ return Element::childShouldCreateRenderer(child);
}
-bool SVGForeignObjectElement::rendererIsNeeded(const NodeRenderingContext& context)
+bool SVGForeignObjectElement::rendererIsNeeded(const RenderStyle& style)
{
// Suppress foreignObject renderers in SVG hidden containers.
// (https://bugs.webkit.org/show_bug.cgi?id=87297)
@@ -152,7 +151,7 @@ bool SVGForeignObjectElement::rendererIsNeeded(const NodeRenderingContext& conte
ancestor = ancestor->parentElement();
}
- return SVGGraphicsElement::rendererIsNeeded(context);
+ return SVGGraphicsElement::rendererIsNeeded(style);
}
bool SVGForeignObjectElement::selfHasRelativeLengths() const
« no previous file with comments | « Source/core/svg/SVGForeignObjectElement.h ('k') | Source/core/svg/SVGGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698