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

Unified Diff: Source/core/dom/Element.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/dom/Element.h ('k') | Source/core/dom/NodeRenderingContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 86a23892c2470b09a4449fbc7a2e06e2ec105089..6cb67b9fa1bd8983a19a7548382bfb5bcafcd199 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1197,9 +1197,9 @@ const AtomicString Element::imageSourceURL() const
return getAttribute(srcAttr);
}
-bool Element::rendererIsNeeded(const NodeRenderingContext& context)
+bool Element::rendererIsNeeded(const RenderStyle& style)
{
- return context.style()->display() != NONE;
+ return style.display() != NONE;
}
RenderObject* Element::createRenderer(RenderStyle* style)
@@ -2575,13 +2575,13 @@ void Element::setUnsignedIntegralAttribute(const QualifiedName& attributeName, u
setAttribute(attributeName, String::number(value));
}
-bool Element::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
+bool Element::childShouldCreateRenderer(const Node& child) const
{
// Only create renderers for SVG elements whose parents are SVG elements, or for proper <svg xmlns="svgNS"> subdocuments.
- if (childContext.node()->isSVGElement())
- return childContext.node()->hasTagName(SVGNames::svgTag) || isSVGElement();
+ if (child.isSVGElement())
+ return child.hasTagName(SVGNames::svgTag) || isSVGElement();
- return ContainerNode::childShouldCreateRenderer(childContext);
+ return ContainerNode::childShouldCreateRenderer(child);
}
void Element::webkitRequestFullscreen()
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/NodeRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698