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

Unified Diff: Source/core/editing/spellcheck/SpellChecker.cpp

Issue 1300823002: Introduce PositionAlgorithm<Strategy>::editingPositionOf() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-18T17:38:11 Created 5 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
« no previous file with comments | « Source/core/editing/iterators/TextIterator.cpp ('k') | Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/spellcheck/SpellChecker.cpp
diff --git a/Source/core/editing/spellcheck/SpellChecker.cpp b/Source/core/editing/spellcheck/SpellChecker.cpp
index cd98a8c65b18e42d278e56d35d8b357e6f8901da..c38d891e812c504f0b0a08f37960247c9fd44279 100644
--- a/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -206,7 +206,7 @@ void SpellChecker::advanceToNextMisspelling(bool startBeforeSelection)
ContainerNode* topNode = highestEditableRoot(position);
// TODO(yosin): |lastOffsetForEditing()| is wrong here if
// |editingIgnoresContent(highestEditableRoot())| returns true, e.g. <table>
- spellingSearchEnd = createLegacyEditingPosition(topNode, EditingStrategy::lastOffsetForEditing(topNode));
+ spellingSearchEnd = Position::editingPositionOf(topNode, EditingStrategy::lastOffsetForEditing(topNode));
// If spellingSearchRange starts in the middle of a word, advance to the next word so we start checking
// at a word boundary. Going back by one char and then forward by a word does the trick.
@@ -266,9 +266,9 @@ void SpellChecker::advanceToNextMisspelling(bool startBeforeSelection)
// If we found neither bad grammar nor a misspelled word, wrap and try again (but don't bother if we started at the beginning of the
// block rather than at a selection).
if (startedWithSelection && !misspelledWord && !badGrammarPhrase) {
- spellingSearchStart = createLegacyEditingPosition(topNode, 0);
+ spellingSearchStart = Position::editingPositionOf(topNode, 0);
// going until the end of the very first chunk we tested is far enough
- spellingSearchEnd = createLegacyEditingPosition(searchEndNodeAfterWrap, searchEndOffsetAfterWrap);
+ spellingSearchEnd = Position::editingPositionOf(searchEndNodeAfterWrap, searchEndOffsetAfterWrap);
if (unifiedTextCheckerEnabled()) {
grammarSearchStart = spellingSearchStart;
« no previous file with comments | « Source/core/editing/iterators/TextIterator.cpp ('k') | Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698