| 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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 | 905 |
| 906 detach(context); | 906 detach(context); |
| 907 markAncestorsWithChildNeedsStyleRecalc(); | 907 markAncestorsWithChildNeedsStyleRecalc(); |
| 908 } | 908 } |
| 909 | 909 |
| 910 inline bool shouldRecalcStyle(StyleRecalcChange change, const Node* node) | 910 inline bool shouldRecalcStyle(StyleRecalcChange change, const Node* node) |
| 911 { | 911 { |
| 912 return change >= Inherit || node->childNeedsStyleRecalc() || node->needsStyl
eRecalc(); | 912 return change >= Inherit || node->childNeedsStyleRecalc() || node->needsStyl
eRecalc(); |
| 913 } | 913 } |
| 914 | 914 |
| 915 inline bool isTreeScopeRoot(const Node* node) |
| 916 { |
| 917 return !node || node->isDocumentNode() || node->isShadowRoot(); |
| 918 } |
| 919 |
| 920 inline bool isTreeScopeRoot(const Node& node) |
| 921 { |
| 922 return node.isDocumentNode() || node.isShadowRoot(); |
| 923 } |
| 924 |
| 915 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. | 925 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. |
| 916 inline bool operator==(const Node& a, const Node& b) { return &a == &b; } | 926 inline bool operator==(const Node& a, const Node& b) { return &a == &b; } |
| 917 inline bool operator==(const Node& a, const Node* b) { return &a == b; } | 927 inline bool operator==(const Node& a, const Node* b) { return &a == b; } |
| 918 inline bool operator==(const Node* a, const Node& b) { return a == &b; } | 928 inline bool operator==(const Node* a, const Node& b) { return a == &b; } |
| 919 inline bool operator!=(const Node& a, const Node& b) { return !(a == b); } | 929 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); } | 930 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); } | 931 inline bool operator!=(const Node* a, const Node& b) { return !(a == b); } |
| 922 inline bool operator==(const PassRefPtr<Node>& a, const Node& b) { return a.get(
) == &b; } | 932 inline bool operator==(const PassRefPtr<Node>& a, const Node& b) { return a.get(
) == &b; } |
| 923 inline bool operator==(const Node& a, const PassRefPtr<Node>& b) { return &a ==
b.get(); } | 933 inline bool operator==(const Node& a, const PassRefPtr<Node>& b) { return &a ==
b.get(); } |
| 924 inline bool operator!=(const PassRefPtr<Node>& a, const Node& b) { return !(a ==
b); } | 934 inline bool operator!=(const PassRefPtr<Node>& a, const Node& b) { return !(a ==
b); } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 936 | 946 |
| 937 } // namespace WebCore | 947 } // namespace WebCore |
| 938 | 948 |
| 939 #ifndef NDEBUG | 949 #ifndef NDEBUG |
| 940 // Outside the WebCore namespace for ease of invocation from gdb. | 950 // Outside the WebCore namespace for ease of invocation from gdb. |
| 941 void showTree(const WebCore::Node*); | 951 void showTree(const WebCore::Node*); |
| 942 void showNodePath(const WebCore::Node*); | 952 void showNodePath(const WebCore::Node*); |
| 943 #endif | 953 #endif |
| 944 | 954 |
| 945 #endif | 955 #endif |
| OLD | NEW |