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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/parser/CSSParserImpl.h" 5 #include "core/css/parser/CSSParserImpl.h"
6 6
7 #include "core/css/CSSCustomIdentValue.h" 7 #include "core/css/CSSCustomIdentValue.h"
8 #include "core/css/CSSCustomPropertyDeclaration.h" 8 #include "core/css/CSSCustomPropertyDeclaration.h"
9 #include "core/css/CSSKeyframesRule.h" 9 #include "core/css/CSSKeyframesRule.h"
10 #include "core/css/CSSStyleSheet.h" 10 #include "core/css/CSSStyleSheet.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 const CSSProperty& property = input[i]; 113 const CSSProperty& property = input[i];
114 if (property.isImportant() != important) 114 if (property.isImportant() != important)
115 continue; 115 continue;
116 const unsigned propertyIDIndex = property.id() - firstCSSProperty; 116 const unsigned propertyIDIndex = property.id() - firstCSSProperty;
117 117
118 if (property.id() == CSSPropertyVariable) { 118 if (property.id() == CSSPropertyVariable) {
119 const AtomicString& name = 119 const AtomicString& name =
120 toCSSCustomPropertyDeclaration(property.value())->name(); 120 toCSSCustomPropertyDeclaration(property.value())->name();
121 if (seenCustomProperties.contains(name)) 121 if (seenCustomProperties.contains(name))
122 continue; 122 continue;
123 seenCustomProperties.add(name); 123 seenCustomProperties.insert(name);
124 } else if (property.id() == CSSPropertyApplyAtRule) { 124 } else if (property.id() == CSSPropertyApplyAtRule) {
125 // TODO(timloh): Do we need to do anything here? 125 // TODO(timloh): Do we need to do anything here?
126 } else { 126 } else {
127 if (seenProperties.test(propertyIDIndex)) 127 if (seenProperties.test(propertyIDIndex))
128 continue; 128 continue;
129 seenProperties.set(propertyIDIndex); 129 seenProperties.set(propertyIDIndex);
130 } 130 }
131 output[--unusedEntries] = property; 131 output[--unusedEntries] = property;
132 } 132 }
133 } 133 }
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 else 979 else
980 return nullptr; // Parser error, invalid value in keyframe selector 980 return nullptr; // Parser error, invalid value in keyframe selector
981 if (range.atEnd()) 981 if (range.atEnd())
982 return result; 982 return result;
983 if (range.consume().type() != CommaToken) 983 if (range.consume().type() != CommaToken)
984 return nullptr; // Parser error 984 return nullptr; // Parser error
985 } 985 }
986 } 986 }
987 987
988 } // namespace blink 988 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698