| 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 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 return false; | 836 return false; |
| 837 | 837 |
| 838 for (; node; node = node->shadowHost()) { | 838 for (; node; node = node->shadowHost()) { |
| 839 if (treeScope() == node->treeScope()) | 839 if (treeScope() == node->treeScope()) |
| 840 return contains(node); | 840 return contains(node); |
| 841 } | 841 } |
| 842 | 842 |
| 843 return false; | 843 return false; |
| 844 } | 844 } |
| 845 | 845 |
| 846 Node* Node::retarget(const Node& target) const |
| 847 { |
| 848 for (const Node* ancestor = ⌖ ancestor; ancestor = ancestor->shadowHo
st()) { |
| 849 if (treeScope() == ancestor->treeScope()) |
| 850 return const_cast<Node*>(ancestor); |
| 851 } |
| 852 return nullptr; |
| 853 } |
| 854 |
| 846 bool Node::containsIncludingHostElements(const Node& node) const | 855 bool Node::containsIncludingHostElements(const Node& node) const |
| 847 { | 856 { |
| 848 const Node* current = &node; | 857 const Node* current = &node; |
| 849 do { | 858 do { |
| 850 if (current == this) | 859 if (current == this) |
| 851 return true; | 860 return true; |
| 852 if (current->isDocumentFragment() && toDocumentFragment(current)->isTemp
lateContent()) | 861 if (current->isDocumentFragment() && toDocumentFragment(current)->isTemp
lateContent()) |
| 853 current = static_cast<const TemplateContentDocumentFragment*>(curren
t)->host(); | 862 current = static_cast<const TemplateContentDocumentFragment*>(curren
t)->host(); |
| 854 else | 863 else |
| 855 current = current->parentOrShadowHostNode(); | 864 current = current->parentOrShadowHostNode(); |
| (...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2447 | 2456 |
| 2448 void showNodePath(const blink::Node* node) | 2457 void showNodePath(const blink::Node* node) |
| 2449 { | 2458 { |
| 2450 if (node) | 2459 if (node) |
| 2451 node->showNodePathForThis(); | 2460 node->showNodePathForThis(); |
| 2452 else | 2461 else |
| 2453 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2462 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2454 } | 2463 } |
| 2455 | 2464 |
| 2456 #endif | 2465 #endif |
| OLD | NEW |