Changeset 83617 in webkit
- Timestamp:
- Apr 12, 2011 11:45:33 AM (13 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r83613 r83617 1 2011-04-11 John Abd-El-Malek <jam@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 [chromium]: Get the list of misspelled words in the WebKit code insetad of in chromium's RenderView 6 https://bugs.webkit.org/show_bug.cgi?id=58260 7 8 * public/WebContextMenuData.h: 9 * public/WebSpellCheckClient.h: 10 (WebKit::WebSpellCheckClient::spellCheck): 11 * src/ContextMenuClientImpl.cpp: 12 (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): 13 * src/EditorClientImpl.cpp: 14 (WebKit::EditorClientImpl::checkSpellingOfString): 15 1 16 2011-04-12 Bill Budge <bbudge@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/DEPS
r83494 r83617 33 33 vars = { 34 34 'chromium_svn': 'http://src.chromium.org/svn/trunk/src', 35 'chromium_rev': '8 0890'35 'chromium_rev': '81274' 36 36 } 37 37 -
trunk/Source/WebKit/chromium/public/WebContextMenuData.h
r83545 r83617 112 112 WebString misspelledWord; 113 113 114 // If misspelledWord is not empty, holds suggestions from the dictionary. 115 WebVector<WebString> dictionarySuggestions; 116 114 117 // Whether context is editable. 115 118 bool isEditable; -
trunk/Source/WebKit/chromium/public/WebSpellCheckClient.h
r82008 r83617 33 33 34 34 #include "WebString.h" 35 #include "WebVector.h" 35 36 36 37 namespace WebKit { … … 38 39 class WebString; 39 40 class WebTextCheckingCompletion; 41 42 #define WEBSPELLCHECKCLIENT_HAS_SUGGESTIONS 40 43 41 44 class WebSpellCheckClient { … … 45 48 // will point to the start of the misspelled word, and misspelledLength 46 49 // will indicates its length. Otherwise, if there was not a spelling 47 // error, then upon return misspelledLength is 0. 48 virtual void spellCheck( 49 const WebString& text, int& misspelledOffset, int& misspelledLength) { } 50 // error, then upon return misspelledLength is 0. If optional_suggestions 51 // is given, then it will be filled with suggested words (not a cheap step). 52 virtual void spellCheck(const WebString& text, 53 int& misspelledOffset, 54 int& misspelledLength, 55 WebVector<WebString>* optionalSuggestions) { } 50 56 // Requests asynchronous spelling and grammar checking, whose result should be 51 57 // returned by passed completion object. -
trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
r83545 r83617 62 62 #include "WebPluginContainerImpl.h" 63 63 #include "WebPoint.h" 64 #include "WebSpellCheckClient.h" 64 65 #include "WebString.h" 65 66 #include "WebURL.h" … … 257 258 data.isSpellCheckingEnabled = true; 258 259 // Spellchecking might be enabled for the field, but could be disabled on the node. 259 if (m_webView->focusedWebCoreFrame()->editor()->isSpellCheckingEnabledInFocusedNode()) 260 if (m_webView->focusedWebCoreFrame()->editor()->isSpellCheckingEnabledInFocusedNode()) { 260 261 data.misspelledWord = selectMisspelledWord(defaultMenu, selectedFrame); 262 if (m_webView->spellCheckClient()) { 263 int misspelledOffset, misspelledLength; 264 m_webView->spellCheckClient()->spellCheck( 265 data.misspelledWord, misspelledOffset, misspelledLength, 266 &data.dictionarySuggestions); 267 if (!misspelledOffset) 268 data.misspelledWord.reset(); 269 270 } 271 } 261 272 } 262 273 } -
trunk/Source/WebKit/chromium/src/EditorClientImpl.cpp
r82952 r83617 859 859 // Check to see if the provided text is spelled correctly. 860 860 if (isContinuousSpellCheckingEnabled() && m_webView->spellCheckClient()) 861 m_webView->spellCheckClient()->spellCheck(WebString(text, length), spellLocation, spellLength );861 m_webView->spellCheckClient()->spellCheck(WebString(text, length), spellLocation, spellLength, 0); 862 862 else { 863 863 spellLocation = 0;
Note: See TracChangeset
for help on using the changeset viewer.