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

Side by Side Diff: Source/core/css/invalidation/StyleInvalidator.h

Issue 317133002: Skip traversing wholeSubtree subtrees with clean invalidation bits. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review issue. Created 6 years, 6 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
« no previous file with comments | « LayoutTests/fast/css/invalidation/targeted-class-whole-subtree-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef StyleInvalidator_h 5 #ifndef StyleInvalidator_h
6 #define StyleInvalidator_h 6 #define StyleInvalidator_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 9
10 namespace WebCore { 10 namespace WebCore {
(...skipping 25 matching lines...) Expand all
36 36
37 struct RecursionData { 37 struct RecursionData {
38 RecursionData() 38 RecursionData()
39 : m_invalidateCustomPseudo(false) 39 : m_invalidateCustomPseudo(false)
40 , m_wholeSubtreeInvalid(false) 40 , m_wholeSubtreeInvalid(false)
41 , m_treeBoundaryCrossing(false) 41 , m_treeBoundaryCrossing(false)
42 { } 42 { }
43 43
44 void pushInvalidationSet(const DescendantInvalidationSet&); 44 void pushInvalidationSet(const DescendantInvalidationSet&);
45 bool matchesCurrentInvalidationSets(Element&); 45 bool matchesCurrentInvalidationSets(Element&);
46 bool hasInvalidationSets() const { return m_invalidationSets.size(); } 46 bool hasInvalidationSets() const { return !wholeSubtreeInvalid() && m_in validationSets.size(); }
47 47
48 bool wholeSubtreeInvalid() const { return m_wholeSubtreeInvalid; } 48 bool wholeSubtreeInvalid() const { return m_wholeSubtreeInvalid; }
49 void setWholeSubtreeInvalid() { m_wholeSubtreeInvalid = true; } 49 void setWholeSubtreeInvalid() { m_wholeSubtreeInvalid = true; }
50 50
51 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } 51 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; }
52 52
53 typedef Vector<const DescendantInvalidationSet*, 16> InvalidationSets; 53 typedef Vector<const DescendantInvalidationSet*, 16> InvalidationSets;
54 InvalidationSets m_invalidationSets; 54 InvalidationSets m_invalidationSets;
55 bool m_invalidateCustomPseudo; 55 bool m_invalidateCustomPseudo;
56 bool m_wholeSubtreeInvalid; 56 bool m_wholeSubtreeInvalid;
(...skipping 30 matching lines...) Expand all
87 87
88 InvalidationList& ensurePendingInvalidationList(Element&); 88 InvalidationList& ensurePendingInvalidationList(Element&);
89 89
90 PendingInvalidationMap m_pendingInvalidationMap; 90 PendingInvalidationMap m_pendingInvalidationMap;
91 RecursionData m_recursionData; 91 RecursionData m_recursionData;
92 }; 92 };
93 93
94 } // namespace WebCore 94 } // namespace WebCore
95 95
96 #endif // StyleInvalidator_h 96 #endif // StyleInvalidator_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/invalidation/targeted-class-whole-subtree-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698