diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-11 09:43:24 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-11 09:43:24 +0200 |
commit | 1b914638db989aaa98631a1c1e02c7b2d44805d8 (patch) | |
tree | 87f4fd2c7b38db320079a5de8877890d2ca3c485 /Tools/DumpRenderTree/chromium | |
parent | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (diff) | |
download | qtwebkit-1b914638db989aaa98631a1c1e02c7b2d44805d8.tar.gz |
Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736)
New snapshot to include QDeclarative* -> QQml* build fixes
Diffstat (limited to 'Tools/DumpRenderTree/chromium')
-rw-r--r-- | Tools/DumpRenderTree/chromium/EventSender.cpp | 11 | ||||
-rw-r--r-- | Tools/DumpRenderTree/chromium/EventSender.h | 1 | ||||
-rw-r--r-- | Tools/DumpRenderTree/chromium/LayoutTestController.cpp | 50 | ||||
-rw-r--r-- | Tools/DumpRenderTree/chromium/LayoutTestController.h | 8 | ||||
-rw-r--r-- | Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp | 4 | ||||
-rw-r--r-- | Tools/DumpRenderTree/chromium/TestShell.cpp | 25 | ||||
-rw-r--r-- | Tools/DumpRenderTree/chromium/TestShell.h | 4 | ||||
-rw-r--r-- | Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp | 51 | ||||
-rw-r--r-- | Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h | 5 | ||||
-rw-r--r-- | Tools/DumpRenderTree/chromium/WebViewHost.cpp | 20 | ||||
-rw-r--r-- | Tools/DumpRenderTree/chromium/WebViewHost.h | 5 |
11 files changed, 99 insertions, 85 deletions
diff --git a/Tools/DumpRenderTree/chromium/EventSender.cpp b/Tools/DumpRenderTree/chromium/EventSender.cpp index a15c72c3e..7ddaafbe6 100644 --- a/Tools/DumpRenderTree/chromium/EventSender.cpp +++ b/Tools/DumpRenderTree/chromium/EventSender.cpp @@ -286,6 +286,7 @@ EventSender::EventSender(TestShell* shell) bindMethod("gestureScrollFirstPoint", &EventSender::gestureScrollFirstPoint); bindMethod("gestureScrollUpdate", &EventSender::gestureScrollUpdate); bindMethod("gestureTap", &EventSender::gestureTap); + bindMethod("gestureLongPress", &EventSender::gestureLongPress); bindMethod("zoomPageIn", &EventSender::zoomPageIn); bindMethod("zoomPageOut", &EventSender::zoomPageOut); bindMethod("scalePageBy", &EventSender::scalePageBy); @@ -1092,6 +1093,12 @@ void EventSender::gestureTap(const CppArgumentList& arguments, CppVariant* resul gestureEvent(WebInputEvent::GestureTap, arguments); } +void EventSender::gestureLongPress(const CppArgumentList& arguments, CppVariant* result) +{ + result->setNull(); + gestureEvent(WebInputEvent::GestureLongPress, arguments); +} + void EventSender::gestureScrollFirstPoint(const CppArgumentList& arguments, CppVariant* result) { result->setNull(); @@ -1141,6 +1148,10 @@ void EventSender::gestureEvent(WebInputEvent::Type type, const CppArgumentList& event.x = point.x; event.y = point.y; break; + case WebInputEvent::GestureLongPress: + event.x = point.x; + event.y = point.y; + break; default: ASSERT_NOT_REACHED(); } diff --git a/Tools/DumpRenderTree/chromium/EventSender.h b/Tools/DumpRenderTree/chromium/EventSender.h index 5d82d7898..bc8a6baa0 100644 --- a/Tools/DumpRenderTree/chromium/EventSender.h +++ b/Tools/DumpRenderTree/chromium/EventSender.h @@ -104,6 +104,7 @@ public: void gestureScrollFirstPoint(const CppArgumentList&, CppVariant*); void gestureScrollUpdate(const CppArgumentList&, CppVariant*); void gestureTap(const CppArgumentList&, CppVariant*); + void gestureLongPress(const CppArgumentList&, CppVariant*); void gestureEvent(WebKit::WebInputEvent::Type, const CppArgumentList&); // Unimplemented stubs diff --git a/Tools/DumpRenderTree/chromium/LayoutTestController.cpp b/Tools/DumpRenderTree/chromium/LayoutTestController.cpp index 8bb531911..a56f4c35b 100644 --- a/Tools/DumpRenderTree/chromium/LayoutTestController.cpp +++ b/Tools/DumpRenderTree/chromium/LayoutTestController.cpp @@ -93,8 +93,10 @@ LayoutTestController::LayoutTestController(TestShell* shell) // names to their methods will be done by calling bindToJavaScript() (defined // by CppBoundClass, the parent to LayoutTestController). bindMethod("addFileToPasteboardOnDrag", &LayoutTestController::addFileToPasteboardOnDrag); +#if ENABLE(INPUT_SPEECH) bindMethod("addMockSpeechInputResult", &LayoutTestController::addMockSpeechInputResult); bindMethod("setMockSpeechInputDumpRect", &LayoutTestController::setMockSpeechInputDumpRect); +#endif bindMethod("addOriginAccessWhitelistEntry", &LayoutTestController::addOriginAccessWhitelistEntry); bindMethod("addUserScript", &LayoutTestController::addUserScript); bindMethod("addUserStyleSheet", &LayoutTestController::addUserStyleSheet); @@ -132,7 +134,9 @@ LayoutTestController::LayoutTestController(TestShell* shell) bindMethod("setIsolatedWorldSecurityOrigin", &LayoutTestController::setIsolatedWorldSecurityOrigin); bindMethod("execCommand", &LayoutTestController::execCommand); bindMethod("forceRedSelectionColors", &LayoutTestController::forceRedSelectionColors); +#if ENABLE(NOTIFICATIONS) bindMethod("grantDesktopNotificationPermission", &LayoutTestController::grantDesktopNotificationPermission); +#endif bindMethod("findString", &LayoutTestController::findString); bindMethod("isCommandEnabled", &LayoutTestController::isCommandEnabled); bindMethod("hasCustomPageSizeStyle", &LayoutTestController::hasCustomPageSizeStyle); @@ -161,7 +165,6 @@ LayoutTestController::LayoutTestController(TestShell* shell) bindMethod("removeOriginAccessWhitelistEntry", &LayoutTestController::removeOriginAccessWhitelistEntry); bindMethod("repaintSweepHorizontally", &LayoutTestController::repaintSweepHorizontally); bindMethod("resetPageVisibility", &LayoutTestController::resetPageVisibility); - bindMethod("resumeAnimations", &LayoutTestController::resumeAnimations); bindMethod("setAcceptsEditing", &LayoutTestController::setAcceptsEditing); bindMethod("setAllowDisplayOfInsecureContent", &LayoutTestController::setAllowDisplayOfInsecureContent); bindMethod("setAllowFileAccessFromFileURLs", &LayoutTestController::setAllowFileAccessFromFileURLs); @@ -210,9 +213,10 @@ LayoutTestController::LayoutTestController(TestShell* shell) bindMethod("setXSSAuditorEnabled", &LayoutTestController::setXSSAuditorEnabled); bindMethod("setAsynchronousSpellCheckingEnabled", &LayoutTestController::setAsynchronousSpellCheckingEnabled); bindMethod("showWebInspector", &LayoutTestController::showWebInspector); +#if ENABLE(NOTIFICATIONS) bindMethod("simulateDesktopNotificationClick", &LayoutTestController::simulateDesktopNotificationClick); +#endif bindMethod("startSpeechInput", &LayoutTestController::startSpeechInput); - bindMethod("suspendAnimations", &LayoutTestController::suspendAnimations); bindMethod("testRepaint", &LayoutTestController::testRepaint); bindMethod("waitForPolicyDelegate", &LayoutTestController::waitForPolicyDelegate); bindMethod("waitUntilDone", &LayoutTestController::waitUntilDone); @@ -1059,32 +1063,6 @@ int LayoutTestController::numberOfActiveAnimations() return controller->numberOfActiveAnimations(); } -void LayoutTestController::suspendAnimations() -{ - WebFrame* webFrame = m_shell->webView()->mainFrame(); - if (!webFrame) - return; - - WebAnimationController* controller = webFrame->animationController(); - if (!controller) - return; - - controller->suspendAnimations(); -} - -void LayoutTestController::resumeAnimations() -{ - WebFrame* webFrame = m_shell->webView()->mainFrame(); - if (!webFrame) - return; - - WebAnimationController* controller = webFrame->animationController(); - if (!controller) - return; - - controller->resumeAnimations(); -} - void LayoutTestController::pauseAnimationAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result) { result->set(false); @@ -1156,18 +1134,6 @@ void LayoutTestController::numberOfActiveAnimations(const CppArgumentList&, CppV result->set(numberOfActiveAnimations()); } -void LayoutTestController::suspendAnimations(const CppArgumentList&, CppVariant* result) -{ - suspendAnimations(); - result->setNull(); -} - -void LayoutTestController::resumeAnimations(const CppArgumentList&, CppVariant* result) -{ - resumeAnimations(); - result->setNull(); -} - void LayoutTestController::disableImageLoading(const CppArgumentList&, CppVariant* result) { m_shell->preferences()->loadsImagesAutomatically = false; @@ -1186,6 +1152,7 @@ void LayoutTestController::callShouldCloseOnWebView(const CppArgumentList&, CppV result->set(m_shell->webView()->dispatchBeforeUnloadEvent()); } +#if ENABLE(NOTIFICATIONS) void LayoutTestController::grantDesktopNotificationPermission(const CppArgumentList& arguments, CppVariant* result) { if (arguments.size() != 1 || !arguments[0].isString()) { @@ -1211,6 +1178,7 @@ void LayoutTestController::simulateDesktopNotificationClick(const CppArgumentLis #endif result->set(false); } +#endif void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(const CppArgumentList& arguments, CppVariant* result) { @@ -1960,6 +1928,7 @@ void LayoutTestController::abortModal(const CppArgumentList& arguments, CppVaria result->setNull(); } +#if ENABLE(INPUT_SPEECH) void LayoutTestController::addMockSpeechInputResult(const CppArgumentList& arguments, CppVariant* result) { result->setNull(); @@ -1979,6 +1948,7 @@ void LayoutTestController::setMockSpeechInputDumpRect(const CppArgumentList& arg if (MockWebSpeechInputController* controller = m_shell->webViewHost()->speechInputControllerMock()) controller->setDumpRect(arguments[0].value.boolValue); } +#endif void LayoutTestController::startSpeechInput(const CppArgumentList& arguments, CppVariant* result) { diff --git a/Tools/DumpRenderTree/chromium/LayoutTestController.h b/Tools/DumpRenderTree/chromium/LayoutTestController.h index 7383ecfb5..7bdb4e143 100644 --- a/Tools/DumpRenderTree/chromium/LayoutTestController.h +++ b/Tools/DumpRenderTree/chromium/LayoutTestController.h @@ -243,16 +243,16 @@ public: void enableAutoResizeMode(const CppArgumentList&, CppVariant*); void disableAutoResizeMode(const CppArgumentList&, CppVariant*); void numberOfActiveAnimations(const CppArgumentList&, CppVariant*); - void suspendAnimations(const CppArgumentList&, CppVariant*); - void resumeAnimations(const CppArgumentList&, CppVariant*); void disableImageLoading(const CppArgumentList&, CppVariant*); void setIconDatabaseEnabled(const CppArgumentList&, CppVariant*); void dumpSelectionRect(const CppArgumentList&, CppVariant*); +#if ENABLE(NOTIFICATIONS) // Grants permission for desktop notifications to an origin void grantDesktopNotificationPermission(const CppArgumentList&, CppVariant*); // Simulates a click on a desktop notification. void simulateDesktopNotificationClick(const CppArgumentList&, CppVariant*); +#endif void setDomainRelaxationForbiddenForURLScheme(const CppArgumentList&, CppVariant*); void setDeferMainResourceDataLoad(const CppArgumentList&, CppVariant*); @@ -374,8 +374,10 @@ public: void abortModal(const CppArgumentList&, CppVariant*); // Speech input related functions. +#if ENABLE(INPUT_SPEECH) void addMockSpeechInputResult(const CppArgumentList&, CppVariant*); void setMockSpeechInputDumpRect(const CppArgumentList&, CppVariant*); +#endif void startSpeechInput(const CppArgumentList&, CppVariant*); void layerTreeAsText(const CppArgumentList& args, CppVariant* result); @@ -570,8 +572,6 @@ private: bool pauseTransitionAtTimeOnElementWithId(const WebKit::WebString& propertyName, double time, const WebKit::WebString& elementId); bool elementDoesAutoCompleteForElementWithId(const WebKit::WebString&); int numberOfActiveAnimations(); - void suspendAnimations(); - void resumeAnimations(); // Used for test timeouts. TaskList m_taskList; diff --git a/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp b/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp index a5fe3eda6..716222f9a 100644 --- a/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp +++ b/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp @@ -32,6 +32,8 @@ #include <wtf/text/CString.h> #include <wtf/text/StringBuilder.h> +#if ENABLE(INPUT_SPEECH) + using namespace WebKit; PassOwnPtr<MockWebSpeechInputController> MockWebSpeechInputController::create(WebSpeechInputListener* listener) @@ -196,3 +198,5 @@ void MockWebSpeechInputController::SpeechTask::runIfValid() m_object->m_speechTask = 0; m_object->speechTaskFired(); } + +#endif diff --git a/Tools/DumpRenderTree/chromium/TestShell.cpp b/Tools/DumpRenderTree/chromium/TestShell.cpp index 2e036f1a9..07a72e3f4 100644 --- a/Tools/DumpRenderTree/chromium/TestShell.cpp +++ b/Tools/DumpRenderTree/chromium/TestShell.cpp @@ -64,6 +64,7 @@ #include <cctype> #include <vector> #include <wtf/MD5.h> +#include <wtf/OwnArrayPtr.h> using namespace WebKit; using namespace std; @@ -666,7 +667,26 @@ void TestShell::dumpImage(SkCanvas* canvas) const // Compute MD5 sum. MD5 digester; Vector<uint8_t, 16> digestValue; +#if OS(ANDROID) + // On Android, pixel layout is RGBA (see third_party/skia/include/core/SkColorPriv.h); + // however, other Chrome platforms use BGRA (see skia/config/SkUserConfig.h). + // To match the checksum of other Chrome platforms, we need to reorder the layout of pixels. + // NOTE: The following code assumes we use SkBitmap::kARGB_8888_Config, + // which has been checked in device.makeOpaque() (see above). + const uint8_t* rawPixels = reinterpret_cast<const uint8_t*>(sourceBitmap.getPixels()); + size_t bitmapSize = sourceBitmap.getSize(); + OwnArrayPtr<uint8_t> reorderedPixels = adoptArrayPtr(new uint8_t[bitmapSize]); + for (size_t i = 0; i < bitmapSize; i += 4) { + reorderedPixels[i] = rawPixels[i + 2]; // R + reorderedPixels[i + 1] = rawPixels[i + 1]; // G + reorderedPixels[i + 2] = rawPixels[i]; // B + reorderedPixels[i + 3] = rawPixels[i + 3]; // A + } + digester.addBytes(reorderedPixels.get(), bitmapSize); + reorderedPixels.clear(); +#else digester.addBytes(reinterpret_cast<const uint8_t*>(sourceBitmap.getPixels()), sourceBitmap.getSize()); +#endif digester.checksum(digestValue); string md5hash; md5hash.reserve(16 * 2); @@ -681,8 +701,13 @@ void TestShell::dumpImage(SkCanvas* canvas) const // image is really expensive. if (md5hash.compare(m_params.pixelHash)) { std::vector<unsigned char> png; +#if OS(ANDROID) + webkit_support::EncodeRGBAPNGWithChecksum(reinterpret_cast<const unsigned char*>(sourceBitmap.getPixels()), sourceBitmap.width(), + sourceBitmap.height(), static_cast<int>(sourceBitmap.rowBytes()), discardTransparency, md5hash, &png); +#else webkit_support::EncodeBGRAPNGWithChecksum(reinterpret_cast<const unsigned char*>(sourceBitmap.getPixels()), sourceBitmap.width(), sourceBitmap.height(), static_cast<int>(sourceBitmap.rowBytes()), discardTransparency, md5hash, &png); +#endif m_printer->handleImage(md5hash.c_str(), m_params.pixelHash.c_str(), &png[0], png.size(), m_params.pixelFileName.c_str()); } else diff --git a/Tools/DumpRenderTree/chromium/TestShell.h b/Tools/DumpRenderTree/chromium/TestShell.h index c661c57a3..fc340248d 100644 --- a/Tools/DumpRenderTree/chromium/TestShell.h +++ b/Tools/DumpRenderTree/chromium/TestShell.h @@ -95,7 +95,9 @@ public: EventSender* eventSender() const { return m_eventSender.get(); } AccessibilityController* accessibilityController() const { return m_accessibilityController.get(); } GamepadController* gamepadController() const { return m_gamepadController.get(); } +#if ENABLE(NOTIFICATIONS) NotificationPresenter* notificationPresenter() const { return m_notificationPresenter.get(); } +#endif TestEventPrinter* printer() const { return m_printer.get(); } WebPreferences* preferences() { return &m_prefs; } @@ -217,7 +219,9 @@ private: OwnPtr<EventSender> m_eventSender; OwnPtr<LayoutTestController> m_layoutTestController; OwnPtr<TextInputController> m_textInputController; +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) OwnPtr<NotificationPresenter> m_notificationPresenter; +#endif OwnPtr<WebViewHost> m_webViewHost; OwnPtr<WebKit::WebThread> m_webCompositorThread; diff --git a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp b/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp index 722192376..4efeb82d3 100644 --- a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp +++ b/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp @@ -42,43 +42,38 @@ namespace WebKit { +class MockExtraData : public WebMediaStreamDescriptor::ExtraData { +public: + int foo; +}; + PassOwnPtr<WebUserMediaClientMock> WebUserMediaClientMock::create() { return adoptPtr(new WebUserMediaClientMock()); } -bool WebUserMediaClientMock::IsMockStream(const WebURL& url) -{ - WebMediaStreamDescriptor descriptor(WebMediaStreamRegistry::lookupMediaStreamDescriptor(url)); - if (descriptor.isNull()) - return false; - - WebVector<WebMediaStreamSource> sourceVector; - descriptor.sources(sourceVector); - WebString trackId; - for (size_t i = 0; i < sourceVector.size(); ++i) { - if (sourceVector[i].type() == WebMediaStreamSource::TypeVideo) { - trackId = sourceVector[i].id(); - break; - } - } - return trackId.equals("mediastreamtest"); -} - void WebUserMediaClientMock::requestUserMedia(const WebUserMediaRequest& streamRequest, const WebVector<WebMediaStreamSource>& audioSourcesVector, const WebVector<WebMediaStreamSource>& videoSourcesVector) { ASSERT(!streamRequest.isNull()); - WebUserMediaRequest request = streamRequest; - const size_t size = 1; - WebVector<WebMediaStreamSource> audioSources(size); - WebVector<WebMediaStreamSource> videoSources(size); - WebString trackId("mediastreamtest"); - WebString audioTrackName("AudioRecord"); - WebString videoTrackName("VideoCapture"); - audioSources[0].initialize(trackId, WebMediaStreamSource::TypeAudio, audioTrackName); - videoSources[0].initialize(trackId, WebMediaStreamSource::TypeVideo, videoTrackName); - request.requestSucceeded(audioSources, videoSources); + + const size_t zero = 0; + const size_t one = 1; + WebVector<WebMediaStreamSource> audioSources(request.audio() ? one : zero); + WebVector<WebMediaStreamSource> videoSources(request.video() ? one : zero); + + if (request.audio()) + audioSources[0].initialize("MockAudioDevice#1", WebMediaStreamSource::TypeAudio, "Mock audio device"); + + if (request.video()) + videoSources[0].initialize("MockVideoDevice#1", WebMediaStreamSource::TypeVideo, "Mock video device"); + + WebKit::WebMediaStreamDescriptor descriptor; + descriptor.initialize("foobar", audioSources, videoSources); + + descriptor.setExtraData(new MockExtraData()); + + request.requestSucceeded(descriptor); } void WebUserMediaClientMock::cancelUserMediaRequest(const WebUserMediaRequest&) diff --git a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h b/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h index 9c4970b8c..e2415985c 100644 --- a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h +++ b/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h @@ -42,14 +42,11 @@ namespace WebKit { -class WebUserMediaClientMock : public WebUserMediaClient, - public webkit_support::MediaStreamUtil { +class WebUserMediaClientMock : public WebUserMediaClient { public: static PassOwnPtr<WebUserMediaClientMock> create(); ~WebUserMediaClientMock() { } - bool IsMockStream(const WebURL&); - virtual void requestUserMedia(const WebUserMediaRequest&, const WebVector<WebMediaStreamSource>&, const WebVector<WebMediaStreamSource>&) OVERRIDE; virtual void cancelUserMediaRequest(const WebUserMediaRequest&); diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp index d845b7ec0..732bc7a9b 100644 --- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp +++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp @@ -42,12 +42,14 @@ #include "WebDOMMessageEvent.h" #include "WebDataSource.h" #include "WebDeviceOrientationClientMock.h" +#include "WebDocument.h" #include "platform/WebDragData.h" #include "WebElement.h" #include "WebFrame.h" #include "WebGeolocationClientMock.h" #include "WebHistoryItem.h" #include "WebIntent.h" +#include "WebIntentServiceInfo.h" #include "WebKit.h" #include "WebNode.h" #include "WebPluginParams.h" @@ -1198,7 +1200,7 @@ void WebViewHost::removeIdentifierForRequest(unsigned identifier) m_resourceIdentifierMap.remove(identifier); } -void WebViewHost::willSendRequest(WebFrame*, unsigned identifier, WebURLRequest& request, const WebURLResponse& redirectResponse) +void WebViewHost::willSendRequest(WebFrame* frame, unsigned identifier, WebURLRequest& request, const WebURLResponse& redirectResponse) { // Need to use GURL for host() and SchemeIs() GURL url = request.url(); @@ -1216,6 +1218,8 @@ void WebViewHost::willSendRequest(WebFrame*, unsigned identifier, WebURLRequest& fputs("\n", stdout); } + request.setExtraData(webkit_support::CreateWebURLRequestExtraData(frame->document().referrerPolicy())); + if (!redirectResponse.isNull() && m_blocksRedirects) { fputs("Returning null for this redirect\n", stdout); // To block the request, we set its URL to an empty one. @@ -1322,6 +1326,12 @@ bool WebViewHost::willCheckAndDispatchMessageEvent(WebFrame* source, WebSecurity return false; } +void WebViewHost::registerIntentService(WebKit::WebFrame*, const WebKit::WebIntentServiceInfo& service) +{ + printf("Registered Web Intent Service: action=%s type=%s title=%s url=%s disposition=%s\n", + service.action().utf8().data(), service.type().utf8().data(), service.title().utf8().data(), service.url().spec().data(), service.disposition().utf8().data()); +} + void WebViewHost::dispatchIntent(WebFrame* source, const WebIntentRequest& request) { printf("Received Web Intent: action=%s type=%s\n", @@ -1377,6 +1387,7 @@ void WebViewHost::setWebWidget(WebKit::WebWidget* widget) { m_webWidget = widget; webView()->setSpellCheckClient(this); + webView()->setCompositorSurfaceReady(); } WebView* WebViewHost::webView() const @@ -1693,15 +1704,10 @@ void WebViewHost::exitFullScreenNow() } #if ENABLE(MEDIA_STREAM) -webkit_support::MediaStreamUtil* WebViewHost::mediaStreamUtil() -{ - return userMediaClientMock(); -} - webkit_support::TestMediaStreamClient* WebViewHost::testMediaStreamClient() { if (!m_testMediaStreamClient.get()) - m_testMediaStreamClient = adoptPtr(new webkit_support::TestMediaStreamClient(mediaStreamUtil())); + m_testMediaStreamClient = adoptPtr(new webkit_support::TestMediaStreamClient()); return m_testMediaStreamClient.get(); } #endif diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.h b/Tools/DumpRenderTree/chromium/WebViewHost.h index 706035d33..62bd04cf7 100644 --- a/Tools/DumpRenderTree/chromium/WebViewHost.h +++ b/Tools/DumpRenderTree/chromium/WebViewHost.h @@ -57,6 +57,7 @@ class WebDeviceOrientationClientMock; class WebGeolocationClient; class WebGeolocationClientMock; class WebGeolocationServiceMock; +class WebIntentServiceInfo; class WebSharedWorkerClient; class WebSpeechInputController; class WebSpeechInputListener; @@ -239,7 +240,8 @@ class WebViewHost : public WebKit::WebSpellCheckClient, public WebKit::WebViewCl virtual void didDetectXSS(WebKit::WebFrame*, const WebKit::WebURL&, bool didBlockEntirePage); virtual void openFileSystem(WebKit::WebFrame*, WebKit::WebFileSystem::Type, long long size, bool create, WebKit::WebFileSystemCallbacks*); virtual bool willCheckAndDispatchMessageEvent(WebKit::WebFrame* source, WebKit::WebSecurityOrigin target, WebKit::WebDOMMessageEvent); - virtual void dispatchIntent(WebKit::WebFrame* source, const WebKit::WebIntentRequest&); + virtual void registerIntentService(WebKit::WebFrame*, const WebKit::WebIntentServiceInfo&); + virtual void dispatchIntent(WebKit::WebFrame*, const WebKit::WebIntentRequest&); WebKit::WebDeviceOrientationClientMock* deviceOrientationClientMock(); @@ -315,7 +317,6 @@ private: #if ENABLE(MEDIA_STREAM) WebKit::WebUserMediaClientMock* userMediaClientMock(); - webkit_support::MediaStreamUtil* mediaStreamUtil(); webkit_support::TestMediaStreamClient* testMediaStreamClient(); #endif |