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

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 144063004: Add support for DOM4's XMLDocument interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove FIXME about XMLDocument.load() Created 6 years, 11 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
« no previous file with comments | « Source/core/inspector/DOMPatchSupport.cpp ('k') | Source/core/svg/SVGDocument.h » ('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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 DOMPatchSupport domPatchSupport(m_domEditor.get(), *m_document.get()); 804 DOMPatchSupport domPatchSupport(m_domEditor.get(), *m_document.get());
805 domPatchSupport.patchDocument(outerHTML); 805 domPatchSupport.patchDocument(outerHTML);
806 return; 806 return;
807 } 807 }
808 808
809 Node* node = assertEditableNode(errorString, nodeId); 809 Node* node = assertEditableNode(errorString, nodeId);
810 if (!node) 810 if (!node)
811 return; 811 return;
812 812
813 Document* document = node->isDocumentNode() ? toDocument(node) : node->owner Document(); 813 Document* document = node->isDocumentNode() ? toDocument(node) : node->owner Document();
814 if (!document || (!document->isHTMLDocument() && !document->isXHTMLDocument( ) && !document->isSVGDocument())) { 814 if (!document || (!document->isHTMLDocument() && !document->isXMLDocument()) ) {
815 *errorString = "Not an HTML/XML document"; 815 *errorString = "Not an HTML/XML document";
816 return; 816 return;
817 } 817 }
818 818
819 Node* newNode = 0; 819 Node* newNode = 0;
820 if (!m_domEditor->setOuterHTML(node, outerHTML, &newNode, errorString)) 820 if (!m_domEditor->setOuterHTML(node, outerHTML, &newNode, errorString))
821 return; 821 return;
822 822
823 if (!newNode) { 823 if (!newNode) {
824 // The only child node has been deleted. 824 // The only child node has been deleted.
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2028 if (!m_documentNodeToIdMap.contains(m_document)) { 2028 if (!m_documentNodeToIdMap.contains(m_document)) {
2029 RefPtr<TypeBuilder::DOM::Node> root; 2029 RefPtr<TypeBuilder::DOM::Node> root;
2030 getDocument(errorString, root); 2030 getDocument(errorString, root);
2031 return errorString->isEmpty(); 2031 return errorString->isEmpty();
2032 } 2032 }
2033 return true; 2033 return true;
2034 } 2034 }
2035 2035
2036 } // namespace WebCore 2036 } // namespace WebCore
2037 2037
OLDNEW
« no previous file with comments | « Source/core/inspector/DOMPatchSupport.cpp ('k') | Source/core/svg/SVGDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698