| 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 void addAttribute(const AtomicString& attributeLocalName); | 59 void addAttribute(const AtomicString& attributeLocalName); |
| 60 | 60 |
| 61 // Appends the classes in this DescendantInvalidationSet to the vector. | 61 // Appends the classes in this DescendantInvalidationSet to the vector. |
| 62 void getClasses(Vector<AtomicString>& classes) const; | 62 void getClasses(Vector<AtomicString>& classes) const; |
| 63 | 63 |
| 64 // Appends the attributes in this DescendantInvalidationSet to the vector. | 64 // Appends the attributes in this DescendantInvalidationSet to the vector. |
| 65 void getAttributes(Vector<AtomicString>& attributes) const; | 65 void getAttributes(Vector<AtomicString>& attributes) const; |
| 66 | 66 |
| 67 void setWholeSubtreeInvalid(); | 67 void setWholeSubtreeInvalid(); |
| 68 bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; } | 68 bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; } |
| 69 |
| 70 void setCustomPseudoInvalid() { m_customPseudoInvalid = true; } |
| 71 bool customPseudoInvalid() const { return m_customPseudoInvalid; } |
| 72 |
| 69 private: | 73 private: |
| 70 DescendantInvalidationSet(); | 74 DescendantInvalidationSet(); |
| 71 | 75 |
| 72 HashSet<AtomicString>& ensureClassSet(); | 76 HashSet<AtomicString>& ensureClassSet(); |
| 73 HashSet<AtomicString>& ensureIdSet(); | 77 HashSet<AtomicString>& ensureIdSet(); |
| 74 HashSet<AtomicString>& ensureTagNameSet(); | 78 HashSet<AtomicString>& ensureTagNameSet(); |
| 75 HashSet<AtomicString>& ensureAttributeSet(); | 79 HashSet<AtomicString>& ensureAttributeSet(); |
| 76 | 80 |
| 77 // If true, all descendants might be invalidated, so a full subtree recalc i
s required. | 81 // If true, all descendants might be invalidated, so a full subtree recalc i
s required. |
| 78 bool m_allDescendantsMightBeInvalid; | 82 bool m_allDescendantsMightBeInvalid; |
| 79 | 83 |
| 84 // If true, all descendants which are custom pseudo elements must be invalid
ated. |
| 85 bool m_customPseudoInvalid; |
| 86 |
| 80 // FIXME: optimize this if it becomes a memory issue. | 87 // FIXME: optimize this if it becomes a memory issue. |
| 81 OwnPtr<HashSet<AtomicString> > m_classes; | 88 OwnPtr<HashSet<AtomicString> > m_classes; |
| 82 OwnPtr<HashSet<AtomicString> > m_ids; | 89 OwnPtr<HashSet<AtomicString> > m_ids; |
| 83 OwnPtr<HashSet<AtomicString> > m_tagNames; | 90 OwnPtr<HashSet<AtomicString> > m_tagNames; |
| 84 OwnPtr<HashSet<AtomicString> > m_attributes; | 91 OwnPtr<HashSet<AtomicString> > m_attributes; |
| 85 }; | 92 }; |
| 86 | 93 |
| 87 } // namespace WebCore | 94 } // namespace WebCore |
| 88 | 95 |
| 89 #endif // DescendantInvalidationSet_h | 96 #endif // DescendantInvalidationSet_h |
| OLD | NEW |