Diff
Modified: trunk/LayoutTests/ChangeLog (105685 => 105686)
--- trunk/LayoutTests/ChangeLog 2012-01-24 04:15:06 UTC (rev 105685)
+++ trunk/LayoutTests/ChangeLog 2012-01-24 04:23:41 UTC (rev 105686)
@@ -1,3 +1,14 @@
+2012-01-23 Zan Dobersek <[email protected]>
+
+ [GTK] editing/deleting/5408255.html results are incorrect
+ https://bugs.webkit.org/show_bug.cgi?id=53644
+
+ Reviewed by Martin Robinson.
+
+ Unskip newly-passing editing test.
+
+ * platform/gtk/Skipped:
+
2012-01-23 Julien Chaffraix <[email protected]>
Crash in WebCore::RenderTableSection::rowLogicalHeightChanged
Modified: trunk/LayoutTests/platform/gtk/Skipped (105685 => 105686)
--- trunk/LayoutTests/platform/gtk/Skipped 2012-01-24 04:15:06 UTC (rev 105685)
+++ trunk/LayoutTests/platform/gtk/Skipped 2012-01-24 04:23:41 UTC (rev 105686)
@@ -456,10 +456,6 @@
fast/forms/select-script-onchange.html
fast/html/tab-order.html
-# The box isn't empty after a test run with this test.
-# https://bugs.webkit.org/show_bug.cgi?id=53644
- editing/deleting/5408255.html
-
# Missing delegates:
# Need proper frame loader callbacks reporting
# See https://bugs.webkit.org/show_bug.cgi?id=32170
Modified: trunk/Source/WebCore/ChangeLog (105685 => 105686)
--- trunk/Source/WebCore/ChangeLog 2012-01-24 04:15:06 UTC (rev 105685)
+++ trunk/Source/WebCore/ChangeLog 2012-01-24 04:23:41 UTC (rev 105686)
@@ -1,3 +1,22 @@
+2012-01-23 Zan Dobersek <[email protected]>
+
+ [GTK] editing/deleting/5408255.html results are incorrect
+ https://bugs.webkit.org/show_bug.cgi?id=53644
+
+ Reviewed by Martin Robinson.
+
+ When the WEBKIT_TOP_LEVEL environment variable is set, resources
+ should be loaded from the source tree to which the variable is
+ pointing. This approach is used when performing testing on the
+ Gtk port.
+
+ No new tests, changes cause one test to pass.
+
+ * platform/graphics/gtk/ImageGtk.cpp:
+ (getPathToImageResource): Also make changes to the resource path
+ construction code on Windows.
+ (WebCore::Image::loadPlatformResource):
+
2012-01-23 Julien Chaffraix <[email protected]>
Crash in WebCore::RenderTableSection::rowLogicalHeightChanged
Modified: trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp (105685 => 105686)
--- trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp 2012-01-24 04:15:06 UTC (rev 105685)
+++ trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp 2012-01-24 04:23:41 UTC (rev 105686)
@@ -48,36 +48,42 @@
}
}
-static const char* getWebKitDataDirectory()
+static char* getPathToImageResource(char* resource)
{
static char* dataDirectory = 0;
- if (dataDirectory)
- return dataDirectory;
+ if (!dataDirectory) {
+ dataDirectory = new char[PATH_MAX];
+ if (!GetModuleFileName(hmodule, static_cast<CHAR*>(dataDirectory), sizeof(dataDirectory) - 10))
+ dataDirectory = DATA_DIR;
- dataDirectory = new char[PATH_MAX];
- if (!GetModuleFileName(hmodule, static_cast<CHAR*>(dataDirectory), sizeof(dataDirectory) - 10))
- return DATA_DIR;
-
- // FIXME: This is pretty ugly. Ideally we should be using Windows API
- // functions or GLib methods to calculate paths.
- unsigned char *p;
- p = _mbsrchr(static_cast<const unsigned char *>(dataDirectory), '\\');
- *p = '\0';
- p = _mbsrchr(static_cast<const unsigned char *>(dataDirectory), '\\');
- if (p) {
- if (!stricmp((const char *) (p+1), "bin"))
- *p = '\0';
+ // FIXME: This is pretty ugly. Ideally we should be using Windows API
+ // functions or GLib methods to calculate paths.
+ unsigned char *p;
+ p = _mbsrchr(static_cast<const unsigned char *>(dataDirectory), '\\');
+ *p = '\0';
+ p = _mbsrchr(static_cast<const unsigned char *>(dataDirectory), '\\');
+ if (p) {
+ if (!stricmp((const char *) (p+1), "bin"))
+ *p = '\0';
+ }
+ strcat(dataDirectory, "\\share\\webkitgtk-"WEBKITGTK_API_VERSION_STRING"\\images\\");
}
- strcat(dataDirectory, "\\share");
- return dataDirectory;
+ char* imageResourcePath = new char[PATH_MAX];
+ strcat(imageResourcePath, dataDirectory);
+ strcat(imageResourcePath, resource);
+
+ return imageResourcePath;
}
#else
-static const char* getWebKitDataDirectory()
+static char* getPathToImageResource(char* resource)
{
- return DATA_DIR;
+ if (g_getenv("WEBKIT_TOP_LEVEL"))
+ return g_build_filename(g_getenv("WEBKIT_TOP_LEVEL"), "Source", "WebCore", "Resources", resource, NULL);
+
+ return g_build_filename(DATA_DIR, "webkitgtk-"WEBKITGTK_API_VERSION_STRING, "images", resource, NULL);
}
#endif
@@ -138,7 +144,7 @@
fileName = getThemeIconFileName(GTK_STOCK_MISSING_IMAGE, 16);
if (fileName.isNull()) {
GOwnPtr<gchar> imageName(g_strdup_printf("%s.png", name));
- GOwnPtr<gchar> glibFileName(g_build_filename(getWebKitDataDirectory(), "webkitgtk-"WEBKITGTK_API_VERSION_STRING, "images", imageName.get(), NULL));
+ GOwnPtr<gchar> glibFileName(getPathToImageResource(imageName.get()));
fileName = glibFileName.get();
}
Modified: trunk/Tools/ChangeLog (105685 => 105686)
--- trunk/Tools/ChangeLog 2012-01-24 04:15:06 UTC (rev 105685)
+++ trunk/Tools/ChangeLog 2012-01-24 04:23:41 UTC (rev 105686)
@@ -1,3 +1,24 @@
+2012-01-23 Zan Dobersek <[email protected]>
+
+ [GTK] editing/deleting/5408255.html results are incorrect
+ https://bugs.webkit.org/show_bug.cgi?id=53644
+
+ Reviewed by Martin Robinson.
+
+ WEBKIT_TOP_LEVEL environment variable is now set directly in either
+ WebKitTestRunner or DumpRenderTree through usage of a compilation-time
+ macro. This way both tools can be run outside the test harness without
+ the need to manually set the environment variable.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (getTopLevelPath):
+ * GNUmakefile.am:
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort.setup_environ_for_server):
+ * WebKitTestRunner/GNUmakefile.am:
+ * WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp:
+ (WTR::InjectedBundle::platformInitialize):
+
2012-01-23 Dmitry Lomov <[email protected]>
[Chromium] Implement layoutTestController.workerThreadCount in DRT
Modified: trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp (105685 => 105686)
--- trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp 2012-01-24 04:15:06 UTC (rev 105685)
+++ trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp 2012-01-24 04:23:41 UTC (rev 105686)
@@ -169,16 +169,10 @@
CString getTopLevelPath()
{
- if (const char* topLevelDirectory = g_getenv("WEBKIT_TOP_LEVEL"))
- return topLevelDirectory;
+ if (!g_getenv("WEBKIT_TOP_LEVEL"))
+ g_setenv("WEBKIT_TOP_LEVEL", TOP_LEVEL_DIR, FALSE);
- // If the environment variable wasn't provided then assume we were built into
- // WebKitBuild/Debug or WebKitBuild/Release. Obviously this will fail if the build
- // directory is non-standard, but we can't do much more about this.
- GOwnPtr<char> parentPath(g_path_get_dirname(getCurrentExecutablePath().data()));
- GOwnPtr<char> layoutTestsPath(g_build_filename(parentPath.get(), "..", "..", "..", NULL));
- GOwnPtr<char> absoluteTopLevelPath(realpath(layoutTestsPath.get(), 0));
- return absoluteTopLevelPath.get();
+ return TOP_LEVEL_DIR;
}
static void initializeFonts(const char* testURL = 0)
Modified: trunk/Tools/GNUmakefile.am (105685 => 105686)
--- trunk/Tools/GNUmakefile.am 2012-01-24 04:15:06 UTC (rev 105685)
+++ trunk/Tools/GNUmakefile.am 2012-01-24 04:23:41 UTC (rev 105686)
@@ -74,6 +74,7 @@
# DumpRenderTree
Programs_DumpRenderTree_CPPFLAGS = \
$(global_cppflags) \
+ -DTOP_LEVEL_DIR=\"${shell pwd}/${srcdir}\" \
-I$(srcdir)/Tools/DumpRenderTree \
-I$(srcdir)/Tools/DumpRenderTree/cairo \
-I$(srcdir)/Tools/DumpRenderTree/gtk \
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py (105685 => 105686)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py 2012-01-24 04:15:06 UTC (rev 105685)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py 2012-01-24 04:23:41 UTC (rev 105686)
@@ -89,7 +89,6 @@
environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('Libraries', 'libTestRunnerInjectedBundle.la')
environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('TestNetscapePlugin', '.libs')
environment['WEBKIT_INSPECTOR_PATH'] = self._build_path('Programs', 'resources', 'inspector')
- environment['WEBKIT_TOP_LEVEL'] = self._config.webkit_base_dir()
environment['AUDIO_RESOURCES_PATH'] = self._filesystem.join(self._config.webkit_base_dir(),
'Source', 'WebCore', 'platform',
'audio', 'resources')
Modified: trunk/Tools/WebKitTestRunner/GNUmakefile.am (105685 => 105686)
--- trunk/Tools/WebKitTestRunner/GNUmakefile.am 2012-01-24 04:15:06 UTC (rev 105685)
+++ trunk/Tools/WebKitTestRunner/GNUmakefile.am 2012-01-24 04:23:41 UTC (rev 105686)
@@ -115,6 +115,7 @@
Libraries_libTestRunnerInjectedBundle_la_CPPFLAGS = \
-DFONTS_CONF_DIR=\"${shell pwd}/${srcdir}/Tools/DumpRenderTree/gtk/fonts\" \
+ -DTOP_LEVEL_DIR=\"${shell pwd}/${srcdir}\" \
-include Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h \
-I$(srcdir)/Tools/WebKitTestRunner \
-I$(srcdir)/Tools/WebKitTestRunner/InjectedBundle \
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp (105685 => 105686)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp 2012-01-24 04:15:06 UTC (rev 105685)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp 2012-01-24 04:23:41 UTC (rev 105686)
@@ -44,6 +44,9 @@
// will cause tests to fail because of unexpected output. We squelch all debug
// messages sent to the logger.
g_log_set_default_handler(logHandler, 0);
+
+ if (!g_getenv("WEBKIT_TOP_LEVEL"))
+ g_setenv("WEBKIT_TOP_LEVEL", TOP_LEVEL_DIR, FALSE);
}
} // namespace WTR