summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/gtk
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-30 15:42:16 +0100
committerSteve Block <steveblock@google.com>2010-10-07 10:59:29 +0100
commitbec39347bb3bb5bf1187ccaf471d26247f28b585 (patch)
tree56bdc4c2978fbfd3d79d0d36d5d6c640ecc09cc8 /WebKitTools/DumpRenderTree/gtk
parent90b7966e7815b262cd19ac25f03aaad9b21fdc06 (diff)
downloadexternal_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.zip
external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.gz
external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.bz2
Merge WebKit at r68651 : Initial merge by git.
Change-Id: I3d6bff59f17eedd6722723354f386fec9be8ad12
Diffstat (limited to 'WebKitTools/DumpRenderTree/gtk')
-rw-r--r--WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp90
-rw-r--r--WebKitTools/DumpRenderTree/gtk/EventSender.cpp60
-rw-r--r--WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp103
-rw-r--r--WebKitTools/DumpRenderTree/gtk/fonts.conf258
-rw-r--r--WebKitTools/DumpRenderTree/gtk/fonts/AHEM____.TTFbin0 -> 12480 bytes
-rw-r--r--WebKitTools/DumpRenderTree/gtk/fonts/fonts.conf282
6 files changed, 451 insertions, 342 deletions
diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
index af2e403..521a0e1 100644
--- a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -35,6 +35,7 @@
#include "AccessibilityController.h"
#include "EventSender.h"
#include "GCController.h"
+#include "GOwnPtr.h"
#include "LayoutTestController.h"
#include "PixelDumpSupport.h"
#include "WorkQueue.h"
@@ -133,37 +134,81 @@ static void appendString(gchar*& target, gchar* string)
static void initializeFonts()
{
#if PLATFORM(X11)
- static int numFonts = -1;
-
FcInit();
- // Some tests may add or remove fonts via the @font-face rule.
- // If that happens, font config should be re-created to suppress any unwanted change.
+ // If a test resulted a font being added or removed via the @font-face rule, then
+ // we want to reset the FontConfig configuration to prevent it from affecting other tests.
+ static int numFonts = 0;
FcFontSet* appFontSet = FcConfigGetFonts(0, FcSetApplication);
- if (appFontSet && numFonts >= 0 && appFontSet->nfont == numFonts)
+ if (appFontSet && numFonts && appFontSet->nfont == numFonts)
return;
- const char* fontDirEnv = g_getenv("WEBKIT_TESTFONTS");
- if (!fontDirEnv)
- g_error("WEBKIT_TESTFONTS environment variable is not set, but it should point to the directory "
- "containing the fonts you can clone from git://gitorious.org/qtwebkit/testfonts.git\n");
+ // Load our configuration file, which sets up proper aliases for family
+ // names like sans, serif and monospace.
+ FcConfig* config = FcConfigCreate();
+ GOwnPtr<gchar> fontConfigFilename(g_build_filename(FONTS_CONF_DIR, "fonts.conf", NULL));
+ if (!FcConfigParseAndLoad(config, reinterpret_cast<FcChar8*>(fontConfigFilename.get()), true))
+ g_error("Couldn't load font configuration file from: %s", fontConfigFilename.get());
+
+ static const char *const fontPaths[][2] = {
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-BoldItalic.ttf",
+ "/usr/share/fonts/liberation/LiberationMono-BoldItalic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Bold.ttf",
+ "/usr/share/fonts/liberation/LiberationMono-Bold.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Italic.ttf",
+ "/usr/share/fonts/liberation/LiberationMono-Italic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Regular.ttf",
+ "/usr/share/fonts/liberation/LiberationMono-Regular.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf",
+ "/usr/share/fonts/liberation/LiberationSans-BoldItalic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Bold.ttf",
+ "/usr/share/fonts/liberation/LiberationSans-Bold.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Italic.ttf",
+ "/usr/share/fonts/liberation/LiberationSans-Italic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf",
+ "/usr/share/fonts/liberation/LiberationSans-Regular.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-BoldItalic.ttf",
+ "/usr/share/fonts/liberation/LiberationSerif-BoldItalic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Bold.ttf",
+ "/usr/share/fonts/liberation/LiberationSerif-Bold.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Italic.ttf",
+ "/usr/share/fonts/liberation/LiberationSerif-Italic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Regular.ttf",
+ "/usr/share/fonts/liberation/LiberationSerif-Regular.ttf", },
+ { "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
+ "/usr/share/fonts/dejavu/DejaVuSans.ttf", },
+ };
- GFile* fontDir = g_file_new_for_path(fontDirEnv);
- if (!fontDir || !g_file_query_exists(fontDir, NULL))
- g_error("WEBKIT_TESTFONTS environment variable is not set correctly - it should point to the directory "
- "containing the fonts you can clone from git://gitorious.org/qtwebkit/testfonts.git\n");
+ // TODO: Some tests use Lucida. We should load these as well, once it becomes
+ // clear how to install these fonts easily on Fedora.
+ for (size_t font = 0; font < G_N_ELEMENTS(fontPaths); font++) {
+ bool found = false;
+ for (size_t path = 0; path < 2; path++) {
+
+ if (g_file_test(fontPaths[font][path], G_FILE_TEST_EXISTS)) {
+ found = true;
+ if (!FcConfigAppFontAddFile(config, reinterpret_cast<const FcChar8*>(fontPaths[font][path])))
+ g_error("Could not load font at %s!", fontPaths[font][path]);
+ else
+ break;
+ }
+ }
+
+ if (!found)
+ g_error("Could not find font at %s. Either install this font or file a bug "
+ "at http://bugs.webkit.org if it is installed in another location.",
+ fontPaths[font][0]);
+ }
- FcConfig *config = FcConfigCreate();
- if (!FcConfigParseAndLoad (config, (FcChar8*) FONTS_CONF_FILE, true))
- g_error("Couldn't load font configuration file");
- if (!FcConfigAppFontAddDir (config, (FcChar8*) g_file_get_path(fontDir)))
- g_error("Couldn't add font dir!");
- FcConfigSetCurrent(config);
+ // Ahem is used by many layout tests.
+ GOwnPtr<gchar> ahemFontFilename(g_build_filename(FONTS_CONF_DIR, "AHEM____.TTF", NULL));
+ if (!FcConfigAppFontAddFile(config, reinterpret_cast<FcChar8*>(ahemFontFilename.get())))
+ g_error("Could not load font at %s!", ahemFontFilename.get());
- g_object_unref(fontDir);
+ if (!FcConfigSetCurrent(config))
+ g_error("Could not set the current font configuration!");
- appFontSet = FcConfigGetFonts(config, FcSetApplication);
- numFonts = appFontSet->nfont;
+ numFonts = FcConfigGetFonts(config, FcSetApplication)->nfont;
#endif
}
@@ -336,6 +381,7 @@ static void resetDefaultsToConsistentValues()
"auto-resize-window", TRUE,
"enable-java-applet", FALSE,
"enable-plugins", TRUE,
+ "enable-hyperlink-auditing", FALSE,
"editing-behavior", WEBKIT_EDITING_BEHAVIOR_MAC,
NULL);
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
index d1529db..6e5fa5f 100644
--- a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
@@ -147,6 +147,58 @@ bool prepareMouseButtonEvent(GdkEvent* event, int eventSenderButtonNumber, guint
return true;
}
+static JSValueRef getMenuItemTitleCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
+{
+ GtkWidget* widget = GTK_WIDGET(JSObjectGetPrivate(object));
+ CString label;
+ if (GTK_IS_SEPARATOR_MENU_ITEM(widget))
+ label = "<separator>";
+ else
+ label = gtk_menu_item_get_label(GTK_MENU_ITEM(widget));
+
+ return JSValueMakeString(context, JSStringCreateWithUTF8CString(label.data()));
+}
+
+static bool setMenuItemTitleCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
+{
+ return true;
+}
+
+static JSValueRef menuItemClickCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ GtkMenuItem* item = GTK_MENU_ITEM(JSObjectGetPrivate(thisObject));
+ gtk_menu_item_activate(item);
+ return JSValueMakeUndefined(context);
+}
+
+static JSStaticFunction staticMenuItemFunctions[] = {
+ { "click", menuItemClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { 0, 0, 0 }
+};
+
+static JSStaticValue staticMenuItemValues[] = {
+ { "title", getMenuItemTitleCallback, setMenuItemTitleCallback, kJSPropertyAttributeNone },
+ { 0, 0, 0, 0 }
+};
+
+static JSClassRef getMenuItemClass()
+{
+ static JSClassRef menuItemClass = 0;
+
+ if (!menuItemClass) {
+ JSClassDefinition classDefinition = {
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ classDefinition.staticFunctions = staticMenuItemFunctions;
+ classDefinition.staticValues = staticMenuItemValues;
+
+ menuItemClass = JSClassCreate(&classDefinition);
+ }
+
+ return menuItemClass;
+}
+
+
static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
GdkEvent* pressEvent = gdk_event_new(GDK_BUTTON_PRESS);
@@ -165,13 +217,7 @@ static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef functio
JSValueRef arrayValues[g_list_length(items)];
int index = 0;
for (GList* item = g_list_first(items); item; item = g_list_next(item)) {
- CString label;
- if (GTK_IS_SEPARATOR_MENU_ITEM(item->data))
- label = "<separator>";
- else
- label = gtk_menu_item_get_label(GTK_MENU_ITEM(item->data));
-
- arrayValues[index] = JSValueMakeString(context, JSStringCreateWithUTF8CString(label.data()));
+ arrayValues[index] = JSObjectMake(context, getMenuItemClass(), item->data);
index++;
}
if (index)
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 32be43d..d831076 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -38,7 +38,6 @@
#include "WorkQueueItem.h"
#include <JavaScriptCore/JSRetainPtr.h>
#include <JavaScriptCore/JSStringRef.h>
-
#include <cstring>
#include <iostream>
#include <sstream>
@@ -46,6 +45,7 @@
#include <glib.h>
#include <libsoup/soup.h>
#include <webkit/webkit.h>
+#include <wtf/gobject/GOwnPtr.h>
extern "C" {
bool webkit_web_frame_pause_animation(WebKitWebFrame* frame, const gchar* name, double time, const gchar* element);
@@ -66,24 +66,6 @@ void webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const
gboolean webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name);
}
-static gchar* copyWebSettingKey(gchar* preferenceKey)
-{
- static GHashTable* keyTable;
-
- if (!keyTable) {
- // If you add a pref here, make sure you reset the value in
- // DumpRenderTree::resetDefaultsToConsistentValues.
- keyTable = g_hash_table_new(g_str_hash, g_str_equal);
- g_hash_table_insert(keyTable, g_strdup("WebKitJavaScriptEnabled"), g_strdup("enable-scripts"));
- g_hash_table_insert(keyTable, g_strdup("WebKitDefaultFontSize"), g_strdup("default-font-size"));
- g_hash_table_insert(keyTable, g_strdup("WebKitEnableCaretBrowsing"), g_strdup("enable-caret-browsing"));
- g_hash_table_insert(keyTable, g_strdup("WebKitUsesPageCachePreferenceKey"), g_strdup("enable-page-cache"));
- g_hash_table_insert(keyTable, g_strdup("WebKitPluginsEnabled"), g_strdup("enable-plugins"));
- }
-
- return g_strdup(static_cast<gchar*>(g_hash_table_lookup(keyTable, preferenceKey)));
-}
-
LayoutTestController::~LayoutTestController()
{
// FIXME: implement
@@ -155,6 +137,12 @@ JSValueRef LayoutTestController::computedStyleIncludingVisitedInfo(JSContextRef
return JSValueMakeUndefined(context);
}
+JSValueRef LayoutTestController::nodesFromRect(JSContextRef context, JSValueRef value, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping)
+{
+ // FIXME: Implement this.
+ return JSValueMakeUndefined(context);
+}
+
JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const
{
// FIXME: implement
@@ -664,48 +652,53 @@ void LayoutTestController::resumeAnimations() const
void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value)
{
- gchar* name = JSStringCopyUTF8CString(key);
- gchar* strValue = JSStringCopyUTF8CString(value);
+ GOwnPtr<gchar> originalName(JSStringCopyUTF8CString(key));
+ GOwnPtr<gchar> valueAsString(JSStringCopyUTF8CString(value));
WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
ASSERT(view);
- WebKitWebSettings* settings = webkit_web_view_get_settings(view);
- gchar* webSettingKey = copyWebSettingKey(name);
-
- if (webSettingKey) {
- GValue stringValue = { 0, { { 0 } } };
- g_value_init(&stringValue, G_TYPE_STRING);
- g_value_set_string(&stringValue, const_cast<gchar*>(strValue));
-
- WebKitWebSettingsClass* klass = WEBKIT_WEB_SETTINGS_GET_CLASS(settings);
- GParamSpec* pspec = g_object_class_find_property(G_OBJECT_CLASS(klass), webSettingKey);
- GValue propValue = { 0, { { 0 } } };
- g_value_init(&propValue, pspec->value_type);
-
- if (g_value_type_transformable(G_TYPE_STRING, pspec->value_type)) {
- g_value_transform(const_cast<GValue*>(&stringValue), &propValue);
- g_object_set_property(G_OBJECT(settings), webSettingKey, const_cast<GValue*>(&propValue));
- } else if (G_VALUE_HOLDS_BOOLEAN(&propValue)) {
- char* lowered = g_utf8_strdown(strValue, -1);
- g_object_set(G_OBJECT(settings), webSettingKey,
- g_str_equal(lowered, "true")
- || g_str_equal(strValue, "1"),
- NULL);
- g_free(lowered);
- } else if (G_VALUE_HOLDS_INT(&propValue)) {
- std::string str(strValue);
- std::stringstream ss(str);
- int val = 0;
- if (!(ss >> val).fail())
- g_object_set(G_OBJECT(settings), webSettingKey, val, NULL);
- } else
- printf("LayoutTestController::overridePreference failed to override preference '%s'.\n", name);
+ // This transformation could be handled by a hash table (and it once was), but
+ // having it prominent, makes it easier for people from other ports to keep the
+ // list up to date.
+ const gchar* propertyName = 0;
+ if (g_str_equal(originalName.get(), "WebKitJavaScriptEnabled"))
+ propertyName = "enable-scripts";
+ else if (g_str_equal(originalName.get(), "WebKitDefaultFontSize"))
+ propertyName = "default-font-size";
+ else if (g_str_equal(originalName.get(), "WebKitEnableCaretBrowsing"))
+ propertyName = "enable-caret-browsing";
+ else if (g_str_equal(originalName.get(), "WebKitUsesPageCachePreferenceKey"))
+ propertyName = "enable-page-cache";
+ else if (g_str_equal(originalName.get(), "WebKitPluginsEnabled"))
+ propertyName = "enable-plugins";
+ else if (g_str_equal(originalName.get(), "WebKitHyperlinkAuditingEnabled"))
+ propertyName = "enable-hyperlink-auditing";
+ else {
+ fprintf(stderr, "LayoutTestController::overridePreference tried to override "
+ "unknown preference '%s'.\n", originalName.get());
+ return;
}
- g_free(webSettingKey);
- g_free(name);
- g_free(strValue);
+ WebKitWebSettings* settings = webkit_web_view_get_settings(view);
+ GParamSpec* pspec = g_object_class_find_property(G_OBJECT_CLASS(
+ WEBKIT_WEB_SETTINGS_GET_CLASS(settings)), propertyName);
+ GValue currentPropertyValue = { 0, { { 0 } } };
+ g_value_init(&currentPropertyValue, pspec->value_type);
+
+ if (G_VALUE_HOLDS_STRING(&currentPropertyValue))
+ g_object_set(settings, propertyName, valueAsString.get(), NULL);
+ else if (G_VALUE_HOLDS_BOOLEAN(&currentPropertyValue))
+ g_object_set(G_OBJECT(settings), propertyName, !g_ascii_strcasecmp(valueAsString.get(), "true")
+ || !g_ascii_strcasecmp(valueAsString.get(), "1"), NULL);
+ else if (G_VALUE_HOLDS_INT(&currentPropertyValue))
+ g_object_set(G_OBJECT(settings), propertyName, atoi(valueAsString.get()), NULL);
+ else if (G_VALUE_HOLDS_FLOAT(&currentPropertyValue)) {
+ gfloat newValue = g_ascii_strtod(valueAsString.get(), 0);
+ g_object_set(G_OBJECT(settings), propertyName, newValue, NULL);
+ } else
+ fprintf(stderr, "LayoutTestController::overridePreference failed to override "
+ "preference '%s'.\n", originalName.get());
}
void LayoutTestController::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
diff --git a/WebKitTools/DumpRenderTree/gtk/fonts.conf b/WebKitTools/DumpRenderTree/gtk/fonts.conf
deleted file mode 100644
index 3540c47..0000000
--- a/WebKitTools/DumpRenderTree/gtk/fonts.conf
+++ /dev/null
@@ -1,258 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
-<fontconfig>
-
-<!--
- Accept deprecated 'mono' alias, replacing it with 'monospace'
--->
- <match target="pattern">
- <test qual="any" name="family">
- <string>mono</string>
- </test>
- <edit name="family" mode="assign">
- <string>monospace</string>
- </edit>
- </match>
-
-<!--
- Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
--->
- <match target="pattern">
- <test qual="any" name="family">
- <string>sans serif</string>
- </test>
- <edit name="family" mode="assign">
- <string>sans-serif</string>
- </edit>
- </match>
-
-<!--
- Accept deprecated 'sans' alias, replacing it with 'sans-serif'
--->
- <match target="pattern">
- <test qual="any" name="family">
- <string>sans</string>
- </test>
- <edit name="family" mode="assign">
- <string>sans-serif</string>
- </edit>
- </match>
-
-
- <config>
-<!--
- These are the default Unicode chars that are expected to be blank
- in fonts. All other blank chars are assumed to be broken and
- won't appear in the resulting charsets
- -->
- <blank>
- <int>0x0020</int> <!-- SPACE -->
- <int>0x00A0</int> <!-- NO-BREAK SPACE -->
- <int>0x00AD</int> <!-- SOFT HYPHEN -->
- <int>0x034F</int> <!-- COMBINING GRAPHEME JOINER -->
- <int>0x0600</int> <!-- ARABIC NUMBER SIGN -->
- <int>0x0601</int> <!-- ARABIC SIGN SANAH -->
- <int>0x0602</int> <!-- ARABIC FOOTNOTE MARKER -->
- <int>0x0603</int> <!-- ARABIC SIGN SAFHA -->
- <int>0x06DD</int> <!-- ARABIC END OF AYAH -->
- <int>0x070F</int> <!-- SYRIAC ABBREVIATION MARK -->
- <int>0x115F</int> <!-- HANGUL CHOSEONG FILLER -->
- <int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER -->
- <int>0x1680</int> <!-- OGHAM SPACE MARK -->
- <int>0x17B4</int> <!-- KHMER VOWEL INHERENT AQ -->
- <int>0x17B5</int> <!-- KHMER VOWEL INHERENT AA -->
- <int>0x180E</int> <!-- MONGOLIAN VOWEL SEPARATOR -->
- <int>0x2000</int> <!-- EN QUAD -->
- <int>0x2001</int> <!-- EM QUAD -->
- <int>0x2002</int> <!-- EN SPACE -->
- <int>0x2003</int> <!-- EM SPACE -->
- <int>0x2004</int> <!-- THREE-PER-EM SPACE -->
- <int>0x2005</int> <!-- FOUR-PER-EM SPACE -->
- <int>0x2006</int> <!-- SIX-PER-EM SPACE -->
- <int>0x2007</int> <!-- FIGURE SPACE -->
- <int>0x2008</int> <!-- PUNCTUATION SPACE -->
- <int>0x2009</int> <!-- THIN SPACE -->
- <int>0x200A</int> <!-- HAIR SPACE -->
- <int>0x200B</int> <!-- ZERO WIDTH SPACE -->
- <int>0x200C</int> <!-- ZERO WIDTH NON-JOINER -->
- <int>0x200D</int> <!-- ZERO WIDTH JOINER -->
- <int>0x200E</int> <!-- LEFT-TO-RIGHT MARK -->
- <int>0x200F</int> <!-- RIGHT-TO-LEFT MARK -->
- <int>0x2028</int> <!-- LINE SEPARATOR -->
- <int>0x2029</int> <!-- PARAGRAPH SEPARATOR -->
- <int>0x202A</int> <!-- LEFT-TO-RIGHT EMBEDDING -->
- <int>0x202B</int> <!-- RIGHT-TO-LEFT EMBEDDING -->
- <int>0x202C</int> <!-- POP DIRECTIONAL FORMATTING -->
- <int>0x202D</int> <!-- LEFT-TO-RIGHT OVERRIDE -->
- <int>0x202E</int> <!-- RIGHT-TO-LEFT OVERRIDE -->
- <int>0x202F</int> <!-- NARROW NO-BREAK SPACE -->
- <int>0x205F</int> <!-- MEDIUM MATHEMATICAL SPACE -->
- <int>0x2060</int> <!-- WORD JOINER -->
- <int>0x2061</int> <!-- FUNCTION APPLICATION -->
- <int>0x2062</int> <!-- INVISIBLE TIMES -->
- <int>0x2063</int> <!-- INVISIBLE SEPARATOR -->
- <int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING -->
- <int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING -->
- <int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING -->
- <int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING -->
- <int>0x206E</int> <!-- NATIONAL DIGIT SHAPES -->
- <int>0x206F</int> <!-- NOMINAL DIGIT SHAPES -->
- <int>0x3000</int> <!-- IDEOGRAPHIC SPACE -->
- <int>0x3164</int> <!-- HANGUL FILLER -->
- <int>0xFEFF</int> <!-- ZERO WIDTH NO-BREAK SPACE -->
- <int>0xFFA0</int> <!-- HALFWIDTH HANGUL FILLER -->
- <int>0xFFF9</int> <!-- INTERLINEAR ANNOTATION ANCHOR -->
- <int>0xFFFA</int> <!-- INTERLINEAR ANNOTATION SEPARATOR -->
- <int>0xFFFB</int> <!-- INTERLINEAR ANNOTATION TERMINATOR -->
- </blank>
-<!--
- Rescan configuration every 30 seconds when FcFontSetList is called
- -->
- <rescan>
- <int>30</int>
- </rescan>
- </config>
-
-<!--
- URW provides metric and shape compatible fonts for these 10 Adobe families.
-
- However, these fonts are quite ugly and do not render well on-screen,
- so we avoid matching them if the application said `anymetrics'; in that
- case, a more generic font with different metrics but better appearance
- will be used.
- -->
- <match target="pattern">
- <test name="family">
- <string>Avant Garde</string>
- </test>
- <test name="anymetrics" qual="all" compare="not_eq">
- <bool>true</bool>
- </test>
- <edit name="family" mode="append">
- <string>URW Gothic L</string>
- </edit>
- </match>
- <match target="pattern">
- <test name="family">
- <string>Bookman</string>
- </test>
- <test name="anymetrics" qual="all" compare="not_eq">
- <bool>true</bool>
- </test>
- <edit name="family" mode="append">
- <string>URW Bookman L</string>
- </edit>
- </match>
- <match target="pattern">
- <test name="family">
- <string>Courier</string>
- </test>
- <test name="anymetrics" qual="all" compare="not_eq">
- <bool>true</bool>
- </test>
- <edit name="family" mode="append">
- <string>Nimbus Mono L</string>
- </edit>
- </match>
- <match target="pattern">
- <test name="family">
- <string>Helvetica</string>
- </test>
- <test name="anymetrics" qual="all" compare="not_eq">
- <bool>true</bool>
- </test>
- <edit name="family" mode="append">
- <string>Nimbus Sans L</string>
- </edit>
- </match>
- <match target="pattern">
- <test name="family">
- <string>New Century Schoolbook</string>
- </test>
- <test name="anymetrics" qual="all" compare="not_eq">
- <bool>true</bool>
- </test>
- <edit name="family" mode="append">
- <string>Century Schoolbook L</string>
- </edit>
- </match>
- <match target="pattern">
- <test name="family">
- <string>Palatino</string>
- </test>
- <test name="anymetrics" qual="all" compare="not_eq">
- <bool>true</bool>
- </test>
- <edit name="family" mode="append">
- <string>URW Palladio L</string>
- </edit>
- </match>
- <match target="pattern">
- <test name="family">
- <string>Times</string>
- </test>
- <test name="anymetrics" qual="all" compare="not_eq">
- <bool>true</bool>
- </test>
- <edit name="family" mode="append">
- <string>Nimbus Roman No9 L</string>
- </edit>
- </match>
- <match target="pattern">
- <test name="family">
- <string>Zapf Chancery</string>
- </test>
- <test name="anymetrics" qual="all" compare="not_eq">
- <bool>true</bool>
- </test>
- <edit name="family" mode="append">
- <string>URW Chancery L</string>
- </edit>
- </match>
- <match target="pattern">
- <test name="family">
- <string>Zapf Dingbats</string>
- </test>
- <test name="anymetrics" qual="all" compare="not_eq">
- <bool>true</bool>
- </test>
- <edit name="family" mode="append">
- <string>Dingbats</string>
- </edit>
- </match>
- <match target="pattern">
- <test name="family">
- <string>Symbol</string>
- </test>
- <test name="anymetrics" qual="all" compare="not_eq">
- <bool>true</bool>
- </test>
- <edit name="family" mode="append" binding="same">
- <string>Standard Symbols L</string>
- </edit>
- </match>
-
-<!--
- Serif faces
- -->
- <alias>
- <family>Nimbus Roman No9 L</family>
- <default><family>serif</family></default>
- </alias>
-<!--
- Sans-serif faces
- -->
- <alias>
- <family>Nimbus Sans L</family>
- <default><family>sans-serif</family></default>
- </alias>
-<!--
- Monospace faces
- -->
- <alias>
- <family>Nimbus Mono L</family>
- <default><family>monospace</family></default>
- </alias>
-
-
-</fontconfig>
diff --git a/WebKitTools/DumpRenderTree/gtk/fonts/AHEM____.TTF b/WebKitTools/DumpRenderTree/gtk/fonts/AHEM____.TTF
new file mode 100644
index 0000000..ac81cb0
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/fonts/AHEM____.TTF
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/gtk/fonts/fonts.conf b/WebKitTools/DumpRenderTree/gtk/fonts/fonts.conf
new file mode 100644
index 0000000..520f96e
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/fonts/fonts.conf
@@ -0,0 +1,282 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+
+ <!-- The sans-serif font should be Liberation Serif -->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>serif</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Serif</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>Times</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Serif</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>Times New Roman</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Serif</string>
+ </edit>
+ </match>
+
+ <!-- The sans-serif font should be Liberation Sans -->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>sans serif</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Sans</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>sans</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Sans</string>
+ </edit>
+ </match>
+ <!-- We need to ensure that layout tests that use "Helvetica" don't
+ fall back to the default serif font -->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>Helvetica</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Sans</string>
+ </edit>
+ </match>
+
+ <!-- The Monospace font should be Liberation Mono -->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>monospace</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Mono</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>mono</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Mono</string>
+ </edit>
+ </match>
+ <!-- We need to ensure that layout tests that use "Courier", "Courier New",
+ and "Monaco" (all monospace fonts) don't fall back to the default
+ serif font -->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>Courier</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Mono</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>Courier New</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Mono</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>Monaco</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Mono</string>
+ </edit>
+ </match>
+
+ <!-- The following hinting specializations are adapted from those in the
+ Chromium test_shell. We try to duplicate their incredibly thorough
+ testing here -->
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>NonAntiAliasedSans</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Sans</string>
+ </edit>
+ <edit name="antialias" mode="assign">
+ <bool>false</bool>
+ </edit>
+ </match>
+
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>SlightHintedSerif</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Serif</string>
+ </edit>
+ <edit name="hintstyle" mode="assign">
+ <const>hintslight</const>
+ </edit>
+ </match>
+
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>NonHintedSans</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Sans</string>
+ </edit>
+ <!-- These deliberately contradict each other. The 'hinting' preference
+ should take priority -->
+ <edit name="hintstyle" mode="assign">
+ <const>hintfull</const>
+ </edit>
+ <edit name="hinting" mode="assign">
+ <bool>false</bool>
+ </edit>
+ </match>
+
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>AutohintedSerif</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Serif</string>
+ </edit>
+ <edit name="autohint" mode="assign">
+ <bool>true</bool>
+ </edit>
+ <edit name="hintstyle" mode="assign">
+ <const>hintmedium</const>
+ </edit>
+ </match>
+
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>HintedSerif</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Serif</string>
+ </edit>
+ <edit name="autohint" mode="assign">
+ <bool>false</bool>
+ </edit>
+ <edit name="hintstyle" mode="assign">
+ <const>hintmedium</const>
+ </edit>
+ </match>
+
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>FullAndAutoHintedSerif</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Serif</string>
+ </edit>
+ <edit name="autohint" mode="assign">
+ <bool>true</bool>
+ </edit>
+ <edit name="hintstyle" mode="assign">
+ <const>hintfull</const>
+ </edit>
+ </match>
+
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>SubpixelEnabledSans</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Sans</string>
+ </edit>
+ <edit name="rgba" mode="assign">
+ <const>rgb</const>
+ </edit>
+ </match>
+
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>SubpixelDisabledSans</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Liberation Sans</string>
+ </edit>
+ <edit name="rgba" mode="assign">
+ <const>none</const>
+ </edit>
+ </match>
+
+ <config>
+ <!-- These are the default Unicode chars that are expected to be blank
+ in fonts. All other blank chars are assumed to be broken and won't
+ appear in the resulting charsets -->
+ <blank>
+ <int>0x0020</int> <!-- SPACE -->
+ <int>0x00A0</int> <!-- NO-BREAK SPACE -->
+ <int>0x00AD</int> <!-- SOFT HYPHEN -->
+ <int>0x034F</int> <!-- COMBINING GRAPHEME JOINER -->
+ <int>0x0600</int> <!-- ARABIC NUMBER SIGN -->
+ <int>0x0601</int> <!-- ARABIC SIGN SANAH -->
+ <int>0x0602</int> <!-- ARABIC FOOTNOTE MARKER -->
+ <int>0x0603</int> <!-- ARABIC SIGN SAFHA -->
+ <int>0x06DD</int> <!-- ARABIC END OF AYAH -->
+ <int>0x070F</int> <!-- SYRIAC ABBREVIATION MARK -->
+ <int>0x115F</int> <!-- HANGUL CHOSEONG FILLER -->
+ <int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER -->
+ <int>0x1680</int> <!-- OGHAM SPACE MARK -->
+ <int>0x17B4</int> <!-- KHMER VOWEL INHERENT AQ -->
+ <int>0x17B5</int> <!-- KHMER VOWEL INHERENT AA -->
+ <int>0x180E</int> <!-- MONGOLIAN VOWEL SEPARATOR -->
+ <int>0x2000</int> <!-- EN QUAD -->
+ <int>0x2001</int> <!-- EM QUAD -->
+ <int>0x2002</int> <!-- EN SPACE -->
+ <int>0x2003</int> <!-- EM SPACE -->
+ <int>0x2004</int> <!-- THREE-PER-EM SPACE -->
+ <int>0x2005</int> <!-- FOUR-PER-EM SPACE -->
+ <int>0x2006</int> <!-- SIX-PER-EM SPACE -->
+ <int>0x2007</int> <!-- FIGURE SPACE -->
+ <int>0x2008</int> <!-- PUNCTUATION SPACE -->
+ <int>0x2009</int> <!-- THIN SPACE -->
+ <int>0x200A</int> <!-- HAIR SPACE -->
+ <int>0x200B</int> <!-- ZERO WIDTH SPACE -->
+ <int>0x200C</int> <!-- ZERO WIDTH NON-JOINER -->
+ <int>0x200D</int> <!-- ZERO WIDTH JOINER -->
+ <int>0x200E</int> <!-- LEFT-TO-RIGHT MARK -->
+ <int>0x200F</int> <!-- RIGHT-TO-LEFT MARK -->
+ <int>0x2028</int> <!-- LINE SEPARATOR -->
+ <int>0x2029</int> <!-- PARAGRAPH SEPARATOR -->
+ <int>0x202A</int> <!-- LEFT-TO-RIGHT EMBEDDING -->
+ <int>0x202B</int> <!-- RIGHT-TO-LEFT EMBEDDING -->
+ <int>0x202C</int> <!-- POP DIRECTIONAL FORMATTING -->
+ <int>0x202D</int> <!-- LEFT-TO-RIGHT OVERRIDE -->
+ <int>0x202E</int> <!-- RIGHT-TO-LEFT OVERRIDE -->
+ <int>0x202F</int> <!-- NARROW NO-BREAK SPACE -->
+ <int>0x205F</int> <!-- MEDIUM MATHEMATICAL SPACE -->
+ <int>0x2060</int> <!-- WORD JOINER -->
+ <int>0x2061</int> <!-- FUNCTION APPLICATION -->
+ <int>0x2062</int> <!-- INVISIBLE TIMES -->
+ <int>0x2063</int> <!-- INVISIBLE SEPARATOR -->
+ <int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING -->
+ <int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING -->
+ <int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING -->
+ <int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING -->
+ <int>0x206E</int> <!-- NATIONAL DIGIT SHAPES -->
+ <int>0x206F</int> <!-- NOMINAL DIGIT SHAPES -->
+ <int>0x3000</int> <!-- IDEOGRAPHIC SPACE -->
+ <int>0x3164</int> <!-- HANGUL FILLER -->
+ <int>0xFEFF</int> <!-- ZERO WIDTH NO-BREAK SPACE -->
+ <int>0xFFA0</int> <!-- HALFWIDTH HANGUL FILLER -->
+ <int>0xFFF9</int> <!-- INTERLINEAR ANNOTATION ANCHOR -->
+ <int>0xFFFA</int> <!-- INTERLINEAR ANNOTATION SEPARATOR -->
+ <int>0xFFFB</int> <!-- INTERLINEAR ANNOTATION TERMINATOR -->
+ </blank>
+ </config>
+</fontconfig>