| 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 645938642003030b01a84b125a267af273a33b44..f1e60f04403c4968c595a9b03500fdd841ee4115 100644
|
| --- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| @@ -592,6 +592,13 @@ void SpellChecker::updateMarkersForWordsAffectedByEditing(bool doNotRemoveIfSele
|
| if (!isSpellCheckingEnabledFor(frame().selection().selection()))
|
| return;
|
|
|
| + Document* document = frame().document();
|
| + DCHECK(document);
|
| +
|
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| + // needs to be audited. See http://crbug.com/590369 for more details.
|
| + document->updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| // We want to remove the markers from a word if an editing command will change the word. This can happen in one of
|
| // several scenarios:
|
| // 1. Insert in the middle of a word.
|
| @@ -661,13 +668,6 @@ void SpellChecker::updateMarkersForWordsAffectedByEditing(bool doNotRemoveIfSele
|
| // garde", we will have CorrectionIndicator marker on both words and on the whitespace between them. If we then edit garde,
|
| // we would like to remove the marker from word "avant" and whitespace as well. So we need to get the continous range of
|
| // of marker that contains the word in question, and remove marker on that whole range.
|
| - Document* document = frame().document();
|
| - DCHECK(document);
|
| -
|
| - // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| - // needs to be audited. See http://crbug.com/590369 for more details.
|
| - document->updateStyleAndLayoutIgnorePendingStylesheets();
|
| -
|
| const EphemeralRange wordRange(removeMarkerStart, removeMarkerEnd);
|
| document->markers().removeMarkers(wordRange, DocumentMarker::MisspellingMarkers(), DocumentMarkerController::RemovePartiallyOverlappingMarker);
|
| }
|
|
|