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 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 return nullptr; | 986 return nullptr; |
987 } | 987 } |
988 RefPtrWillBeRawPtr<Element> newElement = createElement(oldElement->tagQN
ame(), false); | 988 RefPtrWillBeRawPtr<Element> newElement = createElement(oldElement->tagQN
ame(), false); |
989 | 989 |
990 newElement->cloneDataFromElement(*oldElement); | 990 newElement->cloneDataFromElement(*oldElement); |
991 | 991 |
992 if (deep) { | 992 if (deep) { |
993 if (!importContainerNodeChildren(oldElement, newElement, exceptionSt
ate)) | 993 if (!importContainerNodeChildren(oldElement, newElement, exceptionSt
ate)) |
994 return nullptr; | 994 return nullptr; |
995 if (isHTMLTemplateElement(*oldElement) | 995 if (isHTMLTemplateElement(*oldElement) |
996 && !importContainerNodeChildren(toHTMLTemplateElement(oldElement
)->content(), toHTMLTemplateElement(newElement)->content(), exceptionState)) | 996 && !ensureTemplateDocument().importContainerNodeChildren( |
| 997 toHTMLTemplateElement(oldElement)->content(), |
| 998 toHTMLTemplateElement(newElement)->content(), exceptionState
)) |
997 return nullptr; | 999 return nullptr; |
998 } | 1000 } |
999 | 1001 |
1000 return newElement.release(); | 1002 return newElement.release(); |
1001 } | 1003 } |
1002 case ATTRIBUTE_NODE: | 1004 case ATTRIBUTE_NODE: |
1003 return Attr::create(*this, QualifiedName(nullAtom, AtomicString(toAttr(i
mportedNode)->name()), nullAtom), toAttr(importedNode)->value()); | 1005 return Attr::create(*this, QualifiedName(nullAtom, AtomicString(toAttr(i
mportedNode)->name()), nullAtom), toAttr(importedNode)->value()); |
1004 case DOCUMENT_FRAGMENT_NODE: { | 1006 case DOCUMENT_FRAGMENT_NODE: { |
1005 if (importedNode->isShadowRoot()) { | 1007 if (importedNode->isShadowRoot()) { |
1006 // ShadowRoot nodes should not be explicitly importable. | 1008 // ShadowRoot nodes should not be explicitly importable. |
(...skipping 4823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5830 #ifndef NDEBUG | 5832 #ifndef NDEBUG |
5831 using namespace blink; | 5833 using namespace blink; |
5832 void showLiveDocumentInstances() | 5834 void showLiveDocumentInstances() |
5833 { | 5835 { |
5834 WeakDocumentSet& set = liveDocumentSet(); | 5836 WeakDocumentSet& set = liveDocumentSet(); |
5835 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5837 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5836 for (Document* document : set) | 5838 for (Document* document : set) |
5837 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5839 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5838 } | 5840 } |
5839 #endif | 5841 #endif |
OLD | NEW |