| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013 Apple Inc. All r
ights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 ChildrenAffectedByFirstChildRules = 1 << 4, | 47 ChildrenAffectedByFirstChildRules = 1 << 4, |
| 48 ChildrenAffectedByLastChildRules = 1 << 5, | 48 ChildrenAffectedByLastChildRules = 1 << 5, |
| 49 ChildrenAffectedByDirectAdjacentRules = 1 << 6, | 49 ChildrenAffectedByDirectAdjacentRules = 1 << 6, |
| 50 ChildrenAffectedByIndirectAdjacentRules = 1 << 7, | 50 ChildrenAffectedByIndirectAdjacentRules = 1 << 7, |
| 51 ChildrenAffectedByForwardPositionalRules = 1 << 8, | 51 ChildrenAffectedByForwardPositionalRules = 1 << 8, |
| 52 ChildrenAffectedByBackwardPositionalRules = 1 << 9, | 52 ChildrenAffectedByBackwardPositionalRules = 1 << 9, |
| 53 AffectedByFirstChildRules = 1 << 10, | 53 AffectedByFirstChildRules = 1 << 10, |
| 54 AffectedByLastChildRules = 1 << 11, | 54 AffectedByLastChildRules = 1 << 11, |
| 55 | 55 |
| 56 NumberOfDynamicRestyleFlags = 12, | 56 NumberOfDynamicRestyleFlags = 12, |
| 57 |
| 58 ChildrenAffectedByStructuralRules = ChildrenAffectedByFirstChildRules |
| 59 | ChildrenAffectedByLastChildRules |
| 60 | ChildrenAffectedByDirectAdjacentRules |
| 61 | ChildrenAffectedByIndirectAdjacentRules |
| 62 | ChildrenAffectedByForwardPositionalRules |
| 63 | ChildrenAffectedByBackwardPositionalRules |
| 57 }; | 64 }; |
| 58 | 65 |
| 59 enum SubtreeModificationAction { | 66 enum SubtreeModificationAction { |
| 60 DispatchSubtreeModifiedEvent, | 67 DispatchSubtreeModifiedEvent, |
| 61 OmitSubtreeModifiedEvent | 68 OmitSubtreeModifiedEvent |
| 62 }; | 69 }; |
| 63 | 70 |
| 64 // This constant controls how much buffer is initially allocated | 71 // This constant controls how much buffer is initially allocated |
| 65 // for a Node Vector that is used to store child Nodes of a given Node. | 72 // for a Node Vector that is used to store child Nodes of a given Node. |
| 66 // FIXME: Optimize the value. | 73 // FIXME: Optimize the value. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 void setAffectedByFirstChildRules() { setRestyleFlag(AffectedByFirstChildRul
es); } | 158 void setAffectedByFirstChildRules() { setRestyleFlag(AffectedByFirstChildRul
es); } |
| 152 | 159 |
| 153 bool affectedByLastChildRules() const { return hasRestyleFlag(AffectedByLast
ChildRules); } | 160 bool affectedByLastChildRules() const { return hasRestyleFlag(AffectedByLast
ChildRules); } |
| 154 void setAffectedByLastChildRules() { setRestyleFlag(AffectedByLastChildRules
); } | 161 void setAffectedByLastChildRules() { setRestyleFlag(AffectedByLastChildRules
); } |
| 155 | 162 |
| 156 bool needsAdjacentStyleRecalc() const; | 163 bool needsAdjacentStyleRecalc() const; |
| 157 | 164 |
| 158 // FIXME: These methods should all be renamed to something better than "chec
k", | 165 // FIXME: These methods should all be renamed to something better than "chec
k", |
| 159 // since it's not clear that they alter the style bits of siblings and child
ren. | 166 // since it's not clear that they alter the style bits of siblings and child
ren. |
| 160 enum SiblingCheckType { FinishedParsingChildren, SiblingElementInserted, Sib
lingElementRemoved }; | 167 enum SiblingCheckType { FinishedParsingChildren, SiblingElementInserted, Sib
lingElementRemoved }; |
| 161 void checkForSiblingStyleChanges(SiblingCheckType, Node* changedNode, Node*
nodeBeforeChange, Node* nodeAfterChange); | 168 void checkForSiblingStyleChanges(SiblingCheckType, Element* changedElement,
Node* nodeBeforeChange, Node* nodeAfterChange); |
| 162 void recalcDescendantStyles(StyleRecalcChange); | 169 void recalcDescendantStyles(StyleRecalcChange); |
| 163 | 170 |
| 164 bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); } | 171 bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); } |
| 165 | 172 |
| 166 // -------------------------------------------------------------------------
---- | 173 // -------------------------------------------------------------------------
---- |
| 167 // Notification of document structure changes (see core/dom/Node.h for more
notification methods) | 174 // Notification of document structure changes (see core/dom/Node.h for more
notification methods) |
| 168 | 175 |
| 169 enum ChildrenChangeType { ElementInserted, NonElementInserted, ElementRemove
d, NonElementRemoved, AllChildrenRemoved, TextChanged }; | 176 enum ChildrenChangeType { ElementInserted, NonElementInserted, ElementRemove
d, NonElementRemoved, AllChildrenRemoved, TextChanged }; |
| 170 enum ChildrenChangeSource { ChildrenChangeSourceAPI, ChildrenChangeSourcePar
ser }; | 177 enum ChildrenChangeSource { ChildrenChangeSourceAPI, ChildrenChangeSourcePar
ser }; |
| 171 struct ChildrenChange { | 178 struct ChildrenChange { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 inline void getChildNodes(ContainerNode& node, NodeVector& nodes) | 345 inline void getChildNodes(ContainerNode& node, NodeVector& nodes) |
| 339 { | 346 { |
| 340 DCHECK(!nodes.size()); | 347 DCHECK(!nodes.size()); |
| 341 for (Node* child = node.firstChild(); child; child = child->nextSibling()) | 348 for (Node* child = node.firstChild(); child; child = child->nextSibling()) |
| 342 nodes.append(child); | 349 nodes.append(child); |
| 343 } | 350 } |
| 344 | 351 |
| 345 } // namespace blink | 352 } // namespace blink |
| 346 | 353 |
| 347 #endif // ContainerNode_h | 354 #endif // ContainerNode_h |
| OLD | NEW |