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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceMasker.cpp

Issue 191003007: Use isSVG*Element() helpers more in SVG code (Part 3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 continue; 146 continue;
147 147
148 SVGRenderingContext::renderSubtree(context, renderer, contentTransform); 148 SVGRenderingContext::renderSubtree(context, renderer, contentTransform);
149 } 149 }
150 150
151 return context->endRecording(); 151 return context->endRecording();
152 } 152 }
153 153
154 void RenderSVGResourceMasker::calculateMaskContentRepaintRect() 154 void RenderSVGResourceMasker::calculateMaskContentRepaintRect()
155 { 155 {
156 for (Element* childElement = ElementTraversal::firstWithin(*element()); chil dElement; childElement = ElementTraversal::nextSibling(*childElement)) { 156 for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element() ); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement )) {
157 RenderObject* renderer = childElement->renderer(); 157 RenderObject* renderer = childElement->renderer();
158 if (!childElement->isSVGElement() || !renderer) 158 if (!renderer)
159 continue; 159 continue;
160 RenderStyle* style = renderer->style(); 160 RenderStyle* style = renderer->style();
161 if (!style || style->display() == NONE || style->visibility() != VISIBLE ) 161 if (!style || style->display() == NONE || style->visibility() != VISIBLE )
162 continue; 162 continue;
163 m_maskContentBoundaries.unite(renderer->localToParentTransform().mapRect (renderer->repaintRectInLocalCoordinates())); 163 m_maskContentBoundaries.unite(renderer->localToParentTransform().mapRect (renderer->repaintRectInLocalCoordinates()));
164 } 164 }
165 } 165 }
166 166
167 FloatRect RenderSVGResourceMasker::resourceBoundingBox(const RenderObject* objec t) 167 FloatRect RenderSVGResourceMasker::resourceBoundingBox(const RenderObject* objec t)
168 { 168 {
(...skipping 16 matching lines...) Expand all
185 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); 185 transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
186 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h eight()); 186 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h eight());
187 maskRect = transform.mapRect(maskRect); 187 maskRect = transform.mapRect(maskRect);
188 } 188 }
189 189
190 maskRect.intersect(maskBoundaries); 190 maskRect.intersect(maskBoundaries);
191 return maskRect; 191 return maskRect;
192 } 192 }
193 193
194 } 194 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.cpp ('k') | Source/core/rendering/svg/RenderSVGTSpan.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698