summaryrefslogtreecommitdiff
path: root/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp')
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp b/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
index eeb75fd08..6a1176356 100644
--- a/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
@@ -20,7 +20,6 @@
#include "config.h"
#include "DumpRenderTreeSupport.h"
-#include "CSSComputedStyleDeclaration.h"
#include "DeviceOrientationClientMock.h"
#include "DeviceOrientationController.h"
#include "DeviceOrientationData.h"
@@ -32,6 +31,7 @@
#include "JSCSSStyleDeclaration.h"
#include "JSElement.h"
#include "Page.h"
+#include "RuntimeEnabledFeatures.h"
#include "WebPage_p.h"
#include "bindings/js/GCController.h"
#include <JavaScriptCore/APICast.h>
@@ -64,7 +64,7 @@ Page* DumpRenderTreeSupport::corePage(WebPage* webPage)
int DumpRenderTreeSupport::javaScriptObjectsCount()
{
- return JSDOMWindowBase::commonJSGlobalData()->heap.globalObjectCount();
+ return JSDOMWindowBase::commonVM()->heap.globalObjectCount();
}
void DumpRenderTreeSupport::garbageCollectorCollect()
@@ -111,10 +111,10 @@ void DumpRenderTreeSupport::setMockGeolocationPermission(WebPage* webPage, bool
mockClient->setPermission(allowed);
}
-void DumpRenderTreeSupport::setMockGeolocationPosition(WebPage* webPage, double latitude, double longitude, double accuracy)
+void DumpRenderTreeSupport::setMockGeolocationPosition(WebPage* webPage, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
{
GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage(webPage))->client());
- mockClient->setPosition(GeolocationPosition::create(currentTime(), latitude, longitude, accuracy));
+ mockClient->setPosition(GeolocationPosition::create(currentTime(), latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed));
}
void DumpRenderTreeSupport::scalePageBy(WebPage* webPage, float scaleFactor, float x, float y)
@@ -122,20 +122,12 @@ void DumpRenderTreeSupport::scalePageBy(WebPage* webPage, float scaleFactor, flo
corePage(webPage)->setPageScaleFactor(scaleFactor, IntPoint(x, y));
}
-JSValueRef DumpRenderTreeSupport::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
+#if ENABLE(STYLE_SCOPED)
+void DumpRenderTreeSupport::setStyleScopedEnabled(bool enabled)
{
- ExecState* exec = toJS(context);
- JSLockHolder lock(exec);
- if (!value)
- return JSValueMakeUndefined(context);
- JSValue jsValue = toJS(exec, value);
- if (!jsValue.inherits(&JSElement::s_info))
- return JSValueMakeUndefined(context);
- JSElement* jsElement = static_cast<JSElement*>(asObject(jsValue));
- Element* element = jsElement->impl();
- RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(element, true);
- return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));
+ RuntimeEnabledFeatures::setStyleScopedEnabled(enabled);
}
+#endif
#if ENABLE(DEVICE_ORIENTATION)
DeviceOrientationClientMock* toDeviceOrientationClientMock(DeviceOrientationClient* client)
@@ -148,7 +140,7 @@ void DumpRenderTreeSupport::setMockDeviceOrientation(BlackBerry::WebKit::WebPage
{
#if ENABLE(DEVICE_ORIENTATION)
Page* page = corePage(webPage);
- DeviceOrientationClientMock* mockClient = toDeviceOrientationClientMock(DeviceOrientationController::from(page)->client());
+ DeviceOrientationClientMock* mockClient = toDeviceOrientationClientMock(DeviceOrientationController::from(page)->deviceOrientationClient());
mockClient->setOrientation(DeviceOrientationData::create(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma));
#endif
}