Chromium Code Reviews| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 | 59 |
| 60 bool invalidatesElement(Element&) const; | 60 bool invalidatesElement(Element&) const; |
| 61 | 61 |
| 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 setAppliesDirectly() { m_appliesDirectly = true; } | |
| 70 bool appliesDirectly() const { return m_appliesDirectly; } | |
| 71 | |
| 69 void setWholeSubtreeInvalid(); | 72 void setWholeSubtreeInvalid(); |
| 70 bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; } | 73 bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; } |
| 71 | 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; } |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 95 WillBeHeapHashSet<AtomicString>& ensureIdSet(); | 98 WillBeHeapHashSet<AtomicString>& ensureIdSet(); |
| 96 WillBeHeapHashSet<AtomicString>& ensureTagNameSet(); | 99 WillBeHeapHashSet<AtomicString>& ensureTagNameSet(); |
| 97 WillBeHeapHashSet<AtomicString>& ensureAttributeSet(); | 100 WillBeHeapHashSet<AtomicString>& ensureAttributeSet(); |
| 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 |
| 108 // Indicates the element itself is invalid. | |
|
Timothy Loh
2015/09/16 04:30:49
Maybe "must be invalidated" for consistency with o
| |
| 109 unsigned m_appliesDirectly : 1; | |
|
rune
2015/09/16 08:44:32
I think there should be a better name, preferably
| |
| 110 | |
| 105 // If true, all descendants might be invalidated, so a full subtree recalc i s required. | 111 // If true, all descendants might be invalidated, so a full subtree recalc i s required. |
| 106 unsigned m_allDescendantsMightBeInvalid : 1; | 112 unsigned m_allDescendantsMightBeInvalid : 1; |
| 107 | 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 |