OLD | NEW |
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void combine(const InvalidationSet& other); | 62 void combine(const InvalidationSet& other); |
63 | 63 |
64 void addClass(const AtomicString& className); | 64 void addClass(const AtomicString& className); |
65 void addId(const AtomicString& id); | 65 void addId(const AtomicString& id); |
66 void addTagName(const AtomicString& tagName); | 66 void addTagName(const AtomicString& tagName); |
67 void addAttribute(const AtomicString& attributeLocalName); | 67 void addAttribute(const AtomicString& attributeLocalName); |
68 | 68 |
69 void setWholeSubtreeInvalid(); | 69 void setWholeSubtreeInvalid(); |
70 bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; } | 70 bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; } |
71 | 71 |
| 72 void setInvalidatesSelf() { m_invalidatesSelf = true; } |
| 73 bool invalidatesSelf() const { return m_invalidatesSelf; } |
| 74 |
72 void setTreeBoundaryCrossing() { m_treeBoundaryCrossing = true; } | 75 void setTreeBoundaryCrossing() { m_treeBoundaryCrossing = true; } |
73 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } | 76 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } |
74 | 77 |
75 void setInsertionPointCrossing() { m_insertionPointCrossing = true; } | 78 void setInsertionPointCrossing() { m_insertionPointCrossing = true; } |
76 bool insertionPointCrossing() const { return m_insertionPointCrossing; } | 79 bool insertionPointCrossing() const { return m_insertionPointCrossing; } |
77 | 80 |
78 void setCustomPseudoInvalid() { m_customPseudoInvalid = true; } | 81 void setCustomPseudoInvalid() { m_customPseudoInvalid = true; } |
79 bool customPseudoInvalid() const { return m_customPseudoInvalid; } | 82 bool customPseudoInvalid() const { return m_customPseudoInvalid; } |
80 | 83 |
81 bool isEmpty() const { return !m_classes && !m_ids && !m_tagNames && !m_attr
ibutes && !m_customPseudoInvalid; } | 84 bool isEmpty() const { return !m_classes && !m_ids && !m_tagNames && !m_attr
ibutes && !m_customPseudoInvalid; } |
(...skipping 16 matching lines...) Expand all Loading... |
98 | 101 |
99 // FIXME: optimize this if it becomes a memory issue. | 102 // FIXME: optimize this if it becomes a memory issue. |
100 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_classes; | 103 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_classes; |
101 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_ids; | 104 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_ids; |
102 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_tagNames; | 105 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_tagNames; |
103 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_attributes; | 106 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_attributes; |
104 | 107 |
105 // If true, all descendants might be invalidated, so a full subtree recalc i
s required. | 108 // If true, all descendants might be invalidated, so a full subtree recalc i
s required. |
106 unsigned m_allDescendantsMightBeInvalid : 1; | 109 unsigned m_allDescendantsMightBeInvalid : 1; |
107 | 110 |
| 111 // If true, the element itself is invalid. |
| 112 unsigned m_invalidatesSelf : 1; |
| 113 |
108 // If true, all descendants which are custom pseudo elements must be invalid
ated. | 114 // If true, all descendants which are custom pseudo elements must be invalid
ated. |
109 unsigned m_customPseudoInvalid : 1; | 115 unsigned m_customPseudoInvalid : 1; |
110 | 116 |
111 // If true, the invalidation must traverse into ShadowRoots with this set. | 117 // If true, the invalidation must traverse into ShadowRoots with this set. |
112 unsigned m_treeBoundaryCrossing : 1; | 118 unsigned m_treeBoundaryCrossing : 1; |
113 | 119 |
114 // If true, insertion point descendants must be invalidated. | 120 // If true, insertion point descendants must be invalidated. |
115 unsigned m_insertionPointCrossing : 1; | 121 unsigned m_insertionPointCrossing : 1; |
116 }; | 122 }; |
117 | 123 |
118 } // namespace blink | 124 } // namespace blink |
119 | 125 |
120 #endif // InvalidationSet_h | 126 #endif // InvalidationSet_h |
OLD | NEW |