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

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

Issue 2383733002: Revert of Prune CreateVisibleSelectionDeprecated from SpellChecker (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
index 20053f42256503e531bb368e8259010941b8cbb9..61c6bb3558efb3d6d14385ce09c6dad89aa43f84 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -298,7 +298,7 @@
// a marker so we draw the red squiggle later.
const EphemeralRange misspellingRange = calculateCharacterSubrange(EphemeralRange(spellingSearchStart, spellingSearchEnd), misspellingOffset, misspelledWord.length());
- frame().selection().setSelection(createVisibleSelection(misspellingRange));
+ frame().selection().setSelection(createVisibleSelectionDeprecated(misspellingRange));
frame().selection().revealSelection();
spellCheckerClient().updateSpellingUIWithMisspelledWord(misspelledWord);
frame().document()->markers().addMarker(misspellingRange.startPosition(), misspellingRange.endPosition(), DocumentMarker::Spelling);
@@ -394,7 +394,7 @@
if (cmd.commandTypeOfOpenCommand() == TypingCommand::InsertParagraphSeparator) {
VisiblePosition nextWord = nextWordPosition(start);
- VisibleSelection words = createVisibleSelection(wordStartOfPrevious, endOfWord(nextWord));
+ VisibleSelection words = createVisibleSelectionDeprecated(wordStartOfPrevious, endOfWord(nextWord));
markMisspellingsAfterLineBreak(words);
return;
}
@@ -418,7 +418,7 @@
{
TRACE_EVENT0("blink", "SpellChecker::markMisspellingsAfterTypingToWord");
- VisibleSelection adjacentWords = createVisibleSelection(startOfWord(wordStart, LeftWordIfOnBoundary), endOfWord(wordStart, RightWordIfOnBoundary));
+ VisibleSelection adjacentWords = createVisibleSelectionDeprecated(startOfWord(wordStart, LeftWordIfOnBoundary), endOfWord(wordStart, RightWordIfOnBoundary));
markMisspellingsAndBadGrammar(adjacentWords);
}
@@ -698,7 +698,7 @@
EphemeralRange markerRange = EphemeralRange(Position(caretRange.startPosition().computeContainerNode(), markers[0]->startOffset()), Position(caretRange.endPosition().computeContainerNode(), markers[0]->endOffset()));
if (markerRange.isNull())
return;
- frame().selection().setSelection(createVisibleSelection(markerRange), CharacterGranularity);
+ frame().selection().setSelection(createVisibleSelectionDeprecated(markerRange), CharacterGranularity);
// TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
// needs to be audited. See http://crbug.com/590369 for more details.
@@ -760,7 +760,7 @@
const bool caretBrowsing = frame().settings() && frame().settings()->caretBrowsingEnabled();
if (newSelection.isContentEditable() || caretBrowsing) {
const VisiblePosition newStart(newSelection.visibleStart());
- newAdjacentWords = createVisibleSelection(startOfWord(newStart, LeftWordIfOnBoundary), endOfWord(newStart, RightWordIfOnBoundary));
+ newAdjacentWords = createVisibleSelectionDeprecated(startOfWord(newStart, LeftWordIfOnBoundary), endOfWord(newStart, RightWordIfOnBoundary));
}
}
@@ -816,7 +816,7 @@
TRACE_EVENT0("blink", "SpellChecker::spellCheckOldSelection");
VisiblePosition oldStart(oldSelection.visibleStart());
- VisibleSelection oldAdjacentWords = createVisibleSelection(startOfWord(oldStart, LeftWordIfOnBoundary), endOfWord(oldStart, RightWordIfOnBoundary));
+ VisibleSelection oldAdjacentWords = createVisibleSelectionDeprecated(startOfWord(oldStart, LeftWordIfOnBoundary), endOfWord(oldStart, RightWordIfOnBoundary));
if (oldAdjacentWords == newAdjacentWords)
return;
markMisspellingsAndBadGrammar(oldAdjacentWords);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698