| 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, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 | 909 |
| 910 detach(context); | 910 detach(context); |
| 911 markAncestorsWithChildNeedsStyleRecalc(); | 911 markAncestorsWithChildNeedsStyleRecalc(); |
| 912 } | 912 } |
| 913 | 913 |
| 914 inline bool shouldRecalcStyle(StyleRecalcChange change, const Node* node) | 914 inline bool shouldRecalcStyle(StyleRecalcChange change, const Node* node) |
| 915 { | 915 { |
| 916 return change >= Inherit || node->childNeedsStyleRecalc() || node->needsStyl
eRecalc(); | 916 return change >= Inherit || node->childNeedsStyleRecalc() || node->needsStyl
eRecalc(); |
| 917 } | 917 } |
| 918 | 918 |
| 919 inline bool isTreeScopeRoot(const Node* node) | |
| 920 { | |
| 921 return !node || node->isDocumentNode() || node->isShadowRoot(); | |
| 922 } | |
| 923 | |
| 924 inline bool isTreeScopeRoot(const Node& node) | |
| 925 { | |
| 926 return node.isDocumentNode() || node.isShadowRoot(); | |
| 927 } | |
| 928 | |
| 929 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. | 919 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. |
| 930 inline bool operator==(const Node& a, const Node& b) { return &a == &b; } | 920 inline bool operator==(const Node& a, const Node& b) { return &a == &b; } |
| 931 inline bool operator==(const Node& a, const Node* b) { return &a == b; } | 921 inline bool operator==(const Node& a, const Node* b) { return &a == b; } |
| 932 inline bool operator==(const Node* a, const Node& b) { return a == &b; } | 922 inline bool operator==(const Node* a, const Node& b) { return a == &b; } |
| 933 inline bool operator!=(const Node& a, const Node& b) { return !(a == b); } | 923 inline bool operator!=(const Node& a, const Node& b) { return !(a == b); } |
| 934 inline bool operator!=(const Node& a, const Node* b) { return !(a == b); } | 924 inline bool operator!=(const Node& a, const Node* b) { return !(a == b); } |
| 935 inline bool operator!=(const Node* a, const Node& b) { return !(a == b); } | 925 inline bool operator!=(const Node* a, const Node& b) { return !(a == b); } |
| 936 inline bool operator==(const PassRefPtr<Node>& a, const Node& b) { return a.get(
) == &b; } | 926 inline bool operator==(const PassRefPtr<Node>& a, const Node& b) { return a.get(
) == &b; } |
| 937 inline bool operator==(const Node& a, const PassRefPtr<Node>& b) { return &a ==
b.get(); } | 927 inline bool operator==(const Node& a, const PassRefPtr<Node>& b) { return &a ==
b.get(); } |
| 938 inline bool operator!=(const PassRefPtr<Node>& a, const Node& b) { return !(a ==
b); } | 928 inline bool operator!=(const PassRefPtr<Node>& a, const Node& b) { return !(a ==
b); } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 950 | 940 |
| 951 } // namespace WebCore | 941 } // namespace WebCore |
| 952 | 942 |
| 953 #ifndef NDEBUG | 943 #ifndef NDEBUG |
| 954 // Outside the WebCore namespace for ease of invocation from gdb. | 944 // Outside the WebCore namespace for ease of invocation from gdb. |
| 955 void showTree(const WebCore::Node*); | 945 void showTree(const WebCore::Node*); |
| 956 void showNodePath(const WebCore::Node*); | 946 void showNodePath(const WebCore::Node*); |
| 957 #endif | 947 #endif |
| 958 | 948 |
| 959 #endif | 949 #endif |
| OLD | NEW |