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

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

Issue 2703313002: Expand FrameSeleciton::end() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T12:26:29 Created 3 years, 10 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
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 bd4b4a333a27266543f56f325565cee56c7b1981..15f729fd3f232cb275c80d8ca6a1a1198b3ad0e2 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -644,7 +644,8 @@ void SpellChecker::markAndReplaceFor(
// TODO(xiaochengh): The following comment does not match the current
// behavior and should be rewritten.
// Attempt to save the caret position so we can restore it later if needed
- const Position& caretPosition = frame().selection().end();
+ const Position& caretPosition =
+ frame().selection().computeVisibleSelectionInDOMTreeDeprecated().end();
selectionOffset = paragraph.offsetTo(caretPosition);
if (selectionOffset > 0 &&
static_cast<unsigned>(selectionOffset) <= paragraph.text().length() &&

Powered by Google App Engine
This is Rietveld 408576698