| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 return last; | 443 return last; |
| 444 last = currentElement->lastChild(); | 444 last = currentElement->lastChild(); |
| 445 if (!last) | 445 if (!last) |
| 446 last = currentElement->pseudoElement(BEFORE); | 446 last = currentElement->pseudoElement(BEFORE); |
| 447 return last; | 447 return last; |
| 448 } | 448 } |
| 449 | 449 |
| 450 return lastChild(); | 450 return lastChild(); |
| 451 } | 451 } |
| 452 | 452 |
| 453 Node& Node::treeRoot() const |
| 454 { |
| 455 if (isInTreeScope()) |
| 456 return treeScope().rootNode(); |
| 457 const Node* node = this; |
| 458 while (node->parentNode()) |
| 459 node = node->parentNode(); |
| 460 return const_cast<Node&>(*node); |
| 461 } |
| 462 |
| 453 PassRefPtrWillBeRawPtr<Node> Node::insertBefore(PassRefPtrWillBeRawPtr<Node> new
Child, Node* refChild, ExceptionState& exceptionState) | 463 PassRefPtrWillBeRawPtr<Node> Node::insertBefore(PassRefPtrWillBeRawPtr<Node> new
Child, Node* refChild, ExceptionState& exceptionState) |
| 454 { | 464 { |
| 455 if (isContainerNode()) | 465 if (isContainerNode()) |
| 456 return toContainerNode(this)->insertBefore(newChild, refChild, exception
State); | 466 return toContainerNode(this)->insertBefore(newChild, refChild, exception
State); |
| 457 | 467 |
| 458 exceptionState.throwDOMException(HierarchyRequestError, "This node type does
not support this method."); | 468 exceptionState.throwDOMException(HierarchyRequestError, "This node type does
not support this method."); |
| 459 return nullptr; | 469 return nullptr; |
| 460 } | 470 } |
| 461 | 471 |
| 462 PassRefPtrWillBeRawPtr<Node> Node::replaceChild(PassRefPtrWillBeRawPtr<Node> new
Child, PassRefPtrWillBeRawPtr<Node> oldChild, ExceptionState& exceptionState) | 472 PassRefPtrWillBeRawPtr<Node> Node::replaceChild(PassRefPtrWillBeRawPtr<Node> new
Child, PassRefPtrWillBeRawPtr<Node> oldChild, ExceptionState& exceptionState) |
| (...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2415 | 2425 |
| 2416 void showNodePath(const blink::Node* node) | 2426 void showNodePath(const blink::Node* node) |
| 2417 { | 2427 { |
| 2418 if (node) | 2428 if (node) |
| 2419 node->showNodePathForThis(); | 2429 node->showNodePathForThis(); |
| 2420 else | 2430 else |
| 2421 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2431 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2422 } | 2432 } |
| 2423 | 2433 |
| 2424 #endif | 2434 #endif |
| OLD | NEW |