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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGPatternElement.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann
3 * <zimmermann@kde.org> 3 * <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 attributes.setPatternContentElement(element); 191 attributes.setPatternContentElement(element);
192 } 192 }
193 193
194 void SVGPatternElement::collectPatternAttributes( 194 void SVGPatternElement::collectPatternAttributes(
195 PatternAttributes& attributes) const { 195 PatternAttributes& attributes) const {
196 HeapHashSet<Member<const SVGPatternElement>> processedPatterns; 196 HeapHashSet<Member<const SVGPatternElement>> processedPatterns;
197 const SVGPatternElement* current = this; 197 const SVGPatternElement* current = this;
198 198
199 while (true) { 199 while (true) {
200 setPatternAttributes(current, attributes); 200 setPatternAttributes(current, attributes);
201 processedPatterns.add(current); 201 processedPatterns.insert(current);
202 202
203 // Respect xlink:href, take attributes from referenced element 203 // Respect xlink:href, take attributes from referenced element
204 Node* refNode = SVGURIReference::targetElementFromIRIString( 204 Node* refNode = SVGURIReference::targetElementFromIRIString(
205 current->hrefString(), treeScope()); 205 current->hrefString(), treeScope());
206 206
207 // Only consider attached SVG pattern elements. 207 // Only consider attached SVG pattern elements.
208 if (!isSVGPatternElement(refNode) || !refNode->layoutObject()) 208 if (!isSVGPatternElement(refNode) || !refNode->layoutObject())
209 break; 209 break;
210 210
211 current = toSVGPatternElement(refNode); 211 current = toSVGPatternElement(refNode);
(...skipping 10 matching lines...) Expand all
222 } 222 }
223 223
224 bool SVGPatternElement::selfHasRelativeLengths() const { 224 bool SVGPatternElement::selfHasRelativeLengths() const {
225 return m_x->currentValue()->isRelative() || 225 return m_x->currentValue()->isRelative() ||
226 m_y->currentValue()->isRelative() || 226 m_y->currentValue()->isRelative() ||
227 m_width->currentValue()->isRelative() || 227 m_width->currentValue()->isRelative() ||
228 m_height->currentValue()->isRelative(); 228 m_height->currentValue()->isRelative();
229 } 229 }
230 230
231 } // namespace blink 231 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698