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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorStyleSheet.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
index 6f13b679e6b5eb202fde892b949541be982cba46..05cbeb1f949b9b0cc8ebc12844e97384b3d12b5d 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
@@ -139,7 +139,7 @@ void getClassNamesFromRule(CSSStyleRule* rule, HashSet<String>& uniqueNames) {
const CSSSelector* simpleSelector = subSelector;
while (simpleSelector) {
if (simpleSelector->match() == CSSSelector::Class)
- uniqueNames.add(simpleSelector->value());
+ uniqueNames.insert(simpleSelector->value());
simpleSelector = simpleSelector->tagHistory();
}
}
@@ -775,13 +775,13 @@ void InspectorStyle::populateAllProperties(
m_sourceData->propertyData;
for (const auto& data : sourcePropertyData) {
result.push_back(data);
- sourcePropertyNames.add(data.name.lower());
+ sourcePropertyNames.insert(data.name.lower());
}
}
for (int i = 0, size = m_style->length(); i < size; ++i) {
String name = m_style->item(i);
- if (!sourcePropertyNames.add(name.lower()).isNewEntry)
+ if (!sourcePropertyNames.insert(name.lower()).isNewEntry)
continue;
String value = m_style->getPropertyValue(name);
@@ -839,7 +839,7 @@ std::unique_ptr<protocol::CSS::CSSStyle> InspectorStyle::styleWithProperties() {
String shorthand = m_style->getPropertyShorthand(name);
if (!shorthand.isEmpty()) {
- if (foundShorthands.add(shorthand).isNewEntry) {
+ if (foundShorthands.insert(shorthand).isNewEntry) {
std::unique_ptr<protocol::CSS::ShorthandEntry> entry =
protocol::CSS::ShorthandEntry::create()
.setName(shorthand)

Powered by Google App Engine
This is Rietveld 408576698