Changeset 105686 in webkit
- Timestamp:
- Jan 23, 2012 8:23:41 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r105685 r105686 1 2012-01-23 Zan Dobersek <zandobersek@gmail.com> 2 3 [GTK] editing/deleting/5408255.html results are incorrect 4 https://bugs.webkit.org/show_bug.cgi?id=53644 5 6 Reviewed by Martin Robinson. 7 8 Unskip newly-passing editing test. 9 10 * platform/gtk/Skipped: 11 1 12 2012-01-23 Julien Chaffraix <jchaffraix@webkit.org> 2 13 -
trunk/LayoutTests/platform/gtk/Skipped
r105629 r105686 456 456 fast/forms/select-script-onchange.html 457 457 fast/html/tab-order.html 458 459 # The box isn't empty after a test run with this test.460 # https://bugs.webkit.org/show_bug.cgi?id=53644461 editing/deleting/5408255.html462 458 463 459 # Missing delegates: -
trunk/Source/WebCore/ChangeLog
r105685 r105686 1 2012-01-23 Zan Dobersek <zandobersek@gmail.com> 2 3 [GTK] editing/deleting/5408255.html results are incorrect 4 https://bugs.webkit.org/show_bug.cgi?id=53644 5 6 Reviewed by Martin Robinson. 7 8 When the WEBKIT_TOP_LEVEL environment variable is set, resources 9 should be loaded from the source tree to which the variable is 10 pointing. This approach is used when performing testing on the 11 Gtk port. 12 13 No new tests, changes cause one test to pass. 14 15 * platform/graphics/gtk/ImageGtk.cpp: 16 (getPathToImageResource): Also make changes to the resource path 17 construction code on Windows. 18 (WebCore::Image::loadPlatformResource): 19 1 20 2012-01-23 Julien Chaffraix <jchaffraix@webkit.org> 2 21 -
trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp
r81589 r105686 49 49 } 50 50 51 static c onst char* getWebKitDataDirectory()51 static char* getPathToImageResource(char* resource) 52 52 { 53 53 static char* dataDirectory = 0; 54 if (dataDirectory) 55 return dataDirectory; 54 if (!dataDirectory) { 55 dataDirectory = new char[PATH_MAX]; 56 if (!GetModuleFileName(hmodule, static_cast<CHAR*>(dataDirectory), sizeof(dataDirectory) - 10)) 57 dataDirectory = DATA_DIR; 56 58 57 dataDirectory = new char[PATH_MAX]; 58 if (!GetModuleFileName(hmodule, static_cast<CHAR*>(dataDirectory), sizeof(dataDirectory) - 10)) 59 return DATA_DIR; 59 // FIXME: This is pretty ugly. Ideally we should be using Windows API 60 // functions or GLib methods to calculate paths. 61 unsigned char *p; 62 p = _mbsrchr(static_cast<const unsigned char *>(dataDirectory), '\\'); 63 *p = '\0'; 64 p = _mbsrchr(static_cast<const unsigned char *>(dataDirectory), '\\'); 65 if (p) { 66 if (!stricmp((const char *) (p+1), "bin")) 67 *p = '\0'; 68 } 69 strcat(dataDirectory, "\\share\\webkitgtk-"WEBKITGTK_API_VERSION_STRING"\\images\\"); 70 } 60 71 61 // FIXME: This is pretty ugly. Ideally we should be using Windows API 62 // functions or GLib methods to calculate paths. 63 unsigned char *p; 64 p = _mbsrchr(static_cast<const unsigned char *>(dataDirectory), '\\'); 65 *p = '\0'; 66 p = _mbsrchr(static_cast<const unsigned char *>(dataDirectory), '\\'); 67 if (p) { 68 if (!stricmp((const char *) (p+1), "bin")) 69 *p = '\0'; 70 } 71 strcat(dataDirectory, "\\share"); 72 char* imageResourcePath = new char[PATH_MAX]; 73 strcat(imageResourcePath, dataDirectory); 74 strcat(imageResourcePath, resource); 72 75 73 return dataDirectory;76 return imageResourcePath; 74 77 } 75 78 76 79 #else 77 80 78 static c onst char* getWebKitDataDirectory()81 static char* getPathToImageResource(char* resource) 79 82 { 80 return DATA_DIR; 83 if (g_getenv("WEBKIT_TOP_LEVEL")) 84 return g_build_filename(g_getenv("WEBKIT_TOP_LEVEL"), "Source", "WebCore", "Resources", resource, NULL); 85 86 return g_build_filename(DATA_DIR, "webkitgtk-"WEBKITGTK_API_VERSION_STRING, "images", resource, NULL); 81 87 } 82 88 … … 139 145 if (fileName.isNull()) { 140 146 GOwnPtr<gchar> imageName(g_strdup_printf("%s.png", name)); 141 GOwnPtr<gchar> glibFileName(g _build_filename(getWebKitDataDirectory(), "webkitgtk-"WEBKITGTK_API_VERSION_STRING, "images", imageName.get(), NULL));147 GOwnPtr<gchar> glibFileName(getPathToImageResource(imageName.get())); 142 148 fileName = glibFileName.get(); 143 149 } -
trunk/Tools/ChangeLog
r105684 r105686 1 2012-01-23 Zan Dobersek <zandobersek@gmail.com> 2 3 [GTK] editing/deleting/5408255.html results are incorrect 4 https://bugs.webkit.org/show_bug.cgi?id=53644 5 6 Reviewed by Martin Robinson. 7 8 WEBKIT_TOP_LEVEL environment variable is now set directly in either 9 WebKitTestRunner or DumpRenderTree through usage of a compilation-time 10 macro. This way both tools can be run outside the test harness without 11 the need to manually set the environment variable. 12 13 * DumpRenderTree/gtk/DumpRenderTree.cpp: 14 (getTopLevelPath): 15 * GNUmakefile.am: 16 * Scripts/webkitpy/layout_tests/port/gtk.py: 17 (GtkPort.setup_environ_for_server): 18 * WebKitTestRunner/GNUmakefile.am: 19 * WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp: 20 (WTR::InjectedBundle::platformInitialize): 21 1 22 2012-01-23 Dmitry Lomov <dslomov@google.com> 2 23 -
trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
r105587 r105686 170 170 CString getTopLevelPath() 171 171 { 172 if (const char* topLevelDirectory = g_getenv("WEBKIT_TOP_LEVEL")) 173 return topLevelDirectory; 174 175 // If the environment variable wasn't provided then assume we were built into 176 // WebKitBuild/Debug or WebKitBuild/Release. Obviously this will fail if the build 177 // directory is non-standard, but we can't do much more about this. 178 GOwnPtr<char> parentPath(g_path_get_dirname(getCurrentExecutablePath().data())); 179 GOwnPtr<char> layoutTestsPath(g_build_filename(parentPath.get(), "..", "..", "..", NULL)); 180 GOwnPtr<char> absoluteTopLevelPath(realpath(layoutTestsPath.get(), 0)); 181 return absoluteTopLevelPath.get(); 172 if (!g_getenv("WEBKIT_TOP_LEVEL")) 173 g_setenv("WEBKIT_TOP_LEVEL", TOP_LEVEL_DIR, FALSE); 174 175 return TOP_LEVEL_DIR; 182 176 } 183 177 -
trunk/Tools/GNUmakefile.am
r105315 r105686 75 75 Programs_DumpRenderTree_CPPFLAGS = \ 76 76 $(global_cppflags) \ 77 -DTOP_LEVEL_DIR=\"${shell pwd}/${srcdir}\" \ 77 78 -I$(srcdir)/Tools/DumpRenderTree \ 78 79 -I$(srcdir)/Tools/DumpRenderTree/cairo \ -
trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py
r105183 r105686 90 90 environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('TestNetscapePlugin', '.libs') 91 91 environment['WEBKIT_INSPECTOR_PATH'] = self._build_path('Programs', 'resources', 'inspector') 92 environment['WEBKIT_TOP_LEVEL'] = self._config.webkit_base_dir()93 92 environment['AUDIO_RESOURCES_PATH'] = self._filesystem.join(self._config.webkit_base_dir(), 94 93 'Source', 'WebCore', 'platform', -
trunk/Tools/WebKitTestRunner/GNUmakefile.am
r103929 r105686 116 116 Libraries_libTestRunnerInjectedBundle_la_CPPFLAGS = \ 117 117 -DFONTS_CONF_DIR=\"${shell pwd}/${srcdir}/Tools/DumpRenderTree/gtk/fonts\" \ 118 -DTOP_LEVEL_DIR=\"${shell pwd}/${srcdir}\" \ 118 119 -include Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h \ 119 120 -I$(srcdir)/Tools/WebKitTestRunner \ -
trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp
r87760 r105686 45 45 // messages sent to the logger. 46 46 g_log_set_default_handler(logHandler, 0); 47 48 if (!g_getenv("WEBKIT_TOP_LEVEL")) 49 g_setenv("WEBKIT_TOP_LEVEL", TOP_LEVEL_DIR, FALSE); 47 50 } 48 51
Note: See TracChangeset
for help on using the changeset viewer.