[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tonikitoo at webkit.org tonikitoo at webkit.org
Wed Dec 22 14:59:42 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c574ee97545f9b52e29432ad5acfb63de6d1926d
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 27 05:22:23 2010 +0000

    [GTK] Implement DumpRenderTreeSupportGtk (similarly to DumpRenderTreeSupportQt idea)
    https://bugs.webkit.org/show_bug.cgi?id=48199
    
    Reviewed by Martin Robinson.
    Patch by Antonio Gomes <agomes at rim.com>
    
    .:
    
    * GNUmakefile.am: Added WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp|h to GTK+'s build system;
    * autotools/symbols.filter: Added DumpRenderTreeSupportGtk symbols to symbols.filter so they do not get
      filtered and get visible by DRT.
    
    WebKit/gtk:
    
    Implemented an initial version of the DumpRenderTreeSupportGtk class.
    The main idea is that it groups together the bodies of many LayoutTestController
    methods, so they can directly access WebCore features. This way we eliminate the
    need of adding APIs to WebKitGTK just to expand its test coverage through DRT.
    
    The DumpRenderTreeSupportGtk class so far includes a getter and setter for the WebKitTabToLinksPreferenceKey
    property as a sample implementation. Also it makes it possible to unskip fast/events/tab-focus-anchor.html and
    to fix stderr messages from all 22 spatial-navigation tests in fast/events/spatial-navigation.
    
    * WebCoreSupport/ChromeClientGtk.cpp:
    (WebKit::ChromeClient::tabsToLinks):
    * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: Added.
    (DumpRenderTreeSupportGtk::DumpRenderTreeSupportGtk):
    (DumpRenderTreeSupportGtk::~DumpRenderTreeSupportGtk):
    (DumpRenderTreeSupportGtk::setDumpRenderTreeModeEnabled):
    (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled): Getter to the WebKitTabToLinksPreferenceKey property.
    (DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain): Setter to the WebKitTabToLinksPreferenceKey property.
    (DumpRenderTreeSupportGtk::linksIncludedInFocusChain):
    * WebCoreSupport/DumpRenderTreeSupportGtk.h: Added.
    
    WebKitTools:
    
    Implements support to WebKitTabToLinksPreferenceKey through LayoutTestController::overridePreference.
    The corresponding DumpRenderTreeSupportGtk method is called in the DRT context only.
    
    * DumpRenderTree/gtk/DumpRenderTree.cpp:
    (resetDefaultsToConsistentValues):
    (createWebView):
    * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
    (LayoutTestController::overridePreference):
    
    LayoutTests:
    
    * platform/gtk/Skipped: Unskiped fast/events/tab-focus-anchor.html.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70609 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/ChangeLog b/ChangeLog
index 3eb2f32..d3fbc68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-26  Antonio Gomes  <agomes at rim.com>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] Implement DumpRenderTreeSupportGtk (similarly to DumpRenderTreeSupportQt idea)
+        https://bugs.webkit.org/show_bug.cgi?id=48199
+
+        * GNUmakefile.am: Added WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp|h to GTK+'s build system;
+        * autotools/symbols.filter: Added DumpRenderTreeSupportGtk symbols to symbols.filter so they do not get
+          filtered and get visible by DRT.
+
 2010-10-24  Anders Bakken  <agbakken at gmail.com>
 
         Reviewed by Simon Hausmann.
diff --git a/GNUmakefile.am b/GNUmakefile.am
index 6de64a0..40569cd 100644
--- a/GNUmakefile.am
+++ b/GNUmakefile.am
@@ -362,6 +362,8 @@ webkitgtk_sources += \
 	WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
 	WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
 	WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
+	WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp \
+	WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h \
 	WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h \
 	WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp \
 	WebKit/gtk/WebCoreSupport/FullscreenVideoController.h \
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8c40416..67c79b8 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-26  Antonio Gomes  <agomes at rim.com>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] Implement DumpRenderTreeSupportGtk (similarly to DumpRenderTreeSupportQt idea)
+        https://bugs.webkit.org/show_bug.cgi?id=48199
+
+        * platform/gtk/Skipped: Unskiped fast/events/tab-focus-anchor.html.
+
 2010-10-26  MORITA Hajime  <morrita at google.com>
 
         Reviewed by Tony Chang.
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index e6840d2..0ff18b0 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -4654,7 +4654,6 @@ webarchive/test-xml-stylesheet.xml
 # Tests that failed because we don't have an eventSender implementation
 editing/input/scroll-viewport-page-up-down.html
 fast/events/popup-when-select-change.html
