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

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 698123002: Remove more API from Node and ContainerNode. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 return false; 637 return false;
638 } 638 }
639 639
640 return true; 640 return true;
641 } 641 }
642 642
643 PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionSt ate& exceptionState) 643 PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionSt ate& exceptionState)
644 { 644 {
645 switch (importedNode->nodeType()) { 645 switch (importedNode->nodeType()) {
646 case TEXT_NODE: 646 case TEXT_NODE:
647 return createTextNode(importedNode->nodeValue()); 647 return createTextNode(toText(importedNode)->data());
648 case ELEMENT_NODE: { 648 case ELEMENT_NODE: {
649 Element* oldElement = toElement(importedNode); 649 Element* oldElement = toElement(importedNode);
650 RefPtr<Element> newElement = createElement(oldElement->tagQName(), false ); 650 RefPtr<Element> newElement = createElement(oldElement->tagQName(), false );
651 651
652 newElement->cloneDataFromElement(*oldElement); 652 newElement->cloneDataFromElement(*oldElement);
653 653
654 if (deep) { 654 if (deep) {
655 if (!importContainerNodeChildren(oldElement, newElement, exceptionSt ate)) 655 if (!importContainerNodeChildren(oldElement, newElement, exceptionSt ate))
656 return nullptr; 656 return nullptr;
657 if (isHTMLTemplateElement(*oldElement) 657 if (isHTMLTemplateElement(*oldElement)
(...skipping 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after
3126 using namespace blink; 3126 using namespace blink;
3127 void showLiveDocumentInstances() 3127 void showLiveDocumentInstances()
3128 { 3128 {
3129 WeakDocumentSet& set = liveDocumentSet(); 3129 WeakDocumentSet& set = liveDocumentSet();
3130 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 3130 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
3131 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 3131 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
3132 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 3132 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
3133 } 3133 }
3134 } 3134 }
3135 #endif 3135 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/ContainerNode.cpp ('k') | sky/engine/core/dom/MutationObserverRegistration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698