| 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 | |
| 64 }; | 57 }; |
| 65 | 58 |
| 66 enum SubtreeModificationAction { | 59 enum SubtreeModificationAction { |
| 67 DispatchSubtreeModifiedEvent, | 60 DispatchSubtreeModifiedEvent, |
| 68 OmitSubtreeModifiedEvent | 61 OmitSubtreeModifiedEvent |
| 69 }; | 62 }; |
| 70 | 63 |
| 71 // This constant controls how much buffer is initially allocated | 64 // This constant controls how much buffer is initially allocated |
| 72 // for a Node Vector that is used to store child Nodes of a given Node. | 65 // for a Node Vector that is used to store child Nodes of a given Node. |
| 73 // FIXME: Optimize the value. | 66 // FIXME: Optimize the value. |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 void setAffectedByFirstChildRules() { setRestyleFlag(AffectedByFirstChildRul
es); } | 152 void setAffectedByFirstChildRules() { setRestyleFlag(AffectedByFirstChildRul
es); } |
| 160 | 153 |
| 161 bool affectedByLastChildRules() const { return hasRestyleFlag(AffectedByLast
ChildRules); } | 154 bool affectedByLastChildRules() const { return hasRestyleFlag(AffectedByLast
ChildRules); } |
| 162 void setAffectedByLastChildRules() { setRestyleFlag(AffectedByLastChildRules
); } | 155 void setAffectedByLastChildRules() { setRestyleFlag(AffectedByLastChildRules
); } |
| 163 | 156 |
| 164 bool needsAdjacentStyleRecalc() const; | 157 bool needsAdjacentStyleRecalc() const; |
| 165 | 158 |
| 166 // FIXME: These methods should all be renamed to something better than "chec
k", | 159 // FIXME: These methods should all be renamed to something better than "chec
k", |
| 167 // since it's not clear that they alter the style bits of siblings and child
ren. | 160 // since it's not clear that they alter the style bits of siblings and child
ren. |
| 168 enum SiblingCheckType { FinishedParsingChildren, SiblingElementInserted, Sib
lingElementRemoved }; | 161 enum SiblingCheckType { FinishedParsingChildren, SiblingElementInserted, Sib
lingElementRemoved }; |
| 169 void checkForSiblingStyleChanges(SiblingCheckType, Element* changedElement,
Node* nodeBeforeChange, Node* nodeAfterChange); | 162 void checkForSiblingStyleChanges(SiblingCheckType, Node* changedNode, Node*
nodeBeforeChange, Node* nodeAfterChange); |
| 170 void recalcDescendantStyles(StyleRecalcChange); | 163 void recalcDescendantStyles(StyleRecalcChange); |
| 171 | 164 |
| 172 bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); } | 165 bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); } |
| 173 | 166 |
| 174 // -------------------------------------------------------------------------
---- | 167 // -------------------------------------------------------------------------
---- |
| 175 // Notification of document structure changes (see core/dom/Node.h for more
notification methods) | 168 // Notification of document structure changes (see core/dom/Node.h for more
notification methods) |
| 176 | 169 |
| 177 enum ChildrenChangeType { ElementInserted, NonElementInserted, ElementRemove
d, NonElementRemoved, AllChildrenRemoved, TextChanged }; | 170 enum ChildrenChangeType { ElementInserted, NonElementInserted, ElementRemove
d, NonElementRemoved, AllChildrenRemoved, TextChanged }; |
| 178 enum ChildrenChangeSource { ChildrenChangeSourceAPI, ChildrenChangeSourcePar
ser }; | 171 enum ChildrenChangeSource { ChildrenChangeSourceAPI, ChildrenChangeSourcePar
ser }; |
| 179 struct ChildrenChange { | 172 struct ChildrenChange { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 inline void getChildNodes(ContainerNode& node, NodeVector& nodes) | 339 inline void getChildNodes(ContainerNode& node, NodeVector& nodes) |
| 347 { | 340 { |
| 348 DCHECK(!nodes.size()); | 341 DCHECK(!nodes.size()); |
| 349 for (Node* child = node.firstChild(); child; child = child->nextSibling()) | 342 for (Node* child = node.firstChild(); child; child = child->nextSibling()) |
| 350 nodes.append(child); | 343 nodes.append(child); |
| 351 } | 344 } |
| 352 | 345 |
| 353 } // namespace blink | 346 } // namespace blink |
| 354 | 347 |
| 355 #endif // ContainerNode_h | 348 #endif // ContainerNode_h |
| OLD | NEW |