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

Side by Side Diff: third_party/WebKit/Source/core/dom/StyleEngine.h

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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void scheduleSiblingInvalidationsForElement(Element&, 243 void scheduleSiblingInvalidationsForElement(Element&,
244 ContainerNode& schedulingParent, 244 ContainerNode& schedulingParent,
245 unsigned minDirectAdjacent); 245 unsigned minDirectAdjacent);
246 void scheduleInvalidationsForInsertedSibling(Element* beforeElement, 246 void scheduleInvalidationsForInsertedSibling(Element* beforeElement,
247 Element& insertedElement); 247 Element& insertedElement);
248 void scheduleInvalidationsForRemovedSibling(Element* beforeElement, 248 void scheduleInvalidationsForRemovedSibling(Element* beforeElement,
249 Element& removedElement, 249 Element& removedElement,
250 Element& afterElement); 250 Element& afterElement);
251 void scheduleNthPseudoInvalidations(ContainerNode&); 251 void scheduleNthPseudoInvalidations(ContainerNode&);
252 void scheduleInvalidationsForRuleSets(TreeScope&, 252 void scheduleInvalidationsForRuleSets(TreeScope&,
253 const HeapVector<Member<RuleSet>>&); 253 const HeapHashSet<Member<RuleSet>>&);
254 254
255 unsigned styleForElementCount() const { return m_styleForElementCount; } 255 unsigned styleForElementCount() const { return m_styleForElementCount; }
256 void incStyleForElementCount() { m_styleForElementCount++; } 256 void incStyleForElementCount() { m_styleForElementCount++; }
257 257
258 StyleResolverStats* stats() { return m_styleResolverStats.get(); } 258 StyleResolverStats* stats() { return m_styleResolverStats.get(); }
259 void setStatsEnabled(bool); 259 void setStatsEnabled(bool);
260 260
261 PassRefPtr<ComputedStyle> findSharedStyle(const ElementResolveContext&); 261 PassRefPtr<ComputedStyle> findSharedStyle(const ElementResolveContext&);
262 262
263 void applyRuleSetChanges(TreeScope&, 263 void applyRuleSetChanges(TreeScope&,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 317
318 void updateActiveStyleSheetsInShadow( 318 void updateActiveStyleSheetsInShadow(
319 StyleResolverUpdateMode, 319 StyleResolverUpdateMode,
320 TreeScope*, 320 TreeScope*,
321 UnorderedTreeScopeSet& treeScopesRemoved); 321 UnorderedTreeScopeSet& treeScopesRemoved);
322 322
323 bool shouldSkipInvalidationFor(const Element&) const; 323 bool shouldSkipInvalidationFor(const Element&) const;
324 void scheduleRuleSetInvalidationsForElement( 324 void scheduleRuleSetInvalidationsForElement(
325 Element&, 325 Element&,
326 const HeapVector<Member<RuleSet>>&); 326 const HeapHashSet<Member<RuleSet>>&);
327 void invalidateSlottedElements(HTMLSlotElement&); 327 void invalidateSlottedElements(HTMLSlotElement&);
328 328
329 void updateViewport(); 329 void updateViewport();
330 void updateActiveStyleSheets(); 330 void updateActiveStyleSheets();
331 const MediaQueryEvaluator& ensureMediaQueryEvaluator(); 331 const MediaQueryEvaluator& ensureMediaQueryEvaluator();
332 332
333 Member<Document> m_document; 333 Member<Document> m_document;
334 bool m_isMaster; 334 bool m_isMaster;
335 335
336 // Track the number of currently loading top-level stylesheets needed for 336 // Track the number of currently loading top-level stylesheets needed for
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 380
381 std::unique_ptr<StyleResolverStats> m_styleResolverStats; 381 std::unique_ptr<StyleResolverStats> m_styleResolverStats;
382 unsigned m_styleForElementCount = 0; 382 unsigned m_styleForElementCount = 0;
383 383
384 friend class StyleEngineTest; 384 friend class StyleEngineTest;
385 }; 385 };
386 386
387 } // namespace blink 387 } // namespace blink
388 388
389 #endif 389 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/ActiveStyleSheetsTest.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698