| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 void setInsertionPointCrossing() { m_insertionPointCrossing = true; } | 115 void setInsertionPointCrossing() { m_insertionPointCrossing = true; } |
| 116 bool insertionPointCrossing() const { return m_insertionPointCrossing; } | 116 bool insertionPointCrossing() const { return m_insertionPointCrossing; } |
| 117 | 117 |
| 118 void setCustomPseudoInvalid() { m_customPseudoInvalid = true; } | 118 void setCustomPseudoInvalid() { m_customPseudoInvalid = true; } |
| 119 bool customPseudoInvalid() const { return m_customPseudoInvalid; } | 119 bool customPseudoInvalid() const { return m_customPseudoInvalid; } |
| 120 | 120 |
| 121 void setInvalidatesSlotted() { m_invalidatesSlotted = true; } | 121 void setInvalidatesSlotted() { m_invalidatesSlotted = true; } |
| 122 bool invalidatesSlotted() const { return m_invalidatesSlotted; } | 122 bool invalidatesSlotted() const { return m_invalidatesSlotted; } |
| 123 | 123 |
| 124 void setAppliesToRuleSetInvalidations() { |
| 125 m_appliesToRuleSetInvalidations = true; |
| 126 } |
| 127 bool appliesToRuleSetInvalidations() const { |
| 128 return m_appliesToRuleSetInvalidations; |
| 129 } |
| 130 |
| 124 bool isEmpty() const { | 131 bool isEmpty() const { |
| 125 return !m_classes && !m_ids && !m_tagNames && !m_attributes && | 132 return !m_classes && !m_ids && !m_tagNames && !m_attributes && |
| 126 !m_customPseudoInvalid && !m_insertionPointCrossing && | 133 !m_customPseudoInvalid && !m_insertionPointCrossing && |
| 127 !m_invalidatesSlotted; | 134 !m_invalidatesSlotted; |
| 128 } | 135 } |
| 129 | 136 |
| 130 void toTracedValue(TracedValue*) const; | 137 void toTracedValue(TracedValue*) const; |
| 131 | 138 |
| 132 #ifndef NDEBUG | 139 #ifndef NDEBUG |
| 133 void show() const; | 140 void show() const; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 unsigned m_customPseudoInvalid : 1; | 205 unsigned m_customPseudoInvalid : 1; |
| 199 | 206 |
| 200 // If true, the invalidation must traverse into ShadowRoots with this set. | 207 // If true, the invalidation must traverse into ShadowRoots with this set. |
| 201 unsigned m_treeBoundaryCrossing : 1; | 208 unsigned m_treeBoundaryCrossing : 1; |
| 202 | 209 |
| 203 // If true, insertion point descendants must be invalidated. | 210 // If true, insertion point descendants must be invalidated. |
| 204 unsigned m_insertionPointCrossing : 1; | 211 unsigned m_insertionPointCrossing : 1; |
| 205 | 212 |
| 206 // If true, distributed nodes of <slot> elements need to be invalidated. | 213 // If true, distributed nodes of <slot> elements need to be invalidated. |
| 207 unsigned m_invalidatesSlotted : 1; | 214 unsigned m_invalidatesSlotted : 1; |
| 215 |
| 216 // If true, this invalidation set should be scheduled for ruleset |
| 217 // invalidations. |
| 218 unsigned m_appliesToRuleSetInvalidations : 1; |
| 208 }; | 219 }; |
| 209 | 220 |
| 210 class CORE_EXPORT DescendantInvalidationSet final : public InvalidationSet { | 221 class CORE_EXPORT DescendantInvalidationSet final : public InvalidationSet { |
| 211 public: | 222 public: |
| 212 static PassRefPtr<DescendantInvalidationSet> create() { | 223 static PassRefPtr<DescendantInvalidationSet> create() { |
| 213 return adoptRef(new DescendantInvalidationSet); | 224 return adoptRef(new DescendantInvalidationSet); |
| 214 } | 225 } |
| 215 | 226 |
| 216 private: | 227 private: |
| 217 DescendantInvalidationSet() : InvalidationSet(InvalidateDescendants) {} | 228 DescendantInvalidationSet() : InvalidationSet(InvalidateDescendants) {} |
| 229 static PassRefPtr<DescendantInvalidationSet> |
| 230 createCustomPseudoInvalidationSet(); |
| 218 }; | 231 }; |
| 219 | 232 |
| 220 class CORE_EXPORT SiblingInvalidationSet final : public InvalidationSet { | 233 class CORE_EXPORT SiblingInvalidationSet final : public InvalidationSet { |
| 221 public: | 234 public: |
| 222 static PassRefPtr<SiblingInvalidationSet> create( | 235 static PassRefPtr<SiblingInvalidationSet> create( |
| 223 PassRefPtr<DescendantInvalidationSet> descendants) { | 236 PassRefPtr<DescendantInvalidationSet> descendants) { |
| 224 return adoptRef(new SiblingInvalidationSet(std::move(descendants))); | 237 return adoptRef(new SiblingInvalidationSet(std::move(descendants))); |
| 225 } | 238 } |
| 226 | 239 |
| 227 unsigned maxDirectAdjacentSelectors() const { | 240 unsigned maxDirectAdjacentSelectors() const { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 value.isDescendantInvalidationSet()); | 284 value.isDescendantInvalidationSet()); |
| 272 DEFINE_TYPE_CASTS(SiblingInvalidationSet, | 285 DEFINE_TYPE_CASTS(SiblingInvalidationSet, |
| 273 InvalidationSet, | 286 InvalidationSet, |
| 274 value, | 287 value, |
| 275 value->isSiblingInvalidationSet(), | 288 value->isSiblingInvalidationSet(), |
| 276 value.isSiblingInvalidationSet()); | 289 value.isSiblingInvalidationSet()); |
| 277 | 290 |
| 278 } // namespace blink | 291 } // namespace blink |
| 279 | 292 |
| 280 #endif // InvalidationSet_h | 293 #endif // InvalidationSet_h |
| OLD | NEW |