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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2569733003: Use hash set instead of vector for changed RuleSets. (Closed)
Patch Set: Created 4 years 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/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index 3830d87b66763f0d02f4d2cd5d41875d5d62bfe0..4fe3ecaf4e254bc27a2245873749f9ac2e53d077 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -895,7 +895,7 @@ void StyleEngine::scheduleNthPseudoInvalidations(ContainerNode& nthParent) {
void StyleEngine::scheduleRuleSetInvalidationsForElement(
Element& element,
- const HeapVector<Member<RuleSet>>& ruleSets) {
+ const HeapHashSet<Member<RuleSet>>& ruleSets) {
AtomicString id;
const SpaceSplitString* classNames = nullptr;
@@ -938,7 +938,7 @@ void StyleEngine::invalidateSlottedElements(HTMLSlotElement& slot) {
void StyleEngine::scheduleInvalidationsForRuleSets(
TreeScope& treeScope,
- const HeapVector<Member<RuleSet>>& ruleSets) {
+ const HeapHashSet<Member<RuleSet>>& ruleSets) {
#if DCHECK_IS_ON()
// Full scope recalcs should be handled while collecting the ruleSets before
// calling this method.
@@ -1097,7 +1097,7 @@ enum RuleSetFlags {
FullRecalcRules = 1 << 2
};
-unsigned getRuleSetFlags(const HeapVector<Member<RuleSet>> ruleSets) {
+unsigned getRuleSetFlags(const HeapHashSet<Member<RuleSet>> ruleSets) {
unsigned flags = 0;
for (auto& ruleSet : ruleSets) {
ruleSet->compactRulesIfNeeded();
@@ -1117,7 +1117,7 @@ void StyleEngine::applyRuleSetChanges(
TreeScope& treeScope,
const ActiveStyleSheetVector& oldStyleSheets,
const ActiveStyleSheetVector& newStyleSheets) {
- HeapVector<Member<RuleSet>> changedRuleSets;
+ HeapHashSet<Member<RuleSet>> changedRuleSets;
ScopedStyleResolver* scopedResolver = treeScope.scopedStyleResolver();
bool appendAllSheets =
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.h ('k') | third_party/WebKit/Source/core/dom/StyleEngineTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698