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

Unified Diff: Source/core/rendering/svg/RenderSVGResourceClipper.cpp

Issue 189463005: Generate the isSVG*Element() / toSVG*Element() helper functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove blank line change Created 6 years, 9 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/rendering/svg/ReferenceFilterBuilder.cpp ('k') | Source/core/svg/SVGAltGlyphDefElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGResourceClipper.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
index 57637de4749d883767732f621baf053956f3747c..31c7746f2090797f59dc308b7c20c141d5d1f727 100644
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
@@ -271,9 +271,9 @@ PassRefPtr<DisplayList> RenderSVGResourceClipper::asDisplayList(GraphicsContext*
PaintBehavior oldBehavior = frame()->view()->paintBehavior();
frame()->view()->setPaintBehavior(oldBehavior | PaintBehaviorRenderingSVGMask);
- for (Element* childElement = ElementTraversal::firstWithin(*element()); childElement; childElement = ElementTraversal::nextSibling(*childElement)) {
+ for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement)) {
RenderObject* renderer = childElement->renderer();
- if (!childElement->isSVGElement() || !renderer)
+ if (!renderer)
continue;
RenderStyle* style = renderer->style();
@@ -311,9 +311,9 @@ PassRefPtr<DisplayList> RenderSVGResourceClipper::asDisplayList(GraphicsContext*
void RenderSVGResourceClipper::calculateClipContentRepaintRect()
{
// This is a rough heuristic to appraise the clip size and doesn't consider clip on clip.
- for (Element* childElement = ElementTraversal::firstWithin(*element()); childElement; childElement = ElementTraversal::nextSibling(*childElement)) {
+ for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement)) {
RenderObject* renderer = childElement->renderer();
- if (!childElement->isSVGElement() || !renderer)
+ if (!renderer)
continue;
if (!renderer->isSVGShape() && !renderer->isSVGText() && !childElement->hasTagName(SVGNames::useTag))
continue;
@@ -341,9 +341,9 @@ bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundin
point = clipPathElement->animatedLocalTransform().inverse().mapPoint(point);
- for (Element* childElement = ElementTraversal::firstWithin(*element()); childElement; childElement = ElementTraversal::nextSibling(*childElement)) {
+ for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement)) {
RenderObject* renderer = childElement->renderer();
- if (!childElement->isSVGElement() || !renderer)
+ if (!renderer)
continue;
if (!renderer->isSVGShape() && !renderer->isSVGText() && !childElement->hasTagName(SVGNames::useTag))
continue;
« no previous file with comments | « Source/core/rendering/svg/ReferenceFilterBuilder.cpp ('k') | Source/core/svg/SVGAltGlyphDefElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698