diff options
Diffstat (limited to 'Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp')
-rw-r--r-- | Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp | 26 |
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 } |