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 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1999 parent = node->document().frame()->ownerElement(); | 1999 parent = node->document().frame()->ownerElement(); |
2000 return parent; | 2000 return parent; |
2001 } | 2001 } |
2002 | 2002 |
2003 static void showSubTreeAcrossFrame(const Node* node, const Node* markedNode, con
st String& indent) | 2003 static void showSubTreeAcrossFrame(const Node* node, const Node* markedNode, con
st String& indent) |
2004 { | 2004 { |
2005 if (node == markedNode) | 2005 if (node == markedNode) |
2006 fputs("*", stderr); | 2006 fputs("*", stderr); |
2007 fputs(indent.utf8().data(), stderr); | 2007 fputs(indent.utf8().data(), stderr); |
2008 node->showNode(); | 2008 node->showNode(); |
2009 if (node->isShadowRoot()) { | 2009 if (node->isShadowRoot()) { |
2010 if (ShadowRoot* youngerShadowRoot = toShadowRoot(node)->youngerShadowRo
ot()) | 2010 if (ShadowRoot* youngerShadowRoot = toShadowRoot(node)->youngerShadowRoo
t()) |
2011 showSubTreeAcrossFrame(youngerShadowRoot, markedNode, indent + "\t"
); | 2011 showSubTreeAcrossFrame(youngerShadowRoot, markedNode, indent + "\t")
; |
2012 } else { | 2012 } else { |
2013 if (node->isFrameOwnerElement()) | 2013 if (node->isFrameOwnerElement()) |
2014 showSubTreeAcrossFrame(static_cast<const HTMLFrameOwnerElement*>(no
de)->contentDocument(), markedNode, indent + "\t"); | 2014 showSubTreeAcrossFrame(toHTMLFrameOwnerElement(node)->contentDocumen
t(), markedNode, indent + "\t"); |
2015 if (ShadowRoot* oldestShadowRoot = oldestShadowRootFor(node)) | 2015 if (ShadowRoot* oldestShadowRoot = oldestShadowRootFor(node)) |
2016 showSubTreeAcrossFrame(oldestShadowRoot, markedNode, indent + "\t")
; | 2016 showSubTreeAcrossFrame(oldestShadowRoot, markedNode, indent + "\t"); |
2017 } | 2017 } |
2018 for (Node* child = node->firstChild(); child; child = child->nextSibling()) | 2018 for (Node* child = node->firstChild(); child; child = child->nextSibling()) |
2019 showSubTreeAcrossFrame(child, markedNode, indent + "\t"); | 2019 showSubTreeAcrossFrame(child, markedNode, indent + "\t"); |
2020 } | 2020 } |
2021 | 2021 |
2022 void Node::showTreeForThisAcrossFrame() const | 2022 void Node::showTreeForThisAcrossFrame() const |
2023 { | 2023 { |
2024 Node* rootNode = const_cast<Node*>(this); | 2024 Node* rootNode = const_cast<Node*>(this); |
2025 while (parentOrShadowHostOrFrameOwner(rootNode)) | 2025 while (parentOrShadowHostOrFrameOwner(rootNode)) |
2026 rootNode = parentOrShadowHostOrFrameOwner(rootNode); | 2026 rootNode = parentOrShadowHostOrFrameOwner(rootNode); |
2027 showSubTreeAcrossFrame(rootNode, this, ""); | 2027 showSubTreeAcrossFrame(rootNode, this, ""); |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2703 node->showTreeForThis(); | 2703 node->showTreeForThis(); |
2704 } | 2704 } |
2705 | 2705 |
2706 void showNodePath(const WebCore::Node* node) | 2706 void showNodePath(const WebCore::Node* node) |
2707 { | 2707 { |
2708 if (node) | 2708 if (node) |
2709 node->showNodePathForThis(); | 2709 node->showNodePathForThis(); |
2710 } | 2710 } |
2711 | 2711 |
2712 #endif | 2712 #endif |
OLD | NEW |