diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
| commit | a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (patch) | |
| tree | b7abd9f49ae1d4d2e426a5883bfccd42b8e2ee12 /Tools/DumpRenderTree/chromium/WebViewHost.cpp | |
| parent | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (diff) | |
| download | qtwebkit-a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd.tar.gz | |
Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516)
Diffstat (limited to 'Tools/DumpRenderTree/chromium/WebViewHost.cpp')
| -rw-r--r-- | Tools/DumpRenderTree/chromium/WebViewHost.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp index 366546015..ef82f2b88 100644 --- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp +++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp @@ -32,6 +32,7 @@ #include "WebViewHost.h" #include "LayoutTestController.h" +#include "MockGrammarCheck.h" #include "MockWebSpeechInputController.h" #include "TestNavigationController.h" #include "TestShell.h" @@ -55,6 +56,7 @@ #include "WebPluginParams.h" #include "WebPopupMenu.h" #include "WebPopupType.h" +#include "WebPrintParams.h" #include "WebRange.h" #include "platform/WebRect.h" #include "WebScreenInfo.h" @@ -470,7 +472,6 @@ void WebViewHost::requestCheckingOfText(const WebString& text, WebTextCheckingCo void WebViewHost::finishLastTextCheck() { Vector<WebTextCheckingResult> results; - // FIXME: Do the grammar check. int offset = 0; String text(m_lastRequestedTextCheckString.data(), m_lastRequestedTextCheckString.length()); while (text.length()) { @@ -486,7 +487,7 @@ void WebViewHost::finishLastTextCheck() text = text.substring(misspelledPosition + misspelledLength); offset += misspelledPosition + misspelledLength; } - + MockGrammarCheck::checkGrammarOfString(m_lastRequestedTextCheckString, &results); m_lastRequestedTextCheckingCompletion->didFinishCheckingText(results); m_lastRequestedTextCheckingCompletion = 0; } @@ -676,10 +677,12 @@ void WebViewHost::postAccessibilityNotification(const WebAccessibilityObject& ob } } +#if ENABLE(NOTIFICATIONS) WebNotificationPresenter* WebViewHost::notificationPresenter() { return m_shell->notificationPresenter(); } +#endif WebKit::WebGeolocationClient* WebViewHost::geolocationClient() { @@ -693,12 +696,14 @@ WebKit::WebGeolocationClientMock* WebViewHost::geolocationClientMock() return m_geolocationClientMock.get(); } +#if ENABLE(INPUT_SPEECH) WebSpeechInputController* WebViewHost::speechInputController(WebKit::WebSpeechInputListener* listener) { if (!m_speechInputControllerMock) m_speechInputControllerMock = MockWebSpeechInputController::create(listener); return m_speechInputControllerMock.get(); } +#endif WebDeviceOrientationClientMock* WebViewHost::deviceOrientationClientMock() { @@ -1346,13 +1351,19 @@ void WebViewHost::dispatchIntent(WebFrame* source, const WebIntentRequest& reque (*ports)[i]->destroy(); delete ports; } + if (!request.intent().service().isEmpty()) printf("Explicit intent service: %s\n", request.intent().service().spec().data()); + WebVector<WebString> extras = request.intent().extrasNames(); for (size_t i = 0; i < extras.size(); ++i) { printf("Extras[%s] = %s\n", extras[i].utf8().data(), request.intent().extrasValue(extras[i]).utf8().data()); } + + WebVector<WebURL> suggestions = request.intent().suggestions(); + for (size_t i = 0; i < suggestions.size(); ++i) + printf("Have suggestion %s\n", suggestions[i].spec().data()); } void WebViewHost::deliveredIntentResult(WebFrame* frame, int id, const WebSerializedScriptValue& data) @@ -1451,8 +1462,10 @@ void WebViewHost::reset() if (m_geolocationClientMock.get()) m_geolocationClientMock->resetMock(); +#if ENABLE(INPUT_SPEECH) if (m_speechInputControllerMock.get()) m_speechInputControllerMock->clearResults(); +#endif m_currentCursor = WebCursorInfo(); m_windowRect = WebRect(); @@ -1841,7 +1854,7 @@ void WebViewHost::displayRepaintMask() void WebViewHost::printPage(WebKit::WebFrame* frame) { WebSize pageSizeInPixels = webWidget()->size(); - - frame->printBegin(pageSizeInPixels); + WebPrintParams printParams(pageSizeInPixels); + frame->printBegin(printParams); frame->printEnd(); } |
