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

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

Issue 291233003: Revert 174382 "Oilpan: make DocumentFragment a heap allocated ob..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « trunk/Source/core/dom/Document.h ('k') | trunk/Source/core/dom/DocumentFragment.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 } 860 }
861 861
862 LocalFrame* Document::executingFrame() 862 LocalFrame* Document::executingFrame()
863 { 863 {
864 DOMWindow* window = executingWindow(); 864 DOMWindow* window = executingWindow();
865 if (!window) 865 if (!window)
866 return 0; 866 return 0;
867 return window->frame(); 867 return window->frame();
868 } 868 }
869 869
870 PassRefPtrWillBeRawPtr<DocumentFragment> Document::createDocumentFragment() 870 PassRefPtr<DocumentFragment> Document::createDocumentFragment()
871 { 871 {
872 return DocumentFragment::create(*this); 872 return DocumentFragment::create(*this);
873 } 873 }
874 874
875 PassRefPtrWillBeRawPtr<Text> Document::createTextNode(const String& data) 875 PassRefPtrWillBeRawPtr<Text> Document::createTextNode(const String& data)
876 { 876 {
877 return Text::create(*this, data); 877 return Text::create(*this, data);
878 } 878 }
879 879
880 PassRefPtrWillBeRawPtr<Comment> Document::createComment(const String& data) 880 PassRefPtrWillBeRawPtr<Comment> Document::createComment(const String& data)
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 case ATTRIBUTE_NODE: 978 case ATTRIBUTE_NODE:
979 return Attr::create(*this, QualifiedName(nullAtom, AtomicString(toAttr(i mportedNode)->name()), nullAtom), toAttr(importedNode)->value()); 979 return Attr::create(*this, QualifiedName(nullAtom, AtomicString(toAttr(i mportedNode)->name()), nullAtom), toAttr(importedNode)->value());
980 case DOCUMENT_FRAGMENT_NODE: { 980 case DOCUMENT_FRAGMENT_NODE: {
981 if (importedNode->isShadowRoot()) { 981 if (importedNode->isShadowRoot()) {
982 // ShadowRoot nodes should not be explicitly importable. 982 // ShadowRoot nodes should not be explicitly importable.
983 // Either they are imported along with their host node, or created i mplicitly. 983 // Either they are imported along with their host node, or created i mplicitly.
984 exceptionState.throwDOMException(NotSupportedError, "The node provid ed is a shadow root, which may not be imported."); 984 exceptionState.throwDOMException(NotSupportedError, "The node provid ed is a shadow root, which may not be imported.");
985 return nullptr; 985 return nullptr;
986 } 986 }
987 DocumentFragment* oldFragment = toDocumentFragment(importedNode); 987 DocumentFragment* oldFragment = toDocumentFragment(importedNode);
988 RefPtrWillBeRawPtr<DocumentFragment> newFragment = createDocumentFragmen t(); 988 RefPtr<DocumentFragment> newFragment = createDocumentFragment();
989 if (deep && !importContainerNodeChildren(oldFragment, newFragment, excep tionState)) 989 if (deep && !importContainerNodeChildren(oldFragment, newFragment, excep tionState))
990 return nullptr; 990 return nullptr;
991 991
992 return newFragment.release(); 992 return newFragment.release();
993 } 993 }
994 case DOCUMENT_NODE: 994 case DOCUMENT_NODE:
995 exceptionState.throwDOMException(NotSupportedError, "The node provided i s a document, which may not be imported."); 995 exceptionState.throwDOMException(NotSupportedError, "The node provided i s a document, which may not be imported.");
996 return nullptr; 996 return nullptr;
997 } 997 }
998 998
(...skipping 4764 matching lines...) Expand 10 before | Expand all | Expand 10 after
5763 visitor->trace(m_timeline); 5763 visitor->trace(m_timeline);
5764 visitor->trace(m_compositorPendingAnimations); 5764 visitor->trace(m_compositorPendingAnimations);
5765 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); 5765 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this);
5766 DocumentSupplementable::trace(visitor); 5766 DocumentSupplementable::trace(visitor);
5767 TreeScope::trace(visitor); 5767 TreeScope::trace(visitor);
5768 ContainerNode::trace(visitor); 5768 ContainerNode::trace(visitor);
5769 ExecutionContext::trace(visitor); 5769 ExecutionContext::trace(visitor);
5770 } 5770 }
5771 5771
5772 } // namespace WebCore 5772 } // namespace WebCore
OLDNEW
« no previous file with comments | « trunk/Source/core/dom/Document.h ('k') | trunk/Source/core/dom/DocumentFragment.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698