-fast/events/tab-focus-anchor.html
 http/tests/misc/slow-loading-mask.html
 http/tests/plugins/plugin-document-has-focus.html
 
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 704904b..bfb970c 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,30 @@
+2010-10-26  Antonio Gomes  <agomes at rim.com>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] Implement DumpRenderTreeSupportGtk (similarly to DumpRenderTreeSupportQt idea)
+        https://bugs.webkit.org/show_bug.cgi?id=48199
+
+        Implemented an initial version of the DumpRenderTreeSupportGtk class.
+        The main idea is that it groups together the bodies of many LayoutTestController
+        methods, so they can directly access WebCore features. This way we eliminate the
+        need of adding APIs to WebKitGTK just to expand its test coverage through DRT.
+
+        The DumpRenderTreeSupportGtk class so far includes a getter and setter for the WebKitTabToLinksPreferenceKey
+        property as a sample implementation. Also it makes it possible to unskip fast/events/tab-focus-anchor.html and
+        to fix stderr messages from all 22 spatial-navigation tests in fast/events/spatial-navigation.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::tabsToLinks):
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: Added.
+        (DumpRenderTreeSupportGtk::DumpRenderTreeSupportGtk):
+        (DumpRenderTreeSupportGtk::~DumpRenderTreeSupportGtk):
+        (DumpRenderTreeSupportGtk::setDumpRenderTreeModeEnabled):
+        (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled): Getter to the WebKitTabToLinksPreferenceKey property.
+        (DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain): Setter to the WebKitTabToLinksPreferenceKey property.
+        (DumpRenderTreeSupportGtk::linksIncludedInFocusChain):
+        * WebCoreSupport/DumpRenderTreeSupportGtk.h: Added.
+
 2010-10-26  Jenn Braithwaite  <jennb at chromium.org>
 
         Reviewed by Dmitry Titov.
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index b872b30..e864ea7 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -25,6 +25,7 @@
 #include "ChromeClientGtk.h"
 
 #include "Console.h"
+#include "DumpRenderTreeSupportGtk.h"
 #include "FileSystem.h"
 #include "FileChooser.h"
 #include "FloatRect.h"
@@ -331,6 +332,9 @@ bool ChromeClient::shouldInterruptJavaScript()
 
 bool ChromeClient::tabsToLinks() const
 {
+    if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled())
+        return DumpRenderTreeSupportGtk::linksIncludedInFocusChain();
+
     return true;
 }
 
