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

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

Issue 23822003: Have EditCommand classes deal with Document references, not pointers (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/editing/FormatBlockCommand.h ('k') | Source/core/editing/IndentOutdentCommand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/FormatBlockCommand.cpp
diff --git a/Source/core/editing/FormatBlockCommand.cpp b/Source/core/editing/FormatBlockCommand.cpp
index 8cdcf9ce48048b757b4cc9f2fa5a7e3d00aa8a93..3867577310b54410afe7c7a08fddd1aadfb6f229 100644
--- a/Source/core/editing/FormatBlockCommand.cpp
+++ b/Source/core/editing/FormatBlockCommand.cpp
@@ -44,7 +44,7 @@ static inline bool isElementForFormatBlock(Node* node)
return node->isElementNode() && isElementForFormatBlock(toElement(node)->tagQName());
}
-FormatBlockCommand::FormatBlockCommand(Document* document, const QualifiedName& tagName)
+FormatBlockCommand::FormatBlockCommand(Document& document, const QualifiedName& tagName)
: ApplyBlockElementCommand(document, tagName)
, m_didApply(false)
{
@@ -64,7 +64,7 @@ void FormatBlockCommand::formatRange(const Position& start, const Position& end,
RefPtr<Node> outerBlock = (start.deprecatedNode() == nodeToSplitTo) ? start.deprecatedNode() : splitTreeToNode(start.deprecatedNode(), nodeToSplitTo);
RefPtr<Node> nodeAfterInsertionPosition = outerBlock;
- RefPtr<Range> range = Range::create(document(), start, endOfSelection);
+ RefPtr<Range> range = Range::create(&document(), start, endOfSelection);
Element* refNode = enclosingBlockFlowElement(end);
Element* root = editableRootForPosition(start);
// Root is null for elements with contenteditable=false.
« no previous file with comments | « Source/core/editing/FormatBlockCommand.h ('k') | Source/core/editing/IndentOutdentCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698