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

Unified Diff: Source/core/editing/ReplaceNodeWithSpanCommand.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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
Index: Source/core/editing/ReplaceNodeWithSpanCommand.cpp
diff --git a/Source/core/editing/ReplaceNodeWithSpanCommand.cpp b/Source/core/editing/ReplaceNodeWithSpanCommand.cpp
index e09b6a13c37d7c1045c1edf45b986fa968df2566..64f0256b72360123bb7f2f988f1a2f7cc7a16e68 100644
--- a/Source/core/editing/ReplaceNodeWithSpanCommand.cpp
+++ b/Source/core/editing/ReplaceNodeWithSpanCommand.cpp
@@ -42,7 +42,7 @@ namespace WebCore {
using namespace HTMLNames;
ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand(PassRefPtr<HTMLElement> element)
- : SimpleEditCommand(element->document())
+ : SimpleEditCommand(&element->document())
, m_elementToReplace(element)
{
ASSERT(m_elementToReplace);
@@ -70,7 +70,7 @@ void ReplaceNodeWithSpanCommand::doApply()
if (!m_elementToReplace->inDocument())
return;
if (!m_spanElement)
- m_spanElement = createHTMLElement(m_elementToReplace->document(), spanTag);
+ m_spanElement = createHTMLElement(&m_elementToReplace->document(), spanTag);
swapInNodePreservingAttributesAndChildren(m_spanElement.get(), m_elementToReplace.get());
}
« no previous file with comments | « Source/core/editing/RemoveNodePreservingChildrenCommand.cpp ('k') | Source/core/editing/SetNodeAttributeCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698