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

Unified Diff: Source/core/dom/Document.cpp

Issue 23453033: Have DOMPatchSupport and DocumentFragment deal with Document references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/DocumentFragment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 90a353c3f97e1b6f91a1c2547df6d3355fdbf59d..b235cbd55f534c1aa90e40bf4c7541eba101cfb1 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -794,7 +794,7 @@ bool Document::haveImportsLoaded() const
PassRefPtr<DocumentFragment> Document::createDocumentFragment()
{
- return DocumentFragment::create(&document());
+ return DocumentFragment::create(document());
}
PassRefPtr<Text> Document::createTextNode(const String& data)
@@ -5348,10 +5348,10 @@ Locale& Document::getCachedLocale(const AtomicString& locale)
return *(result.iterator->value);
}
-Document* Document::ensureTemplateDocument()
+Document& Document::ensureTemplateDocument()
{
if (const Document* document = templateDocument())
- return const_cast<Document*>(document);
+ return *const_cast<Document*>(document);
if (isHTMLDocument()) {
DocumentInit init = DocumentInit::fromContext(contextDocument(), blankURL())
@@ -5363,7 +5363,7 @@ Document* Document::ensureTemplateDocument()
m_templateDocument->setTemplateDocumentHost(this); // balanced in dtor.
- return m_templateDocument.get();
+ return *m_templateDocument.get();
}
PassRefPtr<FontLoader> Document::fontloader()
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/DocumentFragment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698