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

Side by Side Diff: Source/core/svg/SVGLinearGradientElement.cpp

Issue 190793011: Use isSVG*Element() helpers more in SVG code (Part 4) (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
« no previous file with comments | « Source/core/svg/SVGGraphicsElement.cpp ('k') | Source/core/svg/SVGRadialGradientElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 if (refNode && isSVGGradientElement(*refNode)) { 163 if (refNode && isSVGGradientElement(*refNode)) {
164 current = toSVGGradientElement(refNode); 164 current = toSVGGradientElement(refNode);
165 165
166 // Cycle detection 166 // Cycle detection
167 if (processedGradients.contains(current)) 167 if (processedGradients.contains(current))
168 return true; 168 return true;
169 169
170 if (!current->renderer()) 170 if (!current->renderer())
171 return false; 171 return false;
172 172
173 setGradientAttributes(current, attributes, current->hasTagName(SVGNa mes::linearGradientTag)); 173 setGradientAttributes(current, attributes, isSVGLinearGradientElemen t(*current));
174 processedGradients.add(current); 174 processedGradients.add(current);
175 } else { 175 } else {
176 return true; 176 return true;
177 } 177 }
178 } 178 }
179 179
180 ASSERT_NOT_REACHED(); 180 ASSERT_NOT_REACHED();
181 return false; 181 return false;
182 } 182 }
183 183
184 bool SVGLinearGradientElement::selfHasRelativeLengths() const 184 bool SVGLinearGradientElement::selfHasRelativeLengths() const
185 { 185 {
186 return m_x1->currentValue()->isRelative() 186 return m_x1->currentValue()->isRelative()
187 || m_y1->currentValue()->isRelative() 187 || m_y1->currentValue()->isRelative()
188 || m_x2->currentValue()->isRelative() 188 || m_x2->currentValue()->isRelative()
189 || m_y2->currentValue()->isRelative(); 189 || m_y2->currentValue()->isRelative();
190 } 190 }
191 191
192 } 192 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGraphicsElement.cpp ('k') | Source/core/svg/SVGRadialGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698