Chromium Code Reviews| 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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 907 if (exceptionState.hadException()) | 907 if (exceptionState.hadException()) |
| 908 return false; | 908 return false; |
| 909 newContainerNode->appendChild(newChild.release(), exceptionState); | 909 newContainerNode->appendChild(newChild.release(), exceptionState); |
| 910 if (exceptionState.hadException()) | 910 if (exceptionState.hadException()) |
| 911 return false; | 911 return false; |
| 912 } | 912 } |
| 913 | 913 |
| 914 return true; | 914 return true; |
| 915 } | 915 } |
| 916 | 916 |
| 917 PassRefPtr<Node> Document::importNode(Node* importedNode, ExceptionState& ec) | |
| 918 { | |
| 919 addConsoleMessage(JSMessageSource, WarningMessageLevel, "The behavior of imp ortNode() with no boolean argument is about to change from doing a deep clone to doing a shallow clone. Make sure to pass an explicit boolean argument to keep your current behavior."); | |
|
Inactive
2014/04/30 14:58:28
Don't we want to use a UseCounter so that we are s
| |
| 920 return importNode(importedNode, false, ec); | |
|
Inactive
2014/04/30 14:58:28
Well, it looks like you are still changing the beh
| |
| 921 } | |
| 922 | |
| 917 PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionSt ate& exceptionState) | 923 PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionSt ate& exceptionState) |
| 918 { | 924 { |
| 919 if (!importedNode) { | 925 if (!importedNode) { |
| 920 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node")); | 926 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node")); |
| 921 return nullptr; | 927 return nullptr; |
| 922 } | 928 } |
| 923 | 929 |
| 924 switch (importedNode->nodeType()) { | 930 switch (importedNode->nodeType()) { |
| 925 case TEXT_NODE: | 931 case TEXT_NODE: |
| 926 return createTextNode(importedNode->nodeValue()); | 932 return createTextNode(importedNode->nodeValue()); |
| (...skipping 4730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5657 { | 5663 { |
| 5658 visitor->trace(m_styleSheetList); | 5664 visitor->trace(m_styleSheetList); |
| 5659 visitor->trace(m_visibilityObservers); | 5665 visitor->trace(m_visibilityObservers); |
| 5660 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5666 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
| 5661 Supplementable<Document>::trace(visitor); | 5667 Supplementable<Document>::trace(visitor); |
| 5662 TreeScope::trace(visitor); | 5668 TreeScope::trace(visitor); |
| 5663 ContainerNode::trace(visitor); | 5669 ContainerNode::trace(visitor); |
| 5664 } | 5670 } |
| 5665 | 5671 |
| 5666 } // namespace WebCore | 5672 } // namespace WebCore |
| OLD | NEW |