diff --git a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
new file mode 100644
index 0000000..8296206
--- /dev/null
+++ b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
@@ -0,0 +1,56 @@
+/*
+ *  Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "config.h"
+#include "DumpRenderTreeSupportGtk.h"
+
+#include "webkitwebview.h"
+#include "webkitprivate.h"
+
+using namespace WebCore;
+
+bool DumpRenderTreeSupportGtk::s_drtRun = false;
+bool DumpRenderTreeSupportGtk::s_linksIncludedInTabChain = true;
+
+DumpRenderTreeSupportGtk::DumpRenderTreeSupportGtk()
+{
+}
+
+DumpRenderTreeSupportGtk::~DumpRenderTreeSupportGtk()
+{
+}
+
+void DumpRenderTreeSupportGtk::setDumpRenderTreeModeEnabled(bool enabled)
+{
+    s_drtRun = enabled;
+}
+
+bool DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled()
+{
+    return s_drtRun;
+}
+void DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(bool enabled)
+{
+    s_linksIncludedInTabChain = enabled;
+}
+
+bool DumpRenderTreeSupportGtk::linksIncludedInFocusChain()
+{
+    return s_linksIncludedInTabChain;
+}
+
diff --git a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
new file mode 100644
index 0000000..5b494ff
--- /dev/null
+++ b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
@@ -0,0 +1,39 @@
+/*
+ *  Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef DumpRenderTreeSupportGtk_h
+#define DumpRenderTreeSupportGtk_h
+
+class DumpRenderTreeSupportGtk {
+
+public:
+    DumpRenderTreeSupportGtk();
+    ~DumpRenderTreeSupportGtk();
+
+    static void setDumpRenderTreeModeEnabled(bool);
+    static bool dumpRenderTreeModeEnabled();
+
+    static void setLinksIncludedInFocusChain(bool);
+    static bool linksIncludedInFocusChain();
+
+private:
+    static bool s_drtRun;
+    static bool s_linksIncludedInTabChain;
+};
+
+#endif
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 59cc796..9bd7c29 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-26  Antonio Gomes  <agomes at rim.com>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] Implement DumpRenderTreeSupportGtk (similarly to DumpRenderTreeSupportQt idea)
+        https://bugs.webkit.org/show_bug.cgi?id=48199
+
+        Implements support to WebKitTabToLinksPreferenceKey through LayoutTestController::overridePreference.
+        The corresponding DumpRenderTreeSupportGtk method is called in the DRT context only.
+
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (resetDefaultsToConsistentValues):
+        (createWebView):
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::overridePreference):
+
 2010-10-26  Ariya Hidayat  <ariya at sencha.com>
 
         Unreviewed, change the order of my emails for bugzilla autocompletion.
diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
index fec61ac..ae381d3 100644
--- a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -38,6 +38,7 @@
 #include "GOwnPtr.h"
 #include "LayoutTestController.h"
 #include "PixelDumpSupport.h"
+#include "WebCoreSupport/DumpRenderTreeSupportGtk.h"
 #include "WorkQueue.h"
 #include "WorkQueueItem.h"
 #include <JavaScriptCore/JavaScript.h>
@@ -443,6 +444,8 @@ static void resetDefaultsToConsistentValues()
 #endif
 
     setlocale(LC_ALL, "");
+
+    DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(true);
 }
 
 static bool useLongRunningServerMode(int argc, char *argv[])
@@ -994,6 +997,8 @@ static WebKitWebView* createWebView()
 {
     WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
 
+    DumpRenderTreeSupportGtk::setDumpRenderTreeModeEnabled(true);
+
     // From bug 11756: Use a frame group name for all WebViews created by
     // DumpRenderTree to allow testing of cross-page frame lookup.
     webkit_web_view_set_group_name(view, "org.webkit.gtk.DumpRenderTree");
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 181ef9f..d29512a 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -33,6 +33,7 @@
 #include "config.h"
 #include "LayoutTestController.h"
 
+#include "../../../WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h"
 #include "DumpRenderTree.h"
 #include "WorkQueue.h"
 #include "WorkQueueItem.h"
@@ -683,10 +684,13 @@ void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value
     else if (g_str_equal(originalName.get(), "WebKitUsesPageCachePreferenceKey"))
         propertyName = "enable-page-cache";
     else if (g_str_equal(originalName.get(), "WebKitPluginsEnabled"))
-         propertyName = "enable-plugins";
+        propertyName = "enable-plugins";
     else if (g_str_equal(originalName.get(), "WebKitHyperlinkAuditingEnabled"))
-         propertyName = "enable-hyperlink-auditing";
-    else {
+        propertyName = "enable-hyperlink-auditing";
+    else if (g_str_equal(originalName.get(), "WebKitTabToLinksPreferenceKey")) {
+        DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(!g_ascii_strcasecmp(valueAsString.get(), "true") || !g_ascii_strcasecmp(valueAsString.get(), "1"));
+        return;
+    } else {
         fprintf(stderr, "LayoutTestController::overridePreference tried to override "
                 "unknown preference '%s'.\n", originalName.get());
         return;
diff --git a/autotools/symbols.filter b/autotools/symbols.filter
index 7bc3f64..c42bce7 100644
--- a/autotools/symbols.filter
+++ b/autotools/symbols.filter
@@ -4,7 +4,7 @@ _ZN3WTF10fastMallocEj;
 _ZN3WTF11fastReallocEPvj;
 _ZN3WTF8fastFreeEPv;
 _ZN3WTF10fastCallocEjj;
-
+_ZN24DumpRenderTreeSupportGtk*;
 local:
 _Z*;
 cti*;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list