Changeset 97385 in webkit
- Timestamp:
- Oct 13, 2011, 12:36:34 PM (14 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r97375 r97385 1 2011-10-13 Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com> 2 3 Implement TextChecker for WebKit2 GTK+ 4 https://bugs.webkit.org/show_bug.cgi?id=68548 5 6 Reviewed by Anders Carlsson. 7 8 Added implementation for all functions in TextCheckerGtk.cpp removing earlier stubbed implementations. 9 Moved couple of API earlier specific to win port to common section and added stubbed implementation 10 of the same for remaining ports of Qt, Efl and Mac. 11 12 * GNUmakefile.am: Added TextChecker implementation files. 13 * UIProcess/TextChecker.h: Moved spellCheckingEnabled and grammarCheckingEnabled API outside of win port. 14 * UIProcess/efl/TextCheckerEfl.cpp: Stubbed implementation of API which was moved outside win port. 15 * UIProcess/gtk/TextCheckerGtk.cpp: Implementation of all TextChecker API. 16 (WebKit::TextChecker::state): 17 (WebKit::TextChecker::isContinuousSpellCheckingAllowed): 18 (WebKit::TextChecker::setContinuousSpellCheckingEnabled): 19 (WebKit::TextChecker::setGrammarCheckingEnabled): 20 (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged): 21 (WebKit::TextChecker::grammarCheckingEnabledStateChanged): 22 (WebKit::TextChecker::uniqueSpellDocumentTag): 23 (WebKit::TextChecker::closeSpellDocumentWithTag): 24 (WebKit::TextChecker::checkSpellingOfString): 25 (WebKit::TextChecker::checkGrammarOfString): 26 (WebKit::TextChecker::spellingUIIsShowing): 27 (WebKit::TextChecker::toggleSpellingUIIsShowing): 28 (WebKit::TextChecker::updateSpellingUIWithMisspelledWord): 29 (WebKit::TextChecker::updateSpellingUIWithGrammarString): 30 (WebKit::TextChecker::getGuessesForWord): 31 (WebKit::TextChecker::learnWord): 32 (WebKit::TextChecker::ignoreWord): 33 * UIProcess/mac/TextCheckerMac.mm: Implementation of API which was moved outside win port. 34 * UIProcess/qt/TextCheckerQt.cpp: Stubbed implementation of API which was moved outside win port. 35 1 36 2011-10-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 37 -
trunk/Source/WebKit2/GNUmakefile.am
r97226 r97385 49 49 $(WebKit2)/UIProcess/API/C/WKFrame.h \ 50 50 $(WebKit2)/UIProcess/API/C/WKFramePolicyListener.h \ 51 $(WebKit2)/UIProcess/API/C/WKGrammarDetail.h \ 51 52 $(WebKit2)/UIProcess/API/C/WKHitTestResult.h \ 52 53 $(WebKit2)/UIProcess/API/C/WKInspector.h \ … … 66 67 $(WebKit2)/UIProcess/API/C/WKProtectionSpaceTypes.h \ 67 68 $(WebKit2)/UIProcess/API/C/WKResourceCacheManager.h \ 69 $(WebKit2)/UIProcess/API/C/WKTextChecker.h \ 68 70 $(WebKit2)/UIProcess/API/cpp/WKRetainPtr.h 69 71 … … 433 435 Source/WebKit2/UIProcess/API/C/WKFramePolicyListener.cpp \ 434 436 Source/WebKit2/UIProcess/API/C/WKFramePolicyListener.h \ 437 Source/WebKit2/UIProcess/API/C/WKGrammarDetail.cpp \ 438 Source/WebKit2/UIProcess/API/C/WKGrammarDetail.h \ 435 439 Source/WebKit2/UIProcess/API/C/WKHitTestResult.cpp \ 436 440 Source/WebKit2/UIProcess/API/C/WKHitTestResult.h \ … … 465 469 Source/WebKit2/UIProcess/API/C/WKResourceCacheManager.h \ 466 470 Source/WebKit2/UIProcess/API/C/WKResourceCacheManager.cpp \ 471 Source/WebKit2/UIProcess/API/C/WKTextChecker.h \ 472 Source/WebKit2/UIProcess/API/C/WKTextChecker.cpp \ 467 473 Source/WebKit2/UIProcess/API/cpp/WKRetainPtr.h \ 468 474 Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h \ … … 583 589 Source/WebKit2/UIProcess/WebGeolocationProvider.cpp \ 584 590 Source/WebKit2/UIProcess/WebGeolocationProvider.h \ 591 Source/WebKit2/UIProcess/WebGrammarDetail.cpp \ 592 Source/WebKit2/UIProcess/WebGrammarDetail.h \ 585 593 Source/WebKit2/UIProcess/WebHistoryClient.cpp \ 586 594 Source/WebKit2/UIProcess/WebHistoryClient.h \ … … 618 626 Source/WebKit2/UIProcess/WebResourceLoadClient.cpp \ 619 627 Source/WebKit2/UIProcess/WebResourceLoadClient.h \ 628 Source/WebKit2/UIProcess/WebTextChecker.cpp \ 629 Source/WebKit2/UIProcess/WebTextChecker.h \ 630 Source/WebKit2/UIProcess/WebTextCheckerClient.cpp \ 631 Source/WebKit2/UIProcess/WebTextCheckerClient.h \ 620 632 Source/WebKit2/UIProcess/WebUIClient.cpp \ 621 633 Source/WebKit2/UIProcess/WebUIClient.h \ -
trunk/Source/WebKit2/UIProcess/TextChecker.h
r95901 r97385 55 55 static bool substitutionsPanelIsShowing(); 56 56 static void toggleSubstitutionsPanelIsShowing(); 57 #elif PLATFORM(WIN) 57 #endif 58 58 59 static void continuousSpellCheckingEnabledStateChanged(bool); 59 60 static void grammarCheckingEnabledStateChanged(bool); 60 #endif61 62 61 static int64_t uniqueSpellDocumentTag(WebPageProxy*); 63 62 static void closeSpellDocumentWithTag(int64_t); -
trunk/Source/WebKit2/UIProcess/efl/TextCheckerEfl.cpp
r95901 r97385 54 54 55 55 void TextChecker::setGrammarCheckingEnabled(bool) 56 { 57 notImplemented(); 58 } 59 60 void TextChecker::continuousSpellCheckingEnabledStateChanged(bool enabled) 61 { 62 notImplemented(); 63 } 64 65 void TextChecker::grammarCheckingEnabledStateChanged(bool enabled) 56 66 { 57 67 notImplemented(); -
trunk/Source/WebKit2/UIProcess/gtk/TextCheckerGtk.cpp
r95901 r97385 29 29 30 30 #include "TextCheckerState.h" 31 #include <WebCore/NotImplemented.h>31 #include "WebTextChecker.h" 32 32 33 33 using namespace WebCore; … … 39 39 const TextCheckerState& TextChecker::state() 40 40 { 41 notImplemented(); 41 static bool didInitializeState; 42 if (didInitializeState) 43 return textCheckerState; 44 45 WebTextCheckerClient& client = WebTextChecker::shared()->client(); 46 textCheckerState.isContinuousSpellCheckingEnabled = client.continuousSpellCheckingEnabled(); 47 textCheckerState.isGrammarCheckingEnabled = client.grammarCheckingEnabled(); 48 49 didInitializeState = true; 50 42 51 return textCheckerState; 43 52 } 44 53 45 54 bool TextChecker::isContinuousSpellCheckingAllowed() 46 55 { 47 notImplemented(); 48 return false; 56 return WebTextChecker::shared()->client().continuousSpellCheckingAllowed(); 49 57 } 50 58 51 59 void TextChecker::setContinuousSpellCheckingEnabled(bool isContinuousSpellCheckingEnabled) 52 60 { 53 notImplemented(); 61 if (state().isContinuousSpellCheckingEnabled == isContinuousSpellCheckingEnabled) 62 return; 63 textCheckerState.isContinuousSpellCheckingEnabled = isContinuousSpellCheckingEnabled; 64 WebTextChecker::shared()->client().setContinuousSpellCheckingEnabled(isContinuousSpellCheckingEnabled); 54 65 } 55 66 56 67 void TextChecker::setGrammarCheckingEnabled(bool isGrammarCheckingEnabled) 57 68 { 58 notImplemented(); 69 if (state().isGrammarCheckingEnabled == isGrammarCheckingEnabled) 70 return; 71 textCheckerState.isGrammarCheckingEnabled = isGrammarCheckingEnabled; 72 WebTextChecker::shared()->client().setGrammarCheckingEnabled(isGrammarCheckingEnabled); 59 73 } 60 74 61 int64_t TextChecker::uniqueSpellDocumentTag(WebPageProxy*)75 void TextChecker::continuousSpellCheckingEnabledStateChanged(bool enabled) 62 76 { 63 notImplemented(); 64 return 0; 77 textCheckerState.isContinuousSpellCheckingEnabled = enabled; 65 78 } 66 79 67 void TextChecker:: closeSpellDocumentWithTag(int64_t)80 void TextChecker::grammarCheckingEnabledStateChanged(bool enabled) 68 81 { 69 notImplemented();82 textCheckerState.isGrammarCheckingEnabled = enabled; 70 83 } 71 84 72 void TextChecker::checkSpellingOfString(int64_t, const UChar*, uint32_t, int32_t&, int32_t&)85 int64_t TextChecker::uniqueSpellDocumentTag(WebPageProxy* page) 73 86 { 74 notImplemented();87 return WebTextChecker::shared()->client().uniqueSpellDocumentTag(page); 75 88 } 76 89 77 void TextChecker::c heckGrammarOfString(int64_t, const UChar*, uint32_t, Vector<WebCore::GrammarDetail>&, int32_t&, int32_t&)90 void TextChecker::closeSpellDocumentWithTag(int64_t tag) 78 91 { 79 notImplemented(); 92 WebTextChecker::shared()->client().closeSpellDocumentWithTag(tag); 93 } 94 95 void TextChecker::checkSpellingOfString(int64_t spellDocumentTag, const UChar* text, uint32_t length, int32_t& misspellingLocation, int32_t& misspellingLength) 96 { 97 WebTextChecker::shared()->client().checkSpellingOfString(spellDocumentTag, String(text, length), misspellingLocation, misspellingLength); 98 } 99 100 void TextChecker::checkGrammarOfString(int64_t spellDocumentTag, const UChar* text, uint32_t length, Vector<WebCore::GrammarDetail>& grammarDetails, int32_t& badGrammarLocation, int32_t& badGrammarLength) 101 { 102 WebTextChecker::shared()->client().checkGrammarOfString(spellDocumentTag, String(text, length), grammarDetails, badGrammarLocation, badGrammarLength); 80 103 } 81 104 82 105 bool TextChecker::spellingUIIsShowing() 83 106 { 84 notImplemented(); 85 return false; 107 return WebTextChecker::shared()->client().spellingUIIsShowing(); 86 108 } 87 109 88 110 void TextChecker::toggleSpellingUIIsShowing() 89 111 { 90 notImplemented();112 WebTextChecker::shared()->client().toggleSpellingUIIsShowing(); 91 113 } 92 114 93 void TextChecker::updateSpellingUIWithMisspelledWord(int64_t , const String&)115 void TextChecker::updateSpellingUIWithMisspelledWord(int64_t spellDocumentTag, const String& misspelledWord) 94 116 { 95 notImplemented();117 WebTextChecker::shared()->client().updateSpellingUIWithMisspelledWord(spellDocumentTag, misspelledWord); 96 118 } 97 119 98 void TextChecker::updateSpellingUIWithGrammarString(int64_t , const String&, const GrammarDetail&)120 void TextChecker::updateSpellingUIWithGrammarString(int64_t spellDocumentTag, const String& badGrammarPhrase, const GrammarDetail& grammarDetail) 99 121 { 100 notImplemented();122 WebTextChecker::shared()->client().updateSpellingUIWithGrammarString(spellDocumentTag, badGrammarPhrase, grammarDetail); 101 123 } 102 124 103 125 void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String& word, const String& context, Vector<String>& guesses) 104 126 { 105 notImplemented();127 WebTextChecker::shared()->client().guessesForWord(spellDocumentTag, word, guesses); 106 128 } 107 129 108 void TextChecker::learnWord(int64_t , const String&)130 void TextChecker::learnWord(int64_t spellDocumentTag, const String& word) 109 131 { 110 notImplemented();132 WebTextChecker::shared()->client().learnWord(spellDocumentTag, word); 111 133 } 112 134 113 135 void TextChecker::ignoreWord(int64_t spellDocumentTag, const String& word) 114 136 { 115 notImplemented();137 WebTextChecker::shared()->client().ignoreWord(spellDocumentTag, word); 116 138 } 117 139 -
trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm
r95901 r97385 214 214 } 215 215 216 void TextChecker::continuousSpellCheckingEnabledStateChanged(bool enabled) 217 { 218 textCheckerState.isContinuousSpellCheckingEnabled = enabled; 219 } 220 221 void TextChecker::grammarCheckingEnabledStateChanged(bool enabled) 222 { 223 textCheckerState.isGrammarCheckingEnabled = enabled; 224 } 225 216 226 int64_t TextChecker::uniqueSpellDocumentTag(WebPageProxy*) 217 227 { -
trunk/Source/WebKit2/UIProcess/qt/TextCheckerQt.cpp
r95901 r97385 56 56 57 57 void TextChecker::setGrammarCheckingEnabled(bool isGrammarCheckingEnabled) 58 { 59 notImplemented(); 60 } 61 62 void TextChecker::continuousSpellCheckingEnabledStateChanged(bool enabled) 63 { 64 notImplemented(); 65 } 66 67 void TextChecker::grammarCheckingEnabledStateChanged(bool enabled) 58 68 { 59 69 notImplemented();
Note:
See TracChangeset
for help on using the changeset viewer.