[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
hans at chromium.org
hans at chromium.org
Wed Dec 22 13:17:02 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 5f87109609c98315338b8a72aae07a705bb1b0b5
Author: hans at chromium.org <hans at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Sep 10 07:16:29 2010 +0000
2010-09-09 Hans Wennborg <hans at chromium.org>
Reviewed by Jeremy Orlow.
Hook up LayoutTestController.setMockDeviceOrientation() in Chromium DumpRenderTree.
https://bugs.webkit.org/show_bug.cgi?id=45460
This enables DumpRenderTree to run layout tests for DeviceOrientation.
Also declare the LayoutTestController destructor out-of-line.
Otherwise the implicit destructor would cause compiler errors because
of the OwnPtr<WebKit::WebDeviceOrientationClientMock> member.
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::~LayoutTestController):
(LayoutTestController::setMockDeviceOrientation):
(LayoutTestController::deviceOrientationClient):
* DumpRenderTree/chromium/LayoutTestController.h:
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::deviceOrientationClient):
* DumpRenderTree/chromium/WebViewHost.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index e4fe819..aa525b5 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,25 @@
+2010-09-09 Hans Wennborg <hans at chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Hook up LayoutTestController.setMockDeviceOrientation() in Chromium DumpRenderTree.
+ https://bugs.webkit.org/show_bug.cgi?id=45460
+
+ This enables DumpRenderTree to run layout tests for DeviceOrientation.
+
+ Also declare the LayoutTestController destructor out-of-line.
+ Otherwise the implicit destructor would cause compiler errors because
+ of the OwnPtr<WebKit::WebDeviceOrientationClientMock> member.
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::~LayoutTestController):
+ (LayoutTestController::setMockDeviceOrientation):
+ (LayoutTestController::deviceOrientationClient):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::deviceOrientationClient):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
2010-09-09 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r67119.
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index 8e08c4c..6f962bf 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -38,6 +38,8 @@
#include "public/WebAnimationController.h"
#include "public/WebBindings.h"
#include "public/WebConsoleMessage.h"
+#include "public/WebDeviceOrientation.h"
+#include "public/WebDeviceOrientationClientMock.h"
#include "public/WebDocument.h"
#include "public/WebElement.h"
#include "public/WebFrame.h"
@@ -194,6 +196,10 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindProperty("webHistoryItemCount", &m_webHistoryItemCount);
}
+LayoutTestController::~LayoutTestController()
+{
+}
+
LayoutTestController::WorkQueue::~WorkQueue()
{
reset();
@@ -1387,8 +1393,14 @@ void LayoutTestController::setEditingBehavior(const CppArgumentList& arguments,
void LayoutTestController::setMockDeviceOrientation(const CppArgumentList& arguments, CppVariant* result)
{
- // FIXME: Implement for DeviceOrientation layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=30335.
+ result->setNull();
+ if (arguments.size() < 6 || !arguments[0].isBool() || !arguments[1].isNumber() || !arguments[2].isBool() || !arguments[3].isNumber() || !arguments[4].isBool() || !arguments[5].isNumber())
+ return;
+
+ WebKit::WebDeviceOrientation orientation(arguments[0].toBoolean(), arguments[1].toDouble(), arguments[2].toBoolean(), arguments[3].toDouble(), arguments[4].toBoolean(), arguments[5].toDouble());
+
+ ASSERT(m_deviceOrientationClientMock);
+ m_deviceOrientationClientMock->setOrientation(orientation);
}
void LayoutTestController::setGeolocationPermission(const CppArgumentList& arguments, CppVariant* result)
@@ -1444,3 +1456,10 @@ void LayoutTestController::markerTextForListItem(const CppArgumentList& args, Cp
else
result->set(element.document().frame()->markerTextForListItem(element).utf8());
}
+
+WebKit::WebDeviceOrientationClient* LayoutTestController::deviceOrientationClient()
+{
+ if (!m_deviceOrientationClientMock.get())
+ m_deviceOrientationClientMock.set(new WebKit::WebDeviceOrientationClientMock());
+ return m_deviceOrientationClientMock.get();
+}
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
index 55c8c8b..7bb22ca 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
@@ -49,6 +49,8 @@
#include <wtf/OwnPtr.h>
namespace WebKit {
+class WebDeviceOrientationClient;
+class WebDeviceOrientationClientMock;
class WebSpeechInputController;
class WebSpeechInputControllerMock;
class WebSpeechInputListener;
@@ -62,6 +64,8 @@ public:
// object.
LayoutTestController(TestShell*);
+ ~LayoutTestController();
+
// This function sets a flag that tells the test_shell to dump pages as
// plain text, rather than as a text representation of the renderer's state.
// It takes an optional argument, whether to dump pixels results or not.
@@ -318,6 +322,7 @@ public:
void setWorkQueueFrozen(bool frozen) { m_workQueue.setFrozen(frozen); }
WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*);
+ WebKit::WebDeviceOrientationClient* deviceOrientationClient();
bool shouldDumpAsText() { return m_dumpAsText; }
bool shouldDumpEditingCallbacks() { return m_dumpEditingCallbacks; }
bool shouldDumpFrameLoadCallbacks() { return m_dumpFrameLoadCallbacks; }
@@ -506,6 +511,8 @@ private:
WebKit::WebURL m_userStyleSheetLocation;
OwnPtr<WebKit::WebSpeechInputControllerMock> m_speechInputControllerMock;
+
+ OwnPtr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationClientMock;
};
#endif // LayoutTestController_h
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index fae3f56..1e3a4d6 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -512,6 +512,11 @@ WebSpeechInputController* WebViewHost::speechInputController(WebKit::WebSpeechIn
return m_shell->layoutTestController()->speechInputController(listener);
}
+WebKit::WebDeviceOrientationClient* WebViewHost::deviceOrientationClient()
+{
+ return m_shell->layoutTestController()->deviceOrientationClient();
+}
+
// WebWidgetClient -----------------------------------------------------------
void WebViewHost::didInvalidateRect(const WebRect& rect)
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
index 5067342..3a84ebd 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
@@ -45,6 +45,7 @@ class LayoutTestController;
class TestShell;
namespace WebKit {
class WebFrame;
+class WebDeviceOrientationClient;
class WebGeolocationServiceMock;
class WebSpeechInputController;
class WebSpeechInputListener;
@@ -130,6 +131,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
virtual WebKit::WebNotificationPresenter* notificationPresenter();
virtual WebKit::WebGeolocationService* geolocationService();
virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*);
+ virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient();
// WebKit::WebWidgetClient
virtual void didInvalidateRect(const WebKit::WebRect&);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list