| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 void setTreeBoundaryCrossing() { m_treeBoundaryCrossing = true; } | 67 void setTreeBoundaryCrossing() { m_treeBoundaryCrossing = true; } |
| 68 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } | 68 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } |
| 69 | 69 |
| 70 void setCustomPseudoInvalid() { m_customPseudoInvalid = true; } | 70 void setCustomPseudoInvalid() { m_customPseudoInvalid = true; } |
| 71 bool customPseudoInvalid() const { return m_customPseudoInvalid; } | 71 bool customPseudoInvalid() const { return m_customPseudoInvalid; } |
| 72 | 72 |
| 73 bool isEmpty() const { return !m_classes && !m_ids && !m_tagNames && !m_attr
ibutes; } | 73 bool isEmpty() const { return !m_classes && !m_ids && !m_tagNames && !m_attr
ibutes; } |
| 74 | 74 |
| 75 void trace(Visitor*); | 75 void trace(Visitor*); |
| 76 | 76 |
| 77 #ifndef NDEBUG |
| 78 void show() const; |
| 79 #endif |
| 80 |
| 77 private: | 81 private: |
| 78 DescendantInvalidationSet(); | 82 DescendantInvalidationSet(); |
| 79 | 83 |
| 80 WillBeHeapHashSet<AtomicString>& ensureClassSet(); | 84 WillBeHeapHashSet<AtomicString>& ensureClassSet(); |
| 81 WillBeHeapHashSet<AtomicString>& ensureIdSet(); | 85 WillBeHeapHashSet<AtomicString>& ensureIdSet(); |
| 82 WillBeHeapHashSet<AtomicString>& ensureTagNameSet(); | 86 WillBeHeapHashSet<AtomicString>& ensureTagNameSet(); |
| 83 WillBeHeapHashSet<AtomicString>& ensureAttributeSet(); | 87 WillBeHeapHashSet<AtomicString>& ensureAttributeSet(); |
| 84 | 88 |
| 85 // FIXME: optimize this if it becomes a memory issue. | 89 // FIXME: optimize this if it becomes a memory issue. |
| 86 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString> > m_classes; | 90 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString> > m_classes; |
| 87 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString> > m_ids; | 91 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString> > m_ids; |
| 88 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString> > m_tagNames; | 92 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString> > m_tagNames; |
| 89 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString> > m_attributes; | 93 OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString> > m_attributes; |
| 90 | 94 |
| 91 // If true, all descendants might be invalidated, so a full subtree recalc i
s required. | 95 // If true, all descendants might be invalidated, so a full subtree recalc i
s required. |
| 92 unsigned m_allDescendantsMightBeInvalid : 1; | 96 unsigned m_allDescendantsMightBeInvalid : 1; |
| 93 | 97 |
| 94 // If true, all descendants which are custom pseudo elements must be invalid
ated. | 98 // If true, all descendants which are custom pseudo elements must be invalid
ated. |
| 95 unsigned m_customPseudoInvalid : 1; | 99 unsigned m_customPseudoInvalid : 1; |
| 96 | 100 |
| 97 // If true, the invalidation must traverse into ShadowRoots with this set. | 101 // If true, the invalidation must traverse into ShadowRoots with this set. |
| 98 unsigned m_treeBoundaryCrossing : 1; | 102 unsigned m_treeBoundaryCrossing : 1; |
| 99 }; | 103 }; |
| 100 | 104 |
| 101 } // namespace WebCore | 105 } // namespace WebCore |
| 102 | 106 |
| 103 #endif // DescendantInvalidationSet_h | 107 #endif // DescendantInvalidationSet_h |
| OLD | NEW |