Index: Source/core/inspector/DOMPatchSupport.cpp |
diff --git a/Source/core/inspector/DOMPatchSupport.cpp b/Source/core/inspector/DOMPatchSupport.cpp |
index a61dd7346cf8355ebc9a448439317ca08a2db5f3..7f9867888db9ce8d5ad785ad5b346b8f97f5a7b7 100644 |
--- a/Source/core/inspector/DOMPatchSupport.cpp |
+++ b/Source/core/inspector/DOMPatchSupport.cpp |
@@ -68,7 +68,7 @@ struct DOMPatchSupport::Digest { |
Vector<OwnPtr<Digest> > m_children; |
}; |
-void DOMPatchSupport::patchDocument(Document* document, const String& markup) |
+void DOMPatchSupport::patchDocument(Document& document, const String& markup) |
{ |
InspectorHistory history; |
DOMEditor domEditor(&history); |
@@ -76,7 +76,7 @@ void DOMPatchSupport::patchDocument(Document* document, const String& markup) |
patchSupport.patchDocument(markup); |
} |
-DOMPatchSupport::DOMPatchSupport(DOMEditor* domEditor, Document* document) |
+DOMPatchSupport::DOMPatchSupport(DOMEditor* domEditor, Document& document) |
: m_domEditor(domEditor) |
, m_document(document) |
{ |
@@ -87,17 +87,17 @@ DOMPatchSupport::~DOMPatchSupport() { } |
void DOMPatchSupport::patchDocument(const String& markup) |
{ |
RefPtr<Document> newDocument; |
- if (m_document->isHTMLDocument()) |
+ if (m_document.isHTMLDocument()) |
newDocument = HTMLDocument::create(); |
- else if (m_document->isXHTMLDocument()) |
+ else if (m_document.isXHTMLDocument()) |
newDocument = HTMLDocument::createXHTML(); |
- else if (m_document->isSVGDocument()) |
+ else if (m_document.isSVGDocument()) |
newDocument = Document::create(); |
ASSERT(newDocument); |
- newDocument->setContextFeatures(m_document->contextFeatures()); |
+ newDocument->setContextFeatures(m_document.contextFeatures()); |
RefPtr<DocumentParser> parser; |
- if (m_document->isHTMLDocument()) |
+ if (m_document.isHTMLDocument()) |
parser = HTMLDocumentParser::create(toHTMLDocument(newDocument.get()), false); |
else |
parser = XMLDocumentParser::create(newDocument.get(), 0); |
@@ -105,13 +105,13 @@ void DOMPatchSupport::patchDocument(const String& markup) |
parser->finish(); |
parser->detach(); |
- OwnPtr<Digest> oldInfo = createDigest(m_document->documentElement(), 0); |
+ OwnPtr<Digest> oldInfo = createDigest(m_document.documentElement(), 0); |
OwnPtr<Digest> newInfo = createDigest(newDocument->documentElement(), &m_unusedNodesMap); |
if (!innerPatchNode(oldInfo.get(), newInfo.get(), IGNORE_EXCEPTION)) { |
// Fall back to rewrite. |
- m_document->write(markup); |
- m_document->close(); |
+ m_document.write(markup); |
+ m_document.close(); |
} |
} |
@@ -126,10 +126,10 @@ Node* DOMPatchSupport::patchNode(Node* node, const String& markup, ExceptionStat |
Node* previousSibling = node->previousSibling(); |
// FIXME: This code should use one of createFragment* in markup.h |
RefPtr<DocumentFragment> fragment = DocumentFragment::create(m_document); |
- if (m_document->isHTMLDocument()) |
- fragment->parseHTML(markup, node->parentElement() ? node->parentElement() : m_document->documentElement()); |
+ if (m_document.isHTMLDocument()) |
+ fragment->parseHTML(markup, node->parentElement() ? node->parentElement() : m_document.documentElement()); |
else |
- fragment->parseXML(markup, node->parentElement() ? node->parentElement() : m_document->documentElement()); |
+ fragment->parseXML(markup, node->parentElement() ? node->parentElement() : m_document.documentElement()); |
// Compose the old list. |
ContainerNode* parentNode = node->parentNode(); |