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

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

Issue 580373002: [Invalidation Tracking] Trace StyleInvalidator setNeedsStyleRecalc (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 2 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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "wtf/Forward.h" 35 #include "wtf/Forward.h"
36 #include "wtf/HashSet.h" 36 #include "wtf/HashSet.h"
37 #include "wtf/RefCounted.h" 37 #include "wtf/RefCounted.h"
38 #include "wtf/RefPtr.h" 38 #include "wtf/RefPtr.h"
39 #include "wtf/text/AtomicStringHash.h" 39 #include "wtf/text/AtomicStringHash.h"
40 #include "wtf/text/StringHash.h" 40 #include "wtf/text/StringHash.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class Element; 44 class Element;
45 class TracedValue;
45 46
46 // Tracks data to determine which elements of a DOM subtree need to have style 47 // Tracks data to determine which elements of a DOM subtree need to have style
47 // recalculated. 48 // recalculated.
48 class DescendantInvalidationSet FINAL : public RefCountedWillBeGarbageCollected< DescendantInvalidationSet> { 49 class DescendantInvalidationSet FINAL : public RefCountedWillBeGarbageCollected< DescendantInvalidationSet> {
49 public: 50 public:
50 static PassRefPtrWillBeRawPtr<DescendantInvalidationSet> create() 51 static PassRefPtrWillBeRawPtr<DescendantInvalidationSet> create()
51 { 52 {
52 return adoptRefWillBeNoop(new DescendantInvalidationSet); 53 return adoptRefWillBeNoop(new DescendantInvalidationSet);
53 } 54 }
54 55
(...skipping 12 matching lines...) Expand all
67 void setTreeBoundaryCrossing() { m_treeBoundaryCrossing = true; } 68 void setTreeBoundaryCrossing() { m_treeBoundaryCrossing = true; }
68 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } 69 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; }
69 70
70 void setCustomPseudoInvalid() { m_customPseudoInvalid = true; } 71 void setCustomPseudoInvalid() { m_customPseudoInvalid = true; }
71 bool customPseudoInvalid() const { return m_customPseudoInvalid; } 72 bool customPseudoInvalid() const { return m_customPseudoInvalid; }
72 73
73 bool isEmpty() const { return !m_classes && !m_ids && !m_tagNames && !m_attr ibutes; } 74 bool isEmpty() const { return !m_classes && !m_ids && !m_tagNames && !m_attr ibutes; }
74 75
75 void trace(Visitor*); 76 void trace(Visitor*);
76 77
78 void toTracedValue(TracedValue*) const;
79
77 #ifndef NDEBUG 80 #ifndef NDEBUG
78 void show() const; 81 void show() const;
79 #endif 82 #endif
80 83
81 private: 84 private:
82 DescendantInvalidationSet(); 85 DescendantInvalidationSet();
83 86
84 WillBeHeapHashSet<AtomicString>& ensureClassSet(); 87 WillBeHeapHashSet<AtomicString>& ensureClassSet();
85 WillBeHeapHashSet<AtomicString>& ensureIdSet(); 88 WillBeHeapHashSet<AtomicString>& ensureIdSet();
86 WillBeHeapHashSet<AtomicString>& ensureTagNameSet(); 89 WillBeHeapHashSet<AtomicString>& ensureTagNameSet();
(...skipping 11 matching lines...) Expand all
98 // If true, all descendants which are custom pseudo elements must be invalid ated. 101 // If true, all descendants which are custom pseudo elements must be invalid ated.
99 unsigned m_customPseudoInvalid : 1; 102 unsigned m_customPseudoInvalid : 1;
100 103
101 // If true, the invalidation must traverse into ShadowRoots with this set. 104 // If true, the invalidation must traverse into ShadowRoots with this set.
102 unsigned m_treeBoundaryCrossing : 1; 105 unsigned m_treeBoundaryCrossing : 1;
103 }; 106 };
104 107
105 } // namespace blink 108 } // namespace blink
106 109
107 #endif // DescendantInvalidationSet_h 110 #endif // DescendantInvalidationSet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698