| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 void addId(const AtomicString& id); | 57 void addId(const AtomicString& id); |
| 58 void addTagName(const AtomicString& tagName); | 58 void addTagName(const AtomicString& tagName); |
| 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 // Appends the ids in this DescendantInvalidationSet to the vector. |
| 68 void getIds(Vector<AtomicString>& ids) const; |
| 69 |
| 67 void setWholeSubtreeInvalid(); | 70 void setWholeSubtreeInvalid(); |
| 68 bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; } | 71 bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; } |
| 69 private: | 72 private: |
| 70 DescendantInvalidationSet(); | 73 DescendantInvalidationSet(); |
| 71 | 74 |
| 72 HashSet<AtomicString>& ensureClassSet(); | 75 HashSet<AtomicString>& ensureClassSet(); |
| 73 HashSet<AtomicString>& ensureIdSet(); | 76 HashSet<AtomicString>& ensureIdSet(); |
| 74 HashSet<AtomicString>& ensureTagNameSet(); | 77 HashSet<AtomicString>& ensureTagNameSet(); |
| 75 HashSet<AtomicString>& ensureAttributeSet(); | 78 HashSet<AtomicString>& ensureAttributeSet(); |
| 76 | 79 |
| 77 // If true, all descendants might be invalidated, so a full subtree recalc i
s required. | 80 // If true, all descendants might be invalidated, so a full subtree recalc i
s required. |
| 78 bool m_allDescendantsMightBeInvalid; | 81 bool m_allDescendantsMightBeInvalid; |
| 79 | 82 |
| 80 // FIXME: optimize this if it becomes a memory issue. | 83 // FIXME: optimize this if it becomes a memory issue. |
| 81 OwnPtr<HashSet<AtomicString> > m_classes; | 84 OwnPtr<HashSet<AtomicString> > m_classes; |
| 82 OwnPtr<HashSet<AtomicString> > m_ids; | 85 OwnPtr<HashSet<AtomicString> > m_ids; |
| 83 OwnPtr<HashSet<AtomicString> > m_tagNames; | 86 OwnPtr<HashSet<AtomicString> > m_tagNames; |
| 84 OwnPtr<HashSet<AtomicString> > m_attributes; | 87 OwnPtr<HashSet<AtomicString> > m_attributes; |
| 85 }; | 88 }; |
| 86 | 89 |
| 87 } // namespace WebCore | 90 } // namespace WebCore |
| 88 | 91 |
| 89 #endif // DescendantInvalidationSet_h | 92 #endif // DescendantInvalidationSet_h |
| OLD | NEW |