Changeset 113405 in webkit
- Timestamp:
- Apr 5, 2012 7:48:37 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r113402 r113405 1 2012-04-05 Hironori Bono <hbono@chromium.org> 2 3 [Chromium] moving a cursor on a misspelled word should not remove a misspelled underline 4 https://bugs.webkit.org/show_bug.cgi?id=83214 5 6 Reviewed by Ryosuke Niwa. 7 8 When Chrome enables asynchronous spellchecking, it adds Spelling markers in the 9 background. For this case, moving a cursor should not remove these markers 10 because it requires Chrome to spellcheck text again. This change prevents 11 removing Spelling markers added by spellcheckers asynchronously. 12 13 * platform/chromium/editing/spelling/move-cursor-to-misspelled-word-expected.txt: Added. 14 * platform/chromium/editing/spelling/move-cursor-to-misspelled-word.html: Added. 15 1 16 2012-04-05 Martin Robinson <mrobinson@igalia.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r113400 r113405 1 2012-04-05 Hironori Bono <hbono@chromium.org> 2 3 [Chromium] moving a cursor on a misspelled word should not remove a misspelled underline 4 https://bugs.webkit.org/show_bug.cgi?id=83214 5 6 Reviewed by Ryosuke Niwa. 7 8 When Chrome enables asynchronous spellchecking, it adds Spelling markers in the 9 background. For this case, moving a cursor should not remove these markers 10 because it requires Chrome to spellcheck text again. This change prevents 11 removing Spelling markers added by spellcheckers asynchronously. 12 13 Test: platform/chromium/editing/spelling/move-cursor-to-misspelled-word.html 14 15 * editing/Editor.cpp: 16 (WebCore::Editor::respondToChangedSelection): 17 1 18 2012-04-05 Hans Muller <hmuller@adobe.com> 2 19 -
trunk/Source/WebCore/editing/Editor.cpp
r113127 r113405 2924 2924 2925 2925 #if !PLATFORM(MAC) || (PLATFORM(MAC) && (defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD))) 2926 #if PLATFORM(CHROMIUM) 2927 if (!m_frame->settings() || !m_frame->settings()->asynchronousSpellCheckingEnabled()) { 2928 if (RefPtr<Range> wordRange = newAdjacentWords.toNormalizedRange()) 2929 m_frame->document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::Spelling); 2930 } 2931 #else 2926 2932 // This only erases markers that are in the first unit (word or sentence) of the selection. 2927 2933 // Perhaps peculiar, but it matches AppKit on these Mac OS X versions. 2928 2934 if (RefPtr<Range> wordRange = newAdjacentWords.toNormalizedRange()) 2929 2935 m_frame->document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::Spelling); 2936 #endif 2930 2937 #endif 2931 2938 if (RefPtr<Range> sentenceRange = newSelectedSentence.toNormalizedRange()) -
trunk/Source/WebKit/chromium/ChangeLog
r113372 r113405 1 2012-04-05 Hironori Bono <hbono@chromium.org> 2 3 [Chromium] moving a cursor on a misspelled word should not remove a misspelled underline 4 https://bugs.webkit.org/show_bug.cgi?id=83214 5 6 Reviewed by Ryosuke Niwa. 7 8 When Chrome enables asynchronous spellchecking, it adds Spelling markers in the 9 background. For this case, moving a cursor should not remove these markers 10 because it requires Chrome to spellcheck text again. This change prevents 11 removing Spelling markers added by spellcheckers asynchronously. 12 13 * src/ContextMenuClientImpl.cpp: 14 (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): use marker descriptions instead of spellchecking text when Chrome enables asynchronous spellchecking. 15 1 16 2012-04-05 Dana Jansens <danakj@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
r110348 r113405 38 38 #include "Document.h" 39 39 #include "DocumentLoader.h" 40 #include "DocumentMarkerController.h" 40 41 #include "Editor.h" 41 42 #include "EventHandler.h" … … 55 56 #include "PlatformString.h" 56 57 #include "RenderWidget.h" 58 #include "Settings.h" 57 59 #include "TextBreakIterator.h" 58 60 #include "Widget.h" … … 273 275 } 274 276 #endif 275 if (m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled()) { 277 // When Chrome enables asynchronous spellchecking, its spellchecker adds spelling markers to misspelled 278 // words and attaches suggestions to these markers in the background. Therefore, when a user right-clicks 279 // a mouse on a word, Chrome just needs to find a spelling marker on the word instread of spellchecking it. 280 if (selectedFrame->settings() && selectedFrame->settings()->asynchronousSpellCheckingEnabled()) { 281 RefPtr<Range> range = selectedFrame->selection()->toNormalizedRange(); 282 Vector<DocumentMarker*> markers = selectedFrame->document()->markers()->markersInRange(range.get(), DocumentMarker::Spelling); 283 if (!markers.isEmpty()) { 284 Vector<String> suggestions; 285 for (size_t i = 0; i < markers.size(); ++i) { 286 if (!markers[i]->description().isEmpty()) { 287 Vector<String> descriptions; 288 markers[i]->description().split('\n', descriptions); 289 suggestions.append(descriptions); 290 } 291 } 292 data.dictionarySuggestions = suggestions; 293 data.misspelledWord = range->text(); 294 } 295 } else if (m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled()) { 276 296 data.isSpellCheckingEnabled = true; 277 297 // Spellchecking might be enabled for the field, but could be disabled on the node.
Note: See TracChangeset
for help on using the changeset viewer.