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

Unified Diff: Source/core/editing/SpellingCorrectionCommand.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/SimplifyMarkupCommand.cpp ('k') | Source/core/editing/SplitElementCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SpellingCorrectionCommand.cpp
diff --git a/Source/core/editing/SpellingCorrectionCommand.cpp b/Source/core/editing/SpellingCorrectionCommand.cpp
index 282f70bb2647397129c646335874d0fb31bb589a..0ee583219c991ea6c10ee3308a3535d16054f146 100644
--- a/Source/core/editing/SpellingCorrectionCommand.cpp
+++ b/Source/core/editing/SpellingCorrectionCommand.cpp
@@ -35,7 +35,7 @@
namespace WebCore {
SpellingCorrectionCommand::SpellingCorrectionCommand(PassRefPtr<Range> rangeToBeCorrected, const String& correction)
- : CompositeEditCommand(&rangeToBeCorrected->startContainer()->document())
+ : CompositeEditCommand(rangeToBeCorrected->startContainer()->document())
, m_rangeToBeCorrected(rangeToBeCorrected)
, m_selectionToBeCorrected(m_rangeToBeCorrected.get())
, m_correction(correction)
@@ -48,7 +48,7 @@ void SpellingCorrectionCommand::doApply()
if (!m_corrected.length())
return;
- if (!document()->frame()->selection()->shouldChangeSelection(m_selectionToBeCorrected))
+ if (!document().frame()->selection()->shouldChangeSelection(m_selectionToBeCorrected))
return;
applyCommandToComposite(SetSelectionCommand::create(m_selectionToBeCorrected, FrameSelection::SpellCorrectionTriggered | FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle));
« no previous file with comments | « Source/core/editing/SimplifyMarkupCommand.cpp ('k') | Source/core/editing/SplitElementCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698