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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGDocumentExtensions.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) 2006 Apple Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2007 Rob Buis <buis@kde.org>
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 19 matching lines...) Expand all
30 namespace blink { 30 namespace blink {
31 31
32 SVGDocumentExtensions::SVGDocumentExtensions(Document* document) 32 SVGDocumentExtensions::SVGDocumentExtensions(Document* document)
33 : m_document(document) 33 : m_document(document)
34 { 34 {
35 } 35 }
36 36
37 SVGDocumentExtensions::~SVGDocumentExtensions() {} 37 SVGDocumentExtensions::~SVGDocumentExtensions() {}
38 38
39 void SVGDocumentExtensions::addTimeContainer(SVGSVGElement* element) { 39 void SVGDocumentExtensions::addTimeContainer(SVGSVGElement* element) {
40 m_timeContainers.add(element); 40 m_timeContainers.insert(element);
41 } 41 }
42 42
43 void SVGDocumentExtensions::removeTimeContainer(SVGSVGElement* element) { 43 void SVGDocumentExtensions::removeTimeContainer(SVGSVGElement* element) {
44 m_timeContainers.remove(element); 44 m_timeContainers.remove(element);
45 } 45 }
46 46
47 void SVGDocumentExtensions::addWebAnimationsPendingSVGElement( 47 void SVGDocumentExtensions::addWebAnimationsPendingSVGElement(
48 SVGElement& element) { 48 SVGElement& element) {
49 ASSERT(RuntimeEnabledFeatures::webAnimationsSVGEnabled()); 49 ASSERT(RuntimeEnabledFeatures::webAnimationsSVGEnabled());
50 m_webAnimationsPendingSVGElements.add(&element); 50 m_webAnimationsPendingSVGElements.insert(&element);
51 } 51 }
52 52
53 void SVGDocumentExtensions::serviceOnAnimationFrame(Document& document) { 53 void SVGDocumentExtensions::serviceOnAnimationFrame(Document& document) {
54 if (!document.svgExtensions()) 54 if (!document.svgExtensions())
55 return; 55 return;
56 document.accessSVGExtensions().serviceAnimations(); 56 document.accessSVGExtensions().serviceAnimations();
57 } 57 }
58 58
59 void SVGDocumentExtensions::serviceAnimations() { 59 void SVGDocumentExtensions::serviceAnimations() {
60 if (RuntimeEnabledFeatures::smilEnabled()) { 60 if (RuntimeEnabledFeatures::smilEnabled()) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 void SVGDocumentExtensions::reportError(const String& message) { 116 void SVGDocumentExtensions::reportError(const String& message) {
117 ConsoleMessage* consoleMessage = ConsoleMessage::create( 117 ConsoleMessage* consoleMessage = ConsoleMessage::create(
118 RenderingMessageSource, ErrorMessageLevel, "Error: " + message); 118 RenderingMessageSource, ErrorMessageLevel, "Error: " + message);
119 m_document->addConsoleMessage(consoleMessage); 119 m_document->addConsoleMessage(consoleMessage);
120 } 120 }
121 121
122 void SVGDocumentExtensions::addSVGRootWithRelativeLengthDescendents( 122 void SVGDocumentExtensions::addSVGRootWithRelativeLengthDescendents(
123 SVGSVGElement* svgRoot) { 123 SVGSVGElement* svgRoot) {
124 ASSERT(!m_inRelativeLengthSVGRootsInvalidation); 124 ASSERT(!m_inRelativeLengthSVGRootsInvalidation);
125 m_relativeLengthSVGRoots.add(svgRoot); 125 m_relativeLengthSVGRoots.insert(svgRoot);
126 } 126 }
127 127
128 void SVGDocumentExtensions::removeSVGRootWithRelativeLengthDescendents( 128 void SVGDocumentExtensions::removeSVGRootWithRelativeLengthDescendents(
129 SVGSVGElement* svgRoot) { 129 SVGSVGElement* svgRoot) {
130 ASSERT(!m_inRelativeLengthSVGRootsInvalidation); 130 ASSERT(!m_inRelativeLengthSVGRootsInvalidation);
131 m_relativeLengthSVGRoots.remove(svgRoot); 131 m_relativeLengthSVGRoots.remove(svgRoot);
132 } 132 }
133 133
134 bool SVGDocumentExtensions::isSVGRootWithRelativeLengthDescendents( 134 bool SVGDocumentExtensions::isSVGRootWithRelativeLengthDescendents(
135 SVGSVGElement* svgRoot) const { 135 SVGSVGElement* svgRoot) const {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 178
179 DEFINE_TRACE(SVGDocumentExtensions) { 179 DEFINE_TRACE(SVGDocumentExtensions) {
180 visitor->trace(m_document); 180 visitor->trace(m_document);
181 visitor->trace(m_timeContainers); 181 visitor->trace(m_timeContainers);
182 visitor->trace(m_webAnimationsPendingSVGElements); 182 visitor->trace(m_webAnimationsPendingSVGElements);
183 visitor->trace(m_relativeLengthSVGRoots); 183 visitor->trace(m_relativeLengthSVGRoots);
184 } 184 }
185 185
186 } // namespace blink 186 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/TableSectionPainter.cpp ('k') | third_party/WebKit/Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698