| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "wtf/Allocator.h" | 35 #include "wtf/Allocator.h" |
| 36 #include "wtf/Assertions.h" | 36 #include "wtf/Assertions.h" |
| 37 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
| 38 #include "wtf/HashSet.h" | 38 #include "wtf/HashSet.h" |
| 39 #include "wtf/RefCounted.h" | 39 #include "wtf/RefCounted.h" |
| 40 #include "wtf/RefPtr.h" | 40 #include "wtf/RefPtr.h" |
| 41 #include "wtf/text/AtomicStringHash.h" | 41 #include "wtf/text/AtomicStringHash.h" |
| 42 #include "wtf/text/StringHash.h" | 42 #include "wtf/text/StringHash.h" |
| 43 #include <memory> | |
| 44 | 43 |
| 45 namespace blink { | 44 namespace blink { |
| 46 | 45 |
| 47 class Element; | 46 class Element; |
| 48 class TracedValue; | 47 class TracedValue; |
| 49 | 48 |
| 50 enum InvalidationType { | 49 enum InvalidationType { |
| 51 InvalidateDescendants, | 50 InvalidateDescendants, |
| 52 InvalidateSiblings | 51 InvalidateSiblings |
| 53 }; | 52 }; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 139 |
| 141 private: | 140 private: |
| 142 void destroy(); | 141 void destroy(); |
| 143 | 142 |
| 144 HashSet<AtomicString>& ensureClassSet(); | 143 HashSet<AtomicString>& ensureClassSet(); |
| 145 HashSet<AtomicString>& ensureIdSet(); | 144 HashSet<AtomicString>& ensureIdSet(); |
| 146 HashSet<AtomicString>& ensureTagNameSet(); | 145 HashSet<AtomicString>& ensureTagNameSet(); |
| 147 HashSet<AtomicString>& ensureAttributeSet(); | 146 HashSet<AtomicString>& ensureAttributeSet(); |
| 148 | 147 |
| 149 // FIXME: optimize this if it becomes a memory issue. | 148 // FIXME: optimize this if it becomes a memory issue. |
| 150 std::unique_ptr<HashSet<AtomicString>> m_classes; | 149 OwnPtr<HashSet<AtomicString>> m_classes; |
| 151 std::unique_ptr<HashSet<AtomicString>> m_ids; | 150 OwnPtr<HashSet<AtomicString>> m_ids; |
| 152 std::unique_ptr<HashSet<AtomicString>> m_tagNames; | 151 OwnPtr<HashSet<AtomicString>> m_tagNames; |
| 153 std::unique_ptr<HashSet<AtomicString>> m_attributes; | 152 OwnPtr<HashSet<AtomicString>> m_attributes; |
| 154 | 153 |
| 155 unsigned m_type : 1; | 154 unsigned m_type : 1; |
| 156 | 155 |
| 157 // If true, all descendants might be invalidated, so a full subtree recalc i
s required. | 156 // If true, all descendants might be invalidated, so a full subtree recalc i
s required. |
| 158 unsigned m_allDescendantsMightBeInvalid : 1; | 157 unsigned m_allDescendantsMightBeInvalid : 1; |
| 159 | 158 |
| 160 // If true, the element or sibling itself is invalid. | 159 // If true, the element or sibling itself is invalid. |
| 161 unsigned m_invalidatesSelf : 1; | 160 unsigned m_invalidatesSelf : 1; |
| 162 | 161 |
| 163 // If true, all descendants which are custom pseudo elements must be invalid
ated. | 162 // If true, all descendants which are custom pseudo elements must be invalid
ated. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 InvalidationSetVector descendants; | 220 InvalidationSetVector descendants; |
| 222 InvalidationSetVector siblings; | 221 InvalidationSetVector siblings; |
| 223 }; | 222 }; |
| 224 | 223 |
| 225 DEFINE_TYPE_CASTS(DescendantInvalidationSet, InvalidationSet, value, value->isDe
scendantInvalidationSet(), value.isDescendantInvalidationSet()); | 224 DEFINE_TYPE_CASTS(DescendantInvalidationSet, InvalidationSet, value, value->isDe
scendantInvalidationSet(), value.isDescendantInvalidationSet()); |
| 226 DEFINE_TYPE_CASTS(SiblingInvalidationSet, InvalidationSet, value, value->isSibli
ngInvalidationSet(), value.isSiblingInvalidationSet()); | 225 DEFINE_TYPE_CASTS(SiblingInvalidationSet, InvalidationSet, value, value->isSibli
ngInvalidationSet(), value.isSiblingInvalidationSet()); |
| 227 | 226 |
| 228 } // namespace blink | 227 } // namespace blink |
| 229 | 228 |
| 230 #endif // InvalidationSet_h | 229 #endif // InvalidationSet_h |
| OLD | NEW |