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

Unified Diff: Source/core/editing/SetSelectionCommand.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/SetNodeAttributeCommand.cpp ('k') | Source/core/editing/SimplifyMarkupCommand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SetSelectionCommand.cpp
diff --git a/Source/core/editing/SetSelectionCommand.cpp b/Source/core/editing/SetSelectionCommand.cpp
index 2c17b63b7654ef2f63c3c8ed3b51ff773f693f48..1480636f4e0b00104eae4c87fa6fe70f2610ba38 100644
--- a/Source/core/editing/SetSelectionCommand.cpp
+++ b/Source/core/editing/SetSelectionCommand.cpp
@@ -32,7 +32,7 @@
namespace WebCore {
SetSelectionCommand::SetSelectionCommand(const VisibleSelection& selection, FrameSelection::SetSelectionOptions options)
- : SimpleEditCommand(&selection.base().anchorNode()->document())
+ : SimpleEditCommand(selection.base().anchorNode()->document())
, m_options(options)
, m_selectionToSet(selection)
{
@@ -40,7 +40,7 @@ SetSelectionCommand::SetSelectionCommand(const VisibleSelection& selection, Fram
void SetSelectionCommand::doApply()
{
- FrameSelection* selection = document()->frame()->selection();
+ FrameSelection* selection = document().frame()->selection();
ASSERT(selection);
if (selection->shouldChangeSelection(m_selectionToSet) && m_selectionToSet.isNonOrphanedCaretOrRange()) {
@@ -51,7 +51,7 @@ void SetSelectionCommand::doApply()
void SetSelectionCommand::doUnapply()
{
- FrameSelection* selection = document()->frame()->selection();
+ FrameSelection* selection = document().frame()->selection();
ASSERT(selection);
if (selection->shouldChangeSelection(startingSelection()) && startingSelection().isNonOrphanedCaretOrRange())
« no previous file with comments | « Source/core/editing/SetNodeAttributeCommand.cpp ('k') | Source/core/editing/SimplifyMarkupCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698