This is the only usage of WEBKIT_TOP_LEVEL I can see: if (!g_getenv("WEBKIT_TOP_LEVEL")) g_setenv("WEBKIT_TOP_LEVEL", TOP_LEVEL_DIR, FALSE); And later on: g_error("Could not locate test fonts at %s. Is WEBKIT_TOP_LEVEL set?", fontsPath.data()); Unless I am grossly overlooking something, this makes no sense.
TOP_LEVEL_DIR is used in getTopLevelPath: Tools/DumpRenderTree/gtk/DumpRenderTree.cpp-CString getTopLevelPath() Tools/DumpRenderTree/gtk/DumpRenderTree.cpp-{ Tools/DumpRenderTree/gtk/DumpRenderTree.cpp- if (!g_getenv("WEBKIT_TOP_LEVEL")) Tools/DumpRenderTree/gtk/DumpRenderTree.cpp: g_setenv("WEBKIT_TOP_LEVEL", TOP_LEVEL_DIR, FALSE); Tools/DumpRenderTree/gtk/DumpRenderTree.cpp- Tools/DumpRenderTree/gtk/DumpRenderTree.cpp: return TOP_LEVEL_DIR; Tools/DumpRenderTree/gtk/DumpRenderTree.cpp-} The error you're getting is probably because WebKitGTK expects this repo: https://github.com/mrobinson/webkitgtk-test-fonts To be checked out in webkit/WebKitBuild/Dependencies/Root
WEBKIT_TOP_LEVEL is used in WebCore to load image resources from the trunk (rather than from the installation location) when running DRT: http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp#L39
(In reply to comment #2) > WEBKIT_TOP_LEVEL is used in WebCore to load image resources from the trunk (rather than from the installation location) when running DRT: > http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp#L39 Not used for fonts I guess. It's misleading. Retitling.
Created attachment 218745 [details] Patch
This makes WEBKIT_TOP_LEVEL work again, using the environment variable if available, and the build-time constant if not. I also removed the printing of the font path in the debug message, since it's guaranteed to be null (see the if statement right before).
Created attachment 218746 [details] Patch Actually, it's probably better to make this error message more useful, so now it prints a description of where the fonts should be installed and describes what WEBKIT_TOP_LEVEL is.
Anyone want to review this?
Comment on attachment 218746 [details] Patch Clearing flags on attachment: 218746 Committed r162823: <http://trac.webkit.org/changeset/162823>
All reviewed patches have been landed. Closing bug.