Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Side by Side Diff: Source/core/dom/Document.cpp

Issue 252713004: Make default for deep parameter in importNode false (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use countDeprecation Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 UseCounter::countDeprecation(this, UseCounter::DocumentImportNodeOptionalArg ument);
920 return importNode(importedNode, true, ec);
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698