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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 } | 856 } |
857 | 857 |
858 LocalFrame* Document::executingFrame() | 858 LocalFrame* Document::executingFrame() |
859 { | 859 { |
860 DOMWindow* window = executingWindow(); | 860 DOMWindow* window = executingWindow(); |
861 if (!window) | 861 if (!window) |
862 return 0; | 862 return 0; |
863 return window->frame(); | 863 return window->frame(); |
864 } | 864 } |
865 | 865 |
866 PassRefPtr<DocumentFragment> Document::createDocumentFragment() | 866 PassRefPtrWillBeRawPtr<DocumentFragment> Document::createDocumentFragment() |
867 { | 867 { |
868 return DocumentFragment::create(*this); | 868 return DocumentFragment::create(*this); |
869 } | 869 } |
870 | 870 |
871 PassRefPtrWillBeRawPtr<Text> Document::createTextNode(const String& data) | 871 PassRefPtrWillBeRawPtr<Text> Document::createTextNode(const String& data) |
872 { | 872 { |
873 return Text::create(*this, data); | 873 return Text::create(*this, data); |
874 } | 874 } |
875 | 875 |
876 PassRefPtrWillBeRawPtr<Comment> Document::createComment(const String& data) | 876 PassRefPtrWillBeRawPtr<Comment> Document::createComment(const String& data) |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 case ATTRIBUTE_NODE: | 974 case ATTRIBUTE_NODE: |
975 return Attr::create(*this, QualifiedName(nullAtom, AtomicString(toAttr(i
mportedNode)->name()), nullAtom), toAttr(importedNode)->value()); | 975 return Attr::create(*this, QualifiedName(nullAtom, AtomicString(toAttr(i
mportedNode)->name()), nullAtom), toAttr(importedNode)->value()); |
976 case DOCUMENT_FRAGMENT_NODE: { | 976 case DOCUMENT_FRAGMENT_NODE: { |
977 if (importedNode->isShadowRoot()) { | 977 if (importedNode->isShadowRoot()) { |
978 // ShadowRoot nodes should not be explicitly importable. | 978 // ShadowRoot nodes should not be explicitly importable. |
979 // Either they are imported along with their host node, or created i
mplicitly. | 979 // Either they are imported along with their host node, or created i
mplicitly. |
980 exceptionState.throwDOMException(NotSupportedError, "The node provid
ed is a shadow root, which may not be imported."); | 980 exceptionState.throwDOMException(NotSupportedError, "The node provid
ed is a shadow root, which may not be imported."); |
981 return nullptr; | 981 return nullptr; |
982 } | 982 } |
983 DocumentFragment* oldFragment = toDocumentFragment(importedNode); | 983 DocumentFragment* oldFragment = toDocumentFragment(importedNode); |
984 RefPtr<DocumentFragment> newFragment = createDocumentFragment(); | 984 RefPtrWillBeRawPtr<DocumentFragment> newFragment = createDocumentFragmen
t(); |
985 if (deep && !importContainerNodeChildren(oldFragment, newFragment, excep
tionState)) | 985 if (deep && !importContainerNodeChildren(oldFragment, newFragment, excep
tionState)) |
986 return nullptr; | 986 return nullptr; |
987 | 987 |
988 return newFragment.release(); | 988 return newFragment.release(); |
989 } | 989 } |
990 case DOCUMENT_NODE: | 990 case DOCUMENT_NODE: |
991 exceptionState.throwDOMException(NotSupportedError, "The node provided i
s a document, which may not be imported."); | 991 exceptionState.throwDOMException(NotSupportedError, "The node provided i
s a document, which may not be imported."); |
992 return nullptr; | 992 return nullptr; |
993 } | 993 } |
994 | 994 |
(...skipping 4728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5723 visitor->trace(m_timeline); | 5723 visitor->trace(m_timeline); |
5724 visitor->trace(m_compositorPendingAnimations); | 5724 visitor->trace(m_compositorPendingAnimations); |
5725 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5725 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5726 DocumentSupplementable::trace(visitor); | 5726 DocumentSupplementable::trace(visitor); |
5727 TreeScope::trace(visitor); | 5727 TreeScope::trace(visitor); |
5728 ContainerNode::trace(visitor); | 5728 ContainerNode::trace(visitor); |
5729 ExecutionContext::trace(visitor); | 5729 ExecutionContext::trace(visitor); |
5730 } | 5730 } |
5731 | 5731 |
5732 } // namespace WebCore | 5732 } // namespace WebCore |
OLD | NEW |