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

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

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 years, 10 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) 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
4 * Copyright 2014 The Chromium Authors. All rights reserved. 4 * Copyright 2014 The Chromium Authors. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 PatternData* LayoutSVGResourcePattern::patternForLayoutObject( 70 PatternData* LayoutSVGResourcePattern::patternForLayoutObject(
71 const LayoutObject& object) { 71 const LayoutObject& object) {
72 ASSERT(!m_shouldCollectPatternAttributes); 72 ASSERT(!m_shouldCollectPatternAttributes);
73 73
74 // FIXME: the double hash lookup is needed to guard against paint-time 74 // FIXME: the double hash lookup is needed to guard against paint-time
75 // invalidation (painting animated images may trigger layout invals which 75 // invalidation (painting animated images may trigger layout invals which
76 // delete our map entry). Hopefully that will be addressed at some point, and 76 // delete our map entry). Hopefully that will be addressed at some point, and
77 // then we can optimize the lookup. 77 // then we can optimize the lookup.
78 if (PatternData* currentData = m_patternMap.get(&object)) 78 if (PatternData* currentData = m_patternMap.at(&object))
79 return currentData; 79 return currentData;
80 80
81 return m_patternMap.set(&object, buildPatternData(object)) 81 return m_patternMap.set(&object, buildPatternData(object))
82 .storedValue->value.get(); 82 .storedValue->value.get();
83 } 83 }
84 84
85 std::unique_ptr<PatternData> LayoutSVGResourcePattern::buildPatternData( 85 std::unique_ptr<PatternData> LayoutSVGResourcePattern::buildPatternData(
86 const LayoutObject& object) { 86 const LayoutObject& object) {
87 // If we couldn't determine the pattern content element root, stop here. 87 // If we couldn't determine the pattern content element root, stop here.
88 const PatternAttributes& attributes = this->attributes(); 88 const PatternAttributes& attributes = this->attributes();
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 tileTransform); 212 tileTransform);
213 for (LayoutObject* child = patternLayoutObject->firstChild(); child; 213 for (LayoutObject* child = patternLayoutObject->firstChild(); child;
214 child = child->nextSibling()) 214 child = child->nextSibling())
215 SVGPaintContext::paintSubtree(builder.context(), child); 215 SVGPaintContext::paintSubtree(builder.context(), child);
216 } 216 }
217 217
218 return builder.endRecording(); 218 return builder.endRecording();
219 } 219 }
220 220
221 } // namespace blink 221 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698