summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-11 14:24:41 +0100
committerSteve Block <steveblock@google.com>2010-08-12 10:10:41 +0100
commita2c82e9ac4062724c7ec50a65fe5d893b333a529 (patch)
tree042b8d2606e6dad4de9e3743dcacf457858f96c4 /WebCore
parent559136b02c843ca1b495c43291f2e38b991a7e5e (diff)
downloadexternal_webkit-a2c82e9ac4062724c7ec50a65fe5d893b333a529.zip
external_webkit-a2c82e9ac4062724c7ec50a65fe5d893b333a529.tar.gz
external_webkit-a2c82e9ac4062724c7ec50a65fe5d893b333a529.tar.bz2
Provide EmptyDeviceOrientationClient for use with SVGImage
This is a partial cherry-pick of WebKit change 64106 See https://bugs.webkit.org/show_bug.cgi?id=43848 We can't take the complete change because we don't yet have DeviceMotion in our version of WebKit. Bug: 2907653 Change-Id: Ie038a21f9e989af46fb6b77decd7ea10da734b3c
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/loader/EmptyClients.h9
-rw-r--r--WebCore/svg/graphics/SVGImage.cpp6
2 files changed, 14 insertions, 1 deletions
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index 8043b21..c40e3cc 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -31,6 +31,7 @@
#include "ChromeClient.h"
#include "Console.h"
#include "ContextMenuClient.h"
+#include "DeviceOrientationClient.h"
#include "DocumentLoader.h"
#include "DragClient.h"
#include "EditCommand.h"
@@ -539,6 +540,14 @@ public:
virtual bool sendMessageToFrontend(const String&) { return false; }
};
+class EmptyDeviceOrientationClient : public DeviceOrientationClient {
+public:
+ virtual void setController(DeviceOrientationController*) { }
+ virtual void startUpdating() { }
+ virtual void stopUpdating() { }
+ virtual DeviceOrientation* lastOrientation() const { return 0; }
+};
+
}
#endif // EmptyClients_h
diff --git a/WebCore/svg/graphics/SVGImage.cpp b/WebCore/svg/graphics/SVGImage.cpp
index fead316..ef9d87b 100644
--- a/WebCore/svg/graphics/SVGImage.cpp
+++ b/WebCore/svg/graphics/SVGImage.cpp
@@ -253,7 +253,11 @@ bool SVGImage::dataChanged(bool allDataReceived)
#endif
static InspectorClient* dummyInspectorClient = new EmptyInspectorClient;
pageClients.inspectorClient = dummyInspectorClient;
-
+#if ENABLE(DEVICE_ORIENTATION)
+ static DeviceOrientationClient* dummyDeviceOrientationClient = new EmptyDeviceOrientationClient;
+ pageClients.deviceOrientationClient = dummyDeviceOrientationClient;
+#endif
+
// FIXME: If this SVG ends up loading itself, we might leak the world.
// The comment said that the Cache code does not know about CachedImages
// holding Frames and won't know to break the cycle. But