| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 return last; | 457 return last; |
| 458 last = currentElement->lastChild(); | 458 last = currentElement->lastChild(); |
| 459 if (!last) | 459 if (!last) |
| 460 last = currentElement->pseudoElement(BEFORE); | 460 last = currentElement->pseudoElement(BEFORE); |
| 461 return last; | 461 return last; |
| 462 } | 462 } |
| 463 | 463 |
| 464 return lastChild(); | 464 return lastChild(); |
| 465 } | 465 } |
| 466 | 466 |
| 467 void Node::insertBefore(PassRefPtrWillBeRawPtr<Node> newChild, Node* refChild, E
xceptionState& exceptionState) | 467 PassRefPtrWillBeRawPtr<Node> Node::insertBefore(PassRefPtrWillBeRawPtr<Node> new
Child, Node* refChild, ExceptionState& exceptionState) |
| 468 { | 468 { |
| 469 if (isContainerNode()) | 469 if (isContainerNode()) |
| 470 toContainerNode(this)->insertBefore(newChild, refChild, exceptionState); | 470 return toContainerNode(this)->insertBefore(newChild, refChild, exception
State); |
| 471 else | 471 |
| 472 exceptionState.throwDOMException(HierarchyRequestError, "This node type
does not support this method."); | 472 exceptionState.throwDOMException(HierarchyRequestError, "This node type does
not support this method."); |
| 473 return nullptr; |
| 473 } | 474 } |
| 474 | 475 |
| 475 void Node::replaceChild(PassRefPtrWillBeRawPtr<Node> newChild, Node* oldChild, E
xceptionState& exceptionState) | 476 void Node::replaceChild(PassRefPtrWillBeRawPtr<Node> newChild, Node* oldChild, E
xceptionState& exceptionState) |
| 476 { | 477 { |
| 477 if (isContainerNode()) | 478 if (isContainerNode()) |
| 478 toContainerNode(this)->replaceChild(newChild, oldChild, exceptionState); | 479 toContainerNode(this)->replaceChild(newChild, oldChild, exceptionState); |
| 479 else | 480 else |
| 480 exceptionState.throwDOMException(HierarchyRequestError, "This node type
does not support this method."); | 481 exceptionState.throwDOMException(HierarchyRequestError, "This node type
does not support this method."); |
| 481 } | 482 } |
| 482 | 483 |
| 483 void Node::removeChild(Node* oldChild, ExceptionState& exceptionState) | 484 void Node::removeChild(Node* oldChild, ExceptionState& exceptionState) |
| 484 { | 485 { |
| 485 if (isContainerNode()) | 486 if (isContainerNode()) |
| 486 toContainerNode(this)->removeChild(oldChild, exceptionState); | 487 toContainerNode(this)->removeChild(oldChild, exceptionState); |
| 487 else | 488 else |
| 488 exceptionState.throwDOMException(NotFoundError, "This node type does not
support this method."); | 489 exceptionState.throwDOMException(NotFoundError, "This node type does not
support this method."); |
| 489 } | 490 } |
| 490 | 491 |
| 491 void Node::appendChild(PassRefPtrWillBeRawPtr<Node> newChild, ExceptionState& ex
ceptionState) | 492 PassRefPtrWillBeRawPtr<Node> Node::appendChild(PassRefPtrWillBeRawPtr<Node> newC
hild, ExceptionState& exceptionState) |
| 492 { | 493 { |
| 493 if (isContainerNode()) | 494 if (isContainerNode()) |
| 494 toContainerNode(this)->appendChild(newChild, exceptionState); | 495 return toContainerNode(this)->appendChild(newChild, exceptionState); |
| 495 else | 496 |
| 496 exceptionState.throwDOMException(HierarchyRequestError, "This node type
does not support this method."); | 497 exceptionState.throwDOMException(HierarchyRequestError, "This node type does
not support this method."); |
| 498 return nullptr; |
| 497 } | 499 } |
| 498 | 500 |
| 499 void Node::remove(ExceptionState& exceptionState) | 501 void Node::remove(ExceptionState& exceptionState) |
| 500 { | 502 { |
| 501 if (ContainerNode* parent = parentNode()) | 503 if (ContainerNode* parent = parentNode()) |
| 502 parent->removeChild(this, exceptionState); | 504 parent->removeChild(this, exceptionState); |
| 503 } | 505 } |
| 504 | 506 |
| 505 void Node::normalize() | 507 void Node::normalize() |
| 506 { | 508 { |
| (...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2569 node->showTreeForThis(); | 2571 node->showTreeForThis(); |
| 2570 } | 2572 } |
| 2571 | 2573 |
| 2572 void showNodePath(const WebCore::Node* node) | 2574 void showNodePath(const WebCore::Node* node) |
| 2573 { | 2575 { |
| 2574 if (node) | 2576 if (node) |
| 2575 node->showNodePathForThis(); | 2577 node->showNodePathForThis(); |
| 2576 } | 2578 } |
| 2577 | 2579 |
| 2578 #endif | 2580 #endif |
| OLD | NEW |