Chromium Code Reviews| 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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 889 { | 889 { |
| 890 if (!importedNode) { | 890 if (!importedNode) { |
| 891 exceptionState.throwDOMException(NotSupportedError, "The node provided i s invalid."); | 891 exceptionState.throwDOMException(NotSupportedError, "The node provided i s invalid."); |
| 892 return 0; | 892 return 0; |
| 893 } | 893 } |
| 894 | 894 |
| 895 switch (importedNode->nodeType()) { | 895 switch (importedNode->nodeType()) { |
| 896 case TEXT_NODE: | 896 case TEXT_NODE: |
| 897 return createTextNode(importedNode->nodeValue()); | 897 return createTextNode(importedNode->nodeValue()); |
| 898 case CDATA_SECTION_NODE: | 898 case CDATA_SECTION_NODE: |
| 899 return createCDATASection(importedNode->nodeValue(), exceptionState); | 899 return importedNode->cloneNode(deep); |
|
adamk
2014/02/19 17:04:59
cloneNode alone can't be used to implement importN
| |
| 900 case PROCESSING_INSTRUCTION_NODE: | 900 case PROCESSING_INSTRUCTION_NODE: |
| 901 return createProcessingInstruction(importedNode->nodeName(), importedNod e->nodeValue(), exceptionState); | 901 return createProcessingInstruction(importedNode->nodeName(), importedNod e->nodeValue(), exceptionState); |
| 902 case COMMENT_NODE: | 902 case COMMENT_NODE: |
| 903 return createComment(importedNode->nodeValue()); | 903 return createComment(importedNode->nodeValue()); |
| 904 case DOCUMENT_TYPE_NODE: { | 904 case DOCUMENT_TYPE_NODE: { |
| 905 DocumentType* doctype = toDocumentType(importedNode); | 905 DocumentType* doctype = toDocumentType(importedNode); |
| 906 return DocumentType::create(this, doctype->name(), doctype->publicId(), doctype->systemId()); | 906 return DocumentType::create(this, doctype->name(), doctype->publicId(), doctype->systemId()); |
| 907 } | 907 } |
| 908 case ELEMENT_NODE: { | 908 case ELEMENT_NODE: { |
| 909 Element* oldElement = toElement(importedNode); | 909 Element* oldElement = toElement(importedNode); |
| (...skipping 4551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5461 void Document::defaultEventHandler(Event* event) | 5461 void Document::defaultEventHandler(Event* event) |
| 5462 { | 5462 { |
| 5463 if (frame() && frame()->remotePlatformLayer()) { | 5463 if (frame() && frame()->remotePlatformLayer()) { |
| 5464 frame()->chromeClient().forwardInputEvent(this, event); | 5464 frame()->chromeClient().forwardInputEvent(this, event); |
| 5465 return; | 5465 return; |
| 5466 } | 5466 } |
| 5467 Node::defaultEventHandler(event); | 5467 Node::defaultEventHandler(event); |
| 5468 } | 5468 } |
| 5469 | 5469 |
| 5470 } // namespace WebCore | 5470 } // namespace WebCore |
| OLD | NEW |