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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 | 967 |
968 detachLayoutTree(context); | 968 detachLayoutTree(context); |
969 markAncestorsWithChildNeedsStyleRecalc(); | 969 markAncestorsWithChildNeedsStyleRecalc(); |
970 } | 970 } |
971 | 971 |
972 inline bool Node::shouldCallRecalcStyle(StyleRecalcChange change) { | 972 inline bool Node::shouldCallRecalcStyle(StyleRecalcChange change) { |
973 return change >= IndependentInherit || needsStyleRecalc() || | 973 return change >= IndependentInherit || needsStyleRecalc() || |
974 childNeedsStyleRecalc(); | 974 childNeedsStyleRecalc(); |
975 } | 975 } |
976 | 976 |
977 inline bool isTreeScopeRoot(const Node* node) { | |
978 return !node || node->isDocumentNode() || node->isShadowRoot(); | |
979 } | |
980 | |
981 inline bool isTreeScopeRoot(const Node& node) { | |
982 return node.isDocumentNode() || node.isShadowRoot(); | |
983 } | |
984 | |
985 // See the comment at the declaration of ScriptWrappable::fromNode in | 977 // See the comment at the declaration of ScriptWrappable::fromNode in |
986 // bindings/core/v8/ScriptWrappable.h about why this method is defined here. | 978 // bindings/core/v8/ScriptWrappable.h about why this method is defined here. |
987 inline ScriptWrappable* ScriptWrappable::fromNode(Node* node) { | 979 inline ScriptWrappable* ScriptWrappable::fromNode(Node* node) { |
988 return node; | 980 return node; |
989 } | 981 } |
990 | 982 |
991 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. | 983 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. |
992 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Node) | 984 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Node) |
993 | 985 |
994 #define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \ | 986 #define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \ |
(...skipping 14 matching lines...) Expand all Loading... |
1009 } // namespace blink | 1001 } // namespace blink |
1010 | 1002 |
1011 #ifndef NDEBUG | 1003 #ifndef NDEBUG |
1012 // Outside the WebCore namespace for ease of invocation from gdb. | 1004 // Outside the WebCore namespace for ease of invocation from gdb. |
1013 void showNode(const blink::Node*); | 1005 void showNode(const blink::Node*); |
1014 void showTree(const blink::Node*); | 1006 void showTree(const blink::Node*); |
1015 void showNodePath(const blink::Node*); | 1007 void showNodePath(const blink::Node*); |
1016 #endif | 1008 #endif |
1017 | 1009 |
1018 #endif // Node_h | 1010 #endif // Node_h |
OLD | NEW |