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-2011, 2014 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. |
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
7 * (http://www.torchmobile.com/) | 7 * (http://www.torchmobile.com/) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 | 815 |
816 HasNameOrIsEditingTextFlag = 1 << 22, | 816 HasNameOrIsEditingTextFlag = 1 << 22, |
817 HasEventTargetDataFlag = 1 << 23, | 817 HasEventTargetDataFlag = 1 << 23, |
818 | 818 |
819 V0CustomElementFlag = 1 << 24, | 819 V0CustomElementFlag = 1 << 24, |
820 V0CustomElementUpgradedFlag = 1 << 25, | 820 V0CustomElementUpgradedFlag = 1 << 25, |
821 | 821 |
822 NeedsReattachLayoutTree = 1 << 26, | 822 NeedsReattachLayoutTree = 1 << 26, |
823 ChildNeedsReattachLayoutTree = 1 << 27, | 823 ChildNeedsReattachLayoutTree = 1 << 27, |
824 | 824 |
825 DefaultNodeFlags = IsFinishedParsingChildrenFlag | | 825 DefaultNodeFlags = IsFinishedParsingChildrenFlag | NeedsReattachStyleChange |
826 NeedsReattachStyleChange | | |
827 NeedsReattachLayoutTree | |
828 }; | 826 }; |
829 | 827 |
830 // 4 bits remaining. | 828 // 4 bits remaining. |
831 | 829 |
832 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } | 830 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } |
833 void setFlag(bool f, NodeFlags mask) { | 831 void setFlag(bool f, NodeFlags mask) { |
834 m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); | 832 m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); |
835 } | 833 } |
836 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } | 834 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } |
837 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } | 835 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 if (needsAttach()) | 960 if (needsAttach()) |
963 return; | 961 return; |
964 if (!inActiveDocument()) | 962 if (!inActiveDocument()) |
965 return; | 963 return; |
966 | 964 |
967 AttachContext context; | 965 AttachContext context; |
968 context.performingReattach = true; | 966 context.performingReattach = true; |
969 | 967 |
970 detachLayoutTree(context); | 968 detachLayoutTree(context); |
971 markAncestorsWithChildNeedsStyleRecalc(); | 969 markAncestorsWithChildNeedsStyleRecalc(); |
972 markAncestorsWithChildNeedsReattachLayoutTree(); | |
973 } | 970 } |
974 | 971 |
975 inline bool Node::shouldCallRecalcStyle(StyleRecalcChange change) { | 972 inline bool Node::shouldCallRecalcStyle(StyleRecalcChange change) { |
976 return change >= IndependentInherit || needsStyleRecalc() || | 973 return change >= IndependentInherit || needsStyleRecalc() || |
977 childNeedsStyleRecalc(); | 974 childNeedsStyleRecalc(); |
978 } | 975 } |
979 | 976 |
980 inline bool isTreeScopeRoot(const Node* node) { | 977 inline bool isTreeScopeRoot(const Node* node) { |
981 return !node || node->isDocumentNode() || node->isShadowRoot(); | 978 return !node || node->isDocumentNode() || node->isShadowRoot(); |
982 } | 979 } |
(...skipping 29 matching lines...) Expand all Loading... |
1012 } // namespace blink | 1009 } // namespace blink |
1013 | 1010 |
1014 #ifndef NDEBUG | 1011 #ifndef NDEBUG |
1015 // Outside the WebCore namespace for ease of invocation from gdb. | 1012 // Outside the WebCore namespace for ease of invocation from gdb. |
1016 void showNode(const blink::Node*); | 1013 void showNode(const blink::Node*); |
1017 void showTree(const blink::Node*); | 1014 void showTree(const blink::Node*); |
1018 void showNodePath(const blink::Node*); | 1015 void showNodePath(const blink::Node*); |
1019 #endif | 1016 #endif |
1020 | 1017 |
1021 #endif // Node_h | 1018 #endif // Node_h |
OLD | NEW |