Diff
Modified: trunk/Tools/ChangeLog (137079 => 137080)
--- trunk/Tools/ChangeLog 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/ChangeLog 2012-12-09 18:14:35 UTC (rev 137080)
@@ -1,3 +1,32 @@
+2012-12-09 Zan Dobersek <[email protected]>
+
+ Remove testRunner.disableImageLoading()
+ https://bugs.webkit.org/show_bug.cgi?id=98083
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Remove the disableImageLoading methods and callback.
+ No tests use the method anymore and all ports except Wx
+ now support this behavior through overriding the
+ WebKitDisplayImagesKey preference.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::overridePreference): Add support for overriding the
+ WebKitDisplayImagesKey preference which is now the preferred way
+ of disabling image loading.
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+
2012-12-09 Joanmarie Diggs <[email protected]>
[GTK] accessibility/label-for-control-hittest.html is failing
Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (137079 => 137080)
--- trunk/Tools/DumpRenderTree/TestRunner.cpp 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp 2012-12-09 18:14:35 UTC (rev 137080)
@@ -548,15 +548,6 @@
return JSValueMakeString(context, decodedHostName.get());
}
-static JSValueRef disableImageLoadingCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- // Has mac implementation, needs windows implementation
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->disableImageLoading();
-
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef dispatchPendingLoadRequestsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has mac implementation, needs windows implementation
@@ -2209,7 +2200,6 @@
{ "computedStyleIncludingVisitedInfo", computedStyleIncludingVisitedInfoCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "decodeHostName", decodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "deliverWebIntent", deliverWebIntentCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "disableImageLoading", disableImageLoadingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "disallowIncreaseForApplicationCacheQuota", disallowIncreaseForApplicationCacheQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dispatchPendingLoadRequests", dispatchPendingLoadRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "display", displayCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
Modified: trunk/Tools/DumpRenderTree/TestRunner.h (137079 => 137080)
--- trunk/Tools/DumpRenderTree/TestRunner.h 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/DumpRenderTree/TestRunner.h 2012-12-09 18:14:35 UTC (rev 137080)
@@ -57,7 +57,6 @@
JSStringRef copyDecodedHostName(JSStringRef name);
JSStringRef copyEncodedHostName(JSStringRef name);
void deliverWebIntent(JSStringRef action, JSStringRef type, JSStringRef data);
- void disableImageLoading();
void dispatchPendingLoadRequests();
void display();
void displayInvalidatedRegion();
Modified: trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp (137079 => 137080)
--- trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp 2012-12-09 18:14:35 UTC (rev 137080)
@@ -415,11 +415,6 @@
notImplemented();
}
-void TestRunner::disableImageLoading()
-{
- BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setLoadsImagesAutomatically(false);
-}
-
void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
{
if (!mainFrame)
@@ -440,6 +435,8 @@
BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setWebSocketsEnabled(valueStr == "true" || valueStr == "1");
else if (keyStr == "WebKitDefaultTextEncodingName")
BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setDefaultTextEncodingName(valueStr);
+ else if (keyStr == "WebKitDisplayImagesKey")
+ BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setLoadsImagesAutomatically(valueStr == "true" || valueStr == "1");
}
void TestRunner::setAlwaysAcceptCookies(bool alwaysAcceptCookies)
Modified: trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp (137079 => 137080)
--- trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp 2012-12-09 18:14:35 UTC (rev 137080)
@@ -353,11 +353,6 @@
DumpRenderTreeSupportEfl::setAutofilled(context, nodeObject, autofilled);
}
-void TestRunner::disableImageLoading()
-{
- ewk_view_setting_auto_load_images_set(browser->mainView(), EINA_FALSE);
-}
-
void TestRunner::setMockDeviceOrientation(bool, double, bool, double, bool, double)
{
// FIXME: Implement for DeviceOrientation layout tests.
Modified: trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp (137079 => 137080)
--- trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp 2012-12-09 18:14:35 UTC (rev 137080)
@@ -415,15 +415,6 @@
DumpRenderTreeSupportGtk::setAutofilled(context, nodeObject, isAutofilled);
}
-void TestRunner::disableImageLoading()
-{
- WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
- ASSERT(view);
-
- WebKitWebSettings* settings = webkit_web_view_get_settings(view);
- g_object_set(G_OBJECT(settings), "auto-load-images", FALSE, NULL);
-}
-
void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
{
// FIXME: Implement for DeviceOrientation layout tests.
Modified: trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm (137079 => 137080)
--- trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm 2012-12-09 18:14:35 UTC (rev 137080)
@@ -631,11 +631,6 @@
// FIXME: implement
}
-void TestRunner::disableImageLoading()
-{
- [[WebPreferences standardPreferences] setLoadsImagesAutomatically:NO];
-}
-
void TestRunner::dispatchPendingLoadRequests()
{
[[mainFrame webView] _dispatchPendingLoadRequests];
Modified: trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp (137079 => 137080)
--- trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp 2012-12-09 18:14:35 UTC (rev 137080)
@@ -563,11 +563,6 @@
return DumpRenderTreeSupportQt::numberOfActiveAnimations(frame->handle());
}
-void TestRunner::disableImageLoading()
-{
- m_drt->webPage()->settings()->setAttribute(QWebSettings::AutoLoadImages, false);
-}
-
void TestRunner::dispatchPendingLoadRequests()
{
// FIXME: Implement for testing fix for 6727495
Modified: trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h (137079 => 137080)
--- trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h 2012-12-09 18:14:35 UTC (rev 137080)
@@ -193,7 +193,6 @@
void removeOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
void dispatchPendingLoadRequests();
- void disableImageLoading();
void clearAllApplicationCaches();
void clearApplicationCacheForOrigin(const QString& url);
Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (137079 => 137080)
--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp 2012-12-09 18:14:35 UTC (rev 137080)
@@ -137,19 +137,6 @@
return 0;
}
-void TestRunner::disableImageLoading()
-{
- COMPtr<IWebView> webView;
- if (FAILED(frame->webView(&webView)))
- return;
-
- COMPtr<IWebPreferences> preferences;
- if (FAILED(webView->preferences(&preferences)))
- return;
-
- preferences->setLoadsImagesAutomatically(FALSE);
-}
-
void TestRunner::dispatchPendingLoadRequests()
{
// FIXME: Implement for testing fix for 6727495
Modified: trunk/Tools/DumpRenderTree/wx/TestRunnerWx.cpp (137079 => 137080)
--- trunk/Tools/DumpRenderTree/wx/TestRunnerWx.cpp 2012-12-09 17:48:34 UTC (rev 137079)
+++ trunk/Tools/DumpRenderTree/wx/TestRunnerWx.cpp 2012-12-09 18:14:35 UTC (rev 137080)
@@ -453,11 +453,6 @@
}
-void TestRunner::disableImageLoading()
-{
-
-}
-
void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
{
// FIXME: implement