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

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/HotModeSpellCheckRequester.cpp

Issue 2806683002: Don't ever split DocumentMarkers on remove (Closed)
Patch Set: Leave partial markers in place for non-splitting case, preserve endpoints for splitting case Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/editing/spellcheck/HotModeSpellCheckRequester.h" 5 #include "core/editing/spellcheck/HotModeSpellCheckRequester.h"
6 6
7 #include "core/editing/EditingUtilities.h" 7 #include "core/editing/EditingUtilities.h"
8 #include "core/editing/Editor.h" 8 #include "core/editing/Editor.h"
9 #include "core/editing/VisiblePosition.h" 9 #include "core/editing/VisiblePosition.h"
10 #include "core/editing/commands/CompositeEditCommand.h" 10 #include "core/editing/commands/CompositeEditCommand.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return; 101 return;
102 m_processedRootEditables.push_back(rootEditable); 102 m_processedRootEditables.push_back(rootEditable);
103 103
104 if (!isUnderActiveEditing(*rootEditable, position)) 104 if (!isUnderActiveEditing(*rootEditable, position))
105 return; 105 return;
106 106
107 const EphemeralRange& currentWord = 107 const EphemeralRange& currentWord =
108 currentWordIfTypingInPartialWord(*rootEditable); 108 currentWordIfTypingInPartialWord(*rootEditable);
109 if (currentWord.isNotNull()) { 109 if (currentWord.isNotNull()) {
110 rootEditable->document().markers().removeMarkers( 110 rootEditable->document().markers().removeMarkers(
111 currentWord, DocumentMarker::MisspellingMarkers(), 111 currentWord, DocumentMarker::MisspellingMarkers());
112 DocumentMarkerController::RemovePartiallyOverlappingMarker);
113 return; 112 return;
114 } 113 }
115 114
116 const EphemeralRange& checkingRange = 115 const EphemeralRange& checkingRange =
117 calculateHotModeCheckingRange(*rootEditable, position); 116 calculateHotModeCheckingRange(*rootEditable, position);
118 m_requester->requestCheckingFor(checkingRange); 117 m_requester->requestCheckingFor(checkingRange);
119 } 118 }
120 119
121 } // namespace blink 120 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698