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, 2013 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights
reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 removeBetween(0, child->nextSibling(), *child); | 663 removeBetween(0, child->nextSibling(), *child); |
664 removedChildren.append(child.get()); | 664 removedChildren.append(child.get()); |
665 notifyNodeRemoved(*child); | 665 notifyNodeRemoved(*child); |
666 } | 666 } |
667 } | 667 } |
668 | 668 |
669 ChildrenChange change = {AllChildrenRemoved, nullptr, nullptr, ChildrenC
hangeSourceAPI}; | 669 ChildrenChange change = {AllChildrenRemoved, nullptr, nullptr, ChildrenC
hangeSourceAPI}; |
670 childrenChanged(change); | 670 childrenChanged(change); |
671 } | 671 } |
672 | 672 |
673 dispatchSubtreeModifiedEvent(); | 673 // We don't fire the DOMSubtreeModified event for Attr Nodes. This matches t
he behavior |
| 674 // of IE and Firefox. This event is fired synchronously and is a source of t
rouble for |
| 675 // attributes as the JS callback could alter the attributes and leave us in
a bad state. |
| 676 if (!isAttributeNode()) |
| 677 dispatchSubtreeModifiedEvent(); |
674 } | 678 } |
675 | 679 |
676 PassRefPtrWillBeRawPtr<Node> ContainerNode::appendChild(PassRefPtrWillBeRawPtr<N
ode> newChild, ExceptionState& exceptionState) | 680 PassRefPtrWillBeRawPtr<Node> ContainerNode::appendChild(PassRefPtrWillBeRawPtr<N
ode> newChild, ExceptionState& exceptionState) |
677 { | 681 { |
678 RefPtrWillBeRawPtr<ContainerNode> protect(this); | 682 RefPtrWillBeRawPtr<ContainerNode> protect(this); |
679 | 683 |
680 #if !ENABLE(OILPAN) | 684 #if !ENABLE(OILPAN) |
681 // Check that this node is not "floating". | 685 // Check that this node is not "floating". |
682 // If it is, it can be deleted as a side effect of sending mutation events. | 686 // If it is, it can be deleted as a side effect of sending mutation events. |
683 ASSERT(refCount() || parentOrShadowHostNode()); | 687 ASSERT(refCount() || parentOrShadowHostNode()); |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1406 return true; | 1410 return true; |
1407 | 1411 |
1408 if (node->isElementNode() && toElement(node)->shadow()) | 1412 if (node->isElementNode() && toElement(node)->shadow()) |
1409 return true; | 1413 return true; |
1410 | 1414 |
1411 return false; | 1415 return false; |
1412 } | 1416 } |
1413 #endif | 1417 #endif |
1414 | 1418 |
1415 } // namespace blink | 1419 } // namespace blink |
OLD | NEW |