[GTK] Enable CSS grid layout LayoutTests on GTK+
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2012 16:48:06 +0000 (16:48 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2012 16:48:06 +0000 (16:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90226

Reviewed by Martin Robinson.

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::setCSSGridLayoutEnabled): Pass through to Settings object.
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Tools:

This feature is disabled via Settings by default, but for testing,
we enable it using layoutTestController.overridePreferences. Add the
necessary plumbing for DRT.

WTR already works because support was added for Apple Mac earlier.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues): Feature is off by default.
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::overridePreference): Add handling of WebKitCSSGridLayoutEnabled.

LayoutTests:

* platform/gtk/TestExpectations: Tests should pass.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121568 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Tools/ChangeLog
Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

index 54a2021..554dcc7 100644 (file)
@@ -1,3 +1,12 @@
+2012-06-29  Tony Chang  <tony@chromium.org>
+
+        [GTK] Enable CSS grid layout LayoutTests on GTK+
+        https://bugs.webkit.org/show_bug.cgi?id=90226
+
+        Reviewed by Martin Robinson.
+
+        * platform/gtk/TestExpectations: Tests should pass.
+
 2012-06-29  Stephen White  <senorblanco@chromium.org>
 
         Unreviewed gardening.
index 0925804..391a827 100644 (file)
@@ -228,10 +228,6 @@ BUGWKGTK SKIP : http/tests/security/webgl-remote-read-remote-image-allowed.html
 BUGWKGTK SKIP : http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html = TEXT
 BUGWKGTK SKIP : http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html = TEXT
 
-// CSS Grid Layout is not yet enabled.
-BUGWK60731 : fast/css-grid-layout = TEXT IMAGE
-BUGWK60731 : fast/css-grid-layout/grid-disabled-by-default.html = PASS
-
 // <style scoped> is not yet enabled.
 BUGWK49142 : fast/css/style-scoped = TEXT
 
index 2b64b1c..15f2933 100644 (file)
@@ -1,3 +1,15 @@
+2012-06-29  Tony Chang  <tony@chromium.org>
+
+        [GTK] Enable CSS grid layout LayoutTests on GTK+
+        https://bugs.webkit.org/show_bug.cgi?id=90226
+
+        Reviewed by Martin Robinson.
+
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        (DumpRenderTreeSupportGtk::setCSSGridLayoutEnabled): Pass through to Settings object.
+        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+        (DumpRenderTreeSupportGtk):
+
 2012-06-29  Konrad Piascik  <kpiascik@rim.com>
 
         Don't hardcode target dpi of 160 (it should be 96 on desktop)
index 9005f3a..bec88f3 100644 (file)
@@ -796,6 +796,11 @@ void DumpRenderTreeSupportGtk::setPageCacheSupportsPlugins(WebKitWebView* webVie
     core(webView)->settings()->setPageCacheSupportsPlugins(enabled);
 }
 
+void DumpRenderTreeSupportGtk::setCSSGridLayoutEnabled(WebKitWebView* webView, bool enabled)
+{
+    core(webView)->settings()->setCSSGridLayoutEnabled(enabled);
+}
+
 bool DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId(WebKitWebFrame* frame, JSStringRef id)
 {
     Frame* coreFrame = core(frame);
index 79832fa..99dfa0e 100644 (file)
@@ -122,6 +122,7 @@ public:
 
     static void setHixie76WebSocketProtocolEnabled(WebKitWebView*, bool enabled);
     static void setPageCacheSupportsPlugins(WebKitWebView*, bool enabled);
+    static void setCSSGridLayoutEnabled(WebKitWebView*, bool enabled);
 
     static void deliverAllMutationsIfNecessary();
     static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const char* urlScheme);
index 99c0f8e..21fa00d 100644 (file)
@@ -1,3 +1,21 @@
+2012-06-29  Tony Chang  <tony@chromium.org>
+
+        [GTK] Enable CSS grid layout LayoutTests on GTK+
+        https://bugs.webkit.org/show_bug.cgi?id=90226
+
+        Reviewed by Martin Robinson.
+
+        This feature is disabled via Settings by default, but for testing,
+        we enable it using layoutTestController.overridePreferences. Add the
+        necessary plumbing for DRT.
+
+        WTR already works because support was added for Apple Mac earlier.
+
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (resetDefaultsToConsistentValues): Feature is off by default.
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::overridePreference): Add handling of WebKitCSSGridLayoutEnabled.
+
 2012-06-29  Ádám Kallai  <kadam@inf.u-szeged.hu>
 
         [Qt] Added Qt port for garden-o-matic.
index a3bbd68..f7e9057 100644 (file)
@@ -473,6 +473,7 @@ static void resetDefaultsToConsistentValues()
     DumpRenderTreeSupportGtk::resetGeolocationClientMock(webView);
 
     DumpRenderTreeSupportGtk::setHixie76WebSocketProtocolEnabled(webView, true);
+    DumpRenderTreeSupportGtk::setCSSGridLayoutEnabled(webView, false);
 }
 
 static bool useLongRunningServerMode(int argc, char *argv[])
index 72d69fa..a5255c3 100644 (file)
@@ -807,6 +807,9 @@ void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value
     } else if (g_str_equal(originalName.get(), "WebKitPageCacheSupportsPluginsPreferenceKey")) {
         DumpRenderTreeSupportGtk::setPageCacheSupportsPlugins(webkit_web_frame_get_web_view(mainFrame), booleanFromValue(valueAsString.get()));
         return;
+    } else if (g_str_equal(originalName.get(), "WebKitCSSGridLayoutEnabled")) {
+        DumpRenderTreeSupportGtk::setCSSGridLayoutEnabled(webkit_web_frame_get_web_view(mainFrame), booleanFromValue(valueAsString.get()));
+        return;
     } else {
         fprintf(stderr, "LayoutTestController::overridePreference tried to override "
                 "unknown preference '%s'.\n", originalName.get());