| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 Node& Node::treeRoot() const | 374 Node& Node::treeRoot() const |
| 375 { | 375 { |
| 376 if (isInTreeScope()) | 376 if (isInTreeScope()) |
| 377 return containingTreeScope().rootNode(); | 377 return containingTreeScope().rootNode(); |
| 378 const Node* node = this; | 378 const Node* node = this; |
| 379 while (node->parentNode()) | 379 while (node->parentNode()) |
| 380 node = node->parentNode(); | 380 node = node->parentNode(); |
| 381 return const_cast<Node&>(*node); | 381 return const_cast<Node&>(*node); |
| 382 } | 382 } |
| 383 | 383 |
| 384 Node* Node::getRootNode(const GetRootNodeOptions& options) const |
| 385 { |
| 386 return (options.hasComposed() && options.composed()) ? &shadowIncludingRoot(
) : &treeRoot(); |
| 387 } |
| 388 |
| 384 Node* Node::insertBefore(Node* newChild, Node* refChild, ExceptionState& excepti
onState) | 389 Node* Node::insertBefore(Node* newChild, Node* refChild, ExceptionState& excepti
onState) |
| 385 { | 390 { |
| 386 if (isContainerNode()) | 391 if (isContainerNode()) |
| 387 return toContainerNode(this)->insertBefore(newChild, refChild, exception
State); | 392 return toContainerNode(this)->insertBefore(newChild, refChild, exception
State); |
| 388 | 393 |
| 389 exceptionState.throwDOMException(HierarchyRequestError, "This node type does
not support this method."); | 394 exceptionState.throwDOMException(HierarchyRequestError, "This node type does
not support this method."); |
| 390 return nullptr; | 395 return nullptr; |
| 391 } | 396 } |
| 392 | 397 |
| 393 Node* Node::replaceChild(Node* newChild, Node* oldChild, ExceptionState& excepti
onState) | 398 Node* Node::replaceChild(Node* newChild, Node* oldChild, ExceptionState& excepti
onState) |
| (...skipping 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2538 | 2543 |
| 2539 void showNodePath(const blink::Node* node) | 2544 void showNodePath(const blink::Node* node) |
| 2540 { | 2545 { |
| 2541 if (node) | 2546 if (node) |
| 2542 node->showNodePathForThis(); | 2547 node->showNodePathForThis(); |
| 2543 else | 2548 else |
| 2544 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2549 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2545 } | 2550 } |
| 2546 | 2551 |
| 2547 #endif | 2552 #endif |
| OLD | NEW |