Allow per-script font settings to be specified in layout tests
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Mar 2012 02:12:28 +0000 (02:12 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Mar 2012 02:12:28 +0000 (02:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78184

Patch by Matt Falkenhagen <falken@chromium.org> on 2012-03-14
Reviewed by Hajime Morita.

This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of
the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented
for Chromium so far.

.:

* Source/autotools/symbols.filter: Added symbols.

Source/WebCore:

Test: changed fast/text/international/locale-sensitive-fonts.html to use InternalSettings
instead of overridePreference.

* WebCore.exp.in: Added symbols.
* platform/text/LocaleToScriptMapping.h: Added scriptNameToCode used by InternalSettings.
(WebCore):
* platform/text/LocaleToScriptMappingDefault.cpp:
(WebCore::scriptNameToCode):
(WebCore::localeToScriptCodeForFontSelection):
* platform/text/LocaleToScriptMappingICU.cpp:
(WebCore::scriptNameToCode):
(WebCore):
* testing/InternalSettings.cpp: Added per-script font settings.
(WebCore):
(WebCore::setFontFamily):
(WebCore::InternalSettings::setStandardFontFamily):
(WebCore::InternalSettings::setSerifFontFamily):
(WebCore::InternalSettings::setSansSerifFontFamily):
(WebCore::InternalSettings::setFixedFontFamily):
(WebCore::InternalSettings::setCursiveFontFamily):
(WebCore::InternalSettings::setFantasyFontFamily):
(WebCore::InternalSettings::setPictographFontFamily):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit2:

* win/WebKit2.def: Added symbols.
* win/WebKit2CFLite.def: Added symbols.

LayoutTests:

* fast/text/international/locale-sensitive-fonts-expected.html: Added. Changed test to a reftest.
* fast/text/international/locale-sensitive-fonts.html: Changed to use InternalSettings.
* platform/chromium-win/fast/text/international/locale-sensitive-fonts-expected.png: Removed.
* platform/chromium/fast/text/international/locale-sensitive-fonts-expected.png: Removed.
* platform/chromium/fast/text/international/locale-sensitive-fonts-expected.txt: Removed.
* platform/efl/Skipped: Removed locale-sensitive-fonts.html since it no longer relies on overridePreference.
* platform/gtk-wk2/Skipped: Ditto.
* platform/gtk/Skipped: Ditto.
* platform/mac/Skipped: Ditto.
* platform/qt/Skipped: Ditto.
* platform/win/Skipped: Ditto.
* platform/wincairo/Skipped: Ditto.
* platform/wk2/Skipped: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110808 268f45cc-cd09-0410-ab3c-d52691b4dbfc

27 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/text/international/locale-sensitive-fonts-expected.html [new file with mode: 0644]
LayoutTests/fast/text/international/locale-sensitive-fonts.html
LayoutTests/platform/chromium-win/fast/text/international/locale-sensitive-fonts-expected.png [deleted file]
LayoutTests/platform/chromium/fast/text/international/locale-sensitive-fonts-expected.png [deleted file]
LayoutTests/platform/chromium/fast/text/international/locale-sensitive-fonts-expected.txt [deleted file]
LayoutTests/platform/efl/Skipped
LayoutTests/platform/gtk-wk2/Skipped
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
LayoutTests/platform/wincairo/Skipped
LayoutTests/platform/wk2/Skipped
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/text/LocaleToScriptMapping.h
Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp
Source/WebCore/platform/text/LocaleToScriptMappingICU.cpp
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def
Source/autotools/symbols.filter

index 690566bc35e8d9c96037be388e93c95bc1678ca2..dd0bfb7a08236590033d669f9313aa476ddd151b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2012-03-14  Matt Falkenhagen  <falken@chromium.org>
+
+        Allow per-script font settings to be specified in layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=78184
+
+        Reviewed by Hajime Morita.
+
+        This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of
+        the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented
+        for Chromium so far.
+
+        * Source/autotools/symbols.filter: Added symbols.
+
 2012-03-14  Thiago Marcos P. Santos  <thiago.santos@intel.com>
 
         [EFL] Enable HTML5 Summary and Details elements
index 6f36e721f61b4ab12bb5f047de08ca9810bd39a1..180a828afaed3be3ac31af9e6ff0ca786d4b3b8f 100644 (file)
@@ -1,3 +1,28 @@
+2012-03-14  Matt Falkenhagen  <falken@chromium.org>
+
+        Allow per-script font settings to be specified in layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=78184
+
+        Reviewed by Hajime Morita.
+
+        This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of
+        the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented
+        for Chromium so far.
+
+        * fast/text/international/locale-sensitive-fonts-expected.html: Added. Changed test to a reftest.
+        * fast/text/international/locale-sensitive-fonts.html: Changed to use InternalSettings.
+        * platform/chromium-win/fast/text/international/locale-sensitive-fonts-expected.png: Removed.
+        * platform/chromium/fast/text/international/locale-sensitive-fonts-expected.png: Removed.
+        * platform/chromium/fast/text/international/locale-sensitive-fonts-expected.txt: Removed.
+        * platform/efl/Skipped: Removed locale-sensitive-fonts.html since it no longer relies on overridePreference.
+        * platform/gtk-wk2/Skipped: Ditto.
+        * platform/gtk/Skipped: Ditto.
+        * platform/mac/Skipped: Ditto.
+        * platform/qt/Skipped: Ditto.
+        * platform/win/Skipped: Ditto.
+        * platform/wincairo/Skipped: Ditto.
+        * platform/wk2/Skipped: Ditto.
+
 2012-03-14  Jessie Berlin  <jberlin@apple.com>
 
         fullscreen/video-controls-drag.html failing on Mac
diff --git a/LayoutTests/fast/text/international/locale-sensitive-fonts-expected.html b/LayoutTests/fast/text/international/locale-sensitive-fonts-expected.html
new file mode 100644 (file)
index 0000000..64f9189
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<div style="font-size: 20px">
+<div style="font-family: 'Ahem'">this is ahem font</div>
+<div style="font-family: 'Ahem'">this is ahem font</div>
+<div style="font-family: 'Ahem'">this is ahem font</div>
+</div>
+</body>
+</html>
index 3b26210e31e364c27626952f93d3cc565dcedcf3..6a9e2a1575c3e05575dcd00d6f49472ca262cca7 100644 (file)
@@ -2,9 +2,9 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController) {
-    layoutTestController.overridePreference("WebKitStandardFontMap", [ "Hans", "Ahem" ]);
-    layoutTestController.overridePreference("WebKitFantasyFontMap", [ "Hans", "Ahem" ]);
+if (window.internals) {
+    window.internals.settings.setStandardFontFamily("Ahem", "Hans");
+    window.internals.settings.setFantasyFontFamily("Ahem", "Hans");
 }
 </script>
 </head>
diff --git a/LayoutTests/platform/chromium-win/fast/text/international/locale-sensitive-fonts-expected.png b/LayoutTests/platform/chromium-win/fast/text/international/locale-sensitive-fonts-expected.png
deleted file mode 100644 (file)
index c2b535b..0000000
Binary files a/LayoutTests/platform/chromium-win/fast/text/international/locale-sensitive-fonts-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/chromium/fast/text/international/locale-sensitive-fonts-expected.png b/LayoutTests/platform/chromium/fast/text/international/locale-sensitive-fonts-expected.png
deleted file mode 100644 (file)
index 1ad0cb4..0000000
Binary files a/LayoutTests/platform/chromium/fast/text/international/locale-sensitive-fonts-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/chromium/fast/text/international/locale-sensitive-fonts-expected.txt b/LayoutTests/platform/chromium/fast/text/international/locale-sensitive-fonts-expected.txt
deleted file mode 100644 (file)
index afa4e81..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x76
-  RenderBlock {HTML} at (0,0) size 800x76
-    RenderBody {BODY} at (8,8) size 784x60
-      RenderBlock {DIV} at (0,0) size 784x60
-        RenderBlock {DIV} at (0,0) size 784x20
-          RenderText {#text} at (0,0) size 340x20
-            text run at (0,0) width 340: "this is ahem font"
-        RenderBlock {DIV} at (0,20) size 784x20
-          RenderText {#text} at (0,0) size 340x20
-            text run at (0,0) width 340: "this is ahem font"
-        RenderBlock {DIV} at (0,40) size 784x20
-          RenderText {#text} at (0,0) size 340x20
-            text run at (0,0) width 340: "this is ahem font"
index f4a73ce84e59df49f1f5b3dfe75ccd4546ebc78e..0d69f103577f30d56960ee569e62e7ea93629d12 100644 (file)
@@ -659,7 +659,6 @@ fast/repaint/no-caret-repaint-in-non-content-editable-element.html
 fast/spatial-navigation
 fast/text/international/content-language-font-selection.html
 fast/text/international/content-language-with-subtags.html
-fast/text/international/locale-sensitive-fonts.html
 fast/text/zero-font-size.html
 fast/viewport/viewport-128.html
 http/tests/appcache/disabled.html
index 6e40588731d44bd69d58bd156d0ac9078f235b74..95ccc92a47847182238dd2a6de8a069ab8f6145c 100644 (file)
@@ -210,7 +210,6 @@ fast/events/wheelevent-direction-inverted-from-device.html
 # https://bugs.webkit.org/show_bug.cgi?id=42197
 fast/text/international/content-language-font-selection.html
 fast/text/international/content-language-with-subtags.html
-fast/text/international/locale-sensitive-fonts.html
 fast/repaint/no-caret-repaint-in-non-content-editable-element.html
 editing/selection/caret-mode-paragraph-keys-navigation.html
 platform/gtk/editing/selection/caret-mode-document-begin-end.html
index 7cfbde7f3de3a5efc8da895c90a1d28caead757a..90b670b907cab022cd06ffee94535e713cbed7c8 100644 (file)
@@ -377,7 +377,6 @@ css3/filters
 # supported.
 fast/text/international/content-language-font-selection.html
 fast/text/international/content-language-with-subtags.html
-fast/text/international/locale-sensitive-fonts.html
 
 # Needs layoutTestController.enableAutoResizeMode()
 fast/autoresize
index bcf2005fed0d9c97f35e0e6b6d5682b8329f64d8..9cdd904aa4f2452b67dae6361798b20767203bdb 100644 (file)
@@ -522,7 +522,6 @@ fast/repaint/table-extra-bottom-grow.html
 # DRT doesn't support overridePreference("WebKit*FontMap"...)
 fast/text/international/content-language-font-selection.html
 fast/text/international/content-language-with-subtags.html
-fast/text/international/locale-sensitive-fonts.html
 
 # Web Intents is not yet enabled.
 webintents/
index 8dfadce87c37bc234aaaf19da22a0dd01163540e..ce021992368f3fe5985f5cb93e4db3a43e6d9fc1 100644 (file)
@@ -1053,7 +1053,6 @@ java
 fast/dom/Window/timer-resume-on-navigation-back.html
 fast/text/international/content-language-font-selection.html
 fast/text/international/content-language-with-subtags.html
-fast/text/international/locale-sensitive-fonts.html
 loader/go-back-to-different-window-size.html
 
 # Missing layoutTestController.findString() http://webkit.org/b/50236
index fc736fa99c19eef55443a2972b9b1d9cb269c579..1d458e7cd5efa7bee5b9c8c5c539084709d8c206 100644 (file)
@@ -1533,7 +1533,6 @@ fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
 # DRT doesn't support overridePreference("WebKit*FontMap"...)
 fast/text/international/content-language-font-selection.html
 fast/text/international/content-language-with-subtags.html
-fast/text/international/locale-sensitive-fonts.html
 
 # Web Intents is not yet enabled.
 webintents/
index ca82a1687c4551fb48998e4cc3538597c8c1a9e7..a5066208d4f50a700deaf91d5d895e374a6b9ab3 100644 (file)
@@ -2046,7 +2046,6 @@ fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
 # DRT doesn't support overridePreference("WebKit*FontMap"...)
 fast/text/international/content-language-font-selection.html
 fast/text/international/content-language-with-subtags.html
-fast/text/international/locale-sensitive-fonts.html
 
 # Web Intents is not yet enabled.
 webintents/
index 26687efc7d5b9d3fe0d1bbef17c8b2199f065b1a..93b11412f8ec4c7fb15ad26805378f52dc34134f 100644 (file)
@@ -294,7 +294,6 @@ fast/repaint/no-caret-repaint-in-non-content-editable-element.html
 fast/text/zero-font-size.html
 fast/text/international/content-language-font-selection.html
 fast/text/international/content-language-with-subtags.html
-fast/text/international/locale-sensitive-fonts.html
 css3/filters/effect-combined.html
 css3/filters/filter-repaint.html
 
index d8c2bdf3693ca0984ce130fdd0ba150d6a6ef73b..0ef5d1c99b35e7d59a64678d164cd4777ba34427 100644 (file)
@@ -1,3 +1,40 @@
+2012-03-14  Matt Falkenhagen  <falken@chromium.org>
+
+        Allow per-script font settings to be specified in layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=78184
+
+        Reviewed by Hajime Morita.
+
+        This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of
+        the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented
+        for Chromium so far.
+
+        Test: changed fast/text/international/locale-sensitive-fonts.html to use InternalSettings
+        instead of overridePreference.
+
+        * WebCore.exp.in: Added symbols.
+        * platform/text/LocaleToScriptMapping.h: Added scriptNameToCode used by InternalSettings.
+        (WebCore):
+        * platform/text/LocaleToScriptMappingDefault.cpp:
+        (WebCore::scriptNameToCode):
+        (WebCore::localeToScriptCodeForFontSelection):
+        * platform/text/LocaleToScriptMappingICU.cpp:
+        (WebCore::scriptNameToCode):
+        (WebCore):
+        * testing/InternalSettings.cpp: Added per-script font settings.
+        (WebCore):
+        (WebCore::setFontFamily):
+        (WebCore::InternalSettings::setStandardFontFamily):
+        (WebCore::InternalSettings::setSerifFontFamily):
+        (WebCore::InternalSettings::setSansSerifFontFamily):
+        (WebCore::InternalSettings::setFixedFontFamily):
+        (WebCore::InternalSettings::setCursiveFontFamily):
+        (WebCore::InternalSettings::setFantasyFontFamily):
+        (WebCore::InternalSettings::setPictographFontFamily):
+        * testing/InternalSettings.h:
+        (InternalSettings):
+        * testing/InternalSettings.idl:
+
 2012-03-14  Kwonjin Jeong  <gram@company100.net>
 
         Remove obsolete constructors of CSSPrimitiveValue class.
index 171694a675bebbcbdd0f65e0ac2beef1a192cbee..fe3ae50d055cbc81c9cff5eeecf47fc065d63b06 100644 (file)
@@ -527,6 +527,7 @@ __ZN7WebCore16enclosingIntRectERK7_NSRect
 __ZN7WebCore16enclosingIntRectERKNS_9FloatRectE
 __ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
 __ZN7WebCore16isUserVisibleURLEP8NSString
+__ZN7WebCore16scriptNameToCodeERKN3WTF6StringE
 __ZN7WebCore16startOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
 __ZN7WebCore17CredentialStorage24getFromPersistentStorageERKNS_15ProtectionSpaceE
 __ZN7WebCore17CredentialStorage3getERKNS_15ProtectionSpaceE
index 0cedb59fb9f9cce7b91d7f0a27abcef2a1578ac8..d5c8c7603261e86d5a616be65e2d5ec06c600fbf 100644 (file)
@@ -36,7 +36,8 @@
 
 namespace WebCore {
 
-UScriptCode localeToScriptCodeForFontSelection(const String& locale);
+UScriptCode localeToScriptCodeForFontSelection(const String&);
+UScriptCode scriptNameToCode(const String&);
 
 }
 
index 7c34e74d54fd15346d489cd4dea52b57ea893d77..4ed03ce4e07e5d8c971f9d1fed95f008bf4a5619 100644 (file)
@@ -37,7 +37,7 @@
 
 namespace WebCore {
 
-static UScriptCode getScriptCode(const String& scriptName)
+UScriptCode scriptNameToCode(const String& scriptName)
 {
     struct ScriptNameCode {
         const char* name;
@@ -158,7 +158,7 @@ static UScriptCode getScriptCode(const String& scriptName)
             scriptNameCodeMap.set(scriptNameCodeList[i].name, scriptNameCodeList[i].code);
     }
 
-    HashMap<String, UScriptCode>::iterator it = scriptNameCodeMap.find(scriptName);
+    HashMap<String, UScriptCode>::iterator it = scriptNameCodeMap.find(scriptName.lower());
     if (it != scriptNameCodeMap.end())
         return it->second;
     return USCRIPT_INVALID_CODE;
@@ -387,7 +387,7 @@ UScriptCode localeToScriptCodeForFontSelection(const String& locale)
         size_t pos = canonicalLocale.reverseFind('_');
         if (pos == notFound)
             break;
-        UScriptCode code = getScriptCode(canonicalLocale.substring(pos + 1));
+        UScriptCode code = scriptNameToCode(canonicalLocale.substring(pos + 1));
         if (code != USCRIPT_INVALID_CODE && code != USCRIPT_UNKNOWN)
             return code;
         canonicalLocale = canonicalLocale.substring(0, pos);
index 1710c79693fcecad06eb798ad32367601f518ea6..6c60d821ed97aaea56a67afc76efe57e9645fea2 100644 (file)
@@ -77,4 +77,12 @@ UScriptCode localeToScriptCodeForFontSelection(const String& locale)
     return scriptCodeForFontSelection(scriptCode);
 }
 
+UScriptCode scriptNameToCode(const String& name)
+{
+    int32_t code = u_getPropertyValueEnum(UCHAR_SCRIPT, name.utf8().data());
+    if (code >= 0 && code < USCRIPT_CODE_LIMIT)
+        return static_cast<UScriptCode>(code);
+    return USCRIPT_INVALID_CODE;
+}
+
 } // namespace WebCore
index 87543824ab4e6fdb74aae1b114eaf1ffbe225d96..50231caf4636103b1c043305bfe986139c8383a8 100644 (file)
@@ -33,6 +33,7 @@
 #include "FrameView.h"
 #include "InspectorController.h"
 #include "Language.h"
+#include "LocaleToScriptMapping.h"
 #include "Page.h"
 #include "RuntimeEnabledFeatures.h"
 #include "Settings.h"
@@ -244,4 +245,54 @@ void InternalSettings::setTouchEventEmulationEnabled(bool enabled, ExceptionCode
 #endif
 }
 
+typedef void (Settings::*SetFontFamilyFunction)(const AtomicString&, UScriptCode);
+static void setFontFamily(Settings* settings, const String& family, const String& script, SetFontFamilyFunction setter)
+{
+    UScriptCode code = scriptNameToCode(script);
+    if (code != USCRIPT_INVALID_CODE)
+        (settings->*setter)(family, code);
+}
+
+void InternalSettings::setStandardFontFamily(const String& family, const String& script, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    setFontFamily(settings(), family, script, &Settings::setStandardFontFamily);
+}
+
+void InternalSettings::setSerifFontFamily(const String& family, const String& script, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    setFontFamily(settings(), family, script, &Settings::setSerifFontFamily);
+}
+
+void InternalSettings::setSansSerifFontFamily(const String& family, const String& script, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    setFontFamily(settings(), family, script, &Settings::setSansSerifFontFamily);
+}
+
+void InternalSettings::setFixedFontFamily(const String& family, const String& script, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    setFontFamily(settings(), family, script, &Settings::setFixedFontFamily);
+}
+
+void InternalSettings::setCursiveFontFamily(const String& family, const String& script, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    setFontFamily(settings(), family, script, &Settings::setCursiveFontFamily);
+}
+
+void InternalSettings::setFantasyFontFamily(const String& family, const String& script, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    setFontFamily(settings(), family, script, &Settings::setFantasyFontFamily);
+}
+
+void InternalSettings::setPictographFontFamily(const String& family, const String& script, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    setFontFamily(settings(), family, script, &Settings::setPictographFontFamily);
+}
+
 }
index a0bc0e820d8ad692fca87334a31d5aee1aca946e..bd66802b03b6c79636ece9d3fe84acf5f6953d4d 100644 (file)
@@ -63,6 +63,13 @@ public:
     void setPerTileDrawingEnabled(bool enabled, ExceptionCode&);
     void setTouchEventEmulationEnabled(bool enabled, ExceptionCode&);
     void setShadowDOMEnabled(bool enabled, ExceptionCode&);
+    void setStandardFontFamily(const String& family, const String& script, ExceptionCode&);
+    void setSerifFontFamily(const String& family, const String& script, ExceptionCode&);
+    void setSansSerifFontFamily(const String& family, const String& script, ExceptionCode&);
+    void setFixedFontFamily(const String& family, const String& script, ExceptionCode&);
+    void setCursiveFontFamily(const String& family, const String& script, ExceptionCode&);
+    void setFantasyFontFamily(const String& family, const String& script, ExceptionCode&);
+    void setPictographFontFamily(const String& family, const String& script, ExceptionCode&);
 
     void restoreTo(Settings*);
 
index 387b5b9aead6640b56893cb89231e1eb724c6d62..d22afd774987db49cbf9d859018ae77b4d83f4f0 100644 (file)
@@ -42,6 +42,13 @@ module window {
         void setPageScaleFactor(in float scaleFactor, in long x, in long y) raises(DOMException);
         void setTouchEventEmulationEnabled(in boolean enabled) raises(DOMException);
         void setShadowDOMEnabled(in boolean enabled) raises(DOMException);
+        void setStandardFontFamily(in DOMString family, in DOMString script) raises(DOMException);
+        void setSerifFontFamily(in DOMString family, in DOMString script) raises(DOMException);
+        void setSansSerifFontFamily(in DOMString family, in DOMString script) raises(DOMException);
+        void setFixedFontFamily(in DOMString family, in DOMString script) raises(DOMException);
+        void setCursiveFontFamily(in DOMString family, in DOMString script) raises(DOMException);
+        void setFantasyFontFamily(in DOMString family, in DOMString script) raises(DOMException);
+        void setPictographFontFamily(in DOMString family, in DOMString script) raises(DOMException);
     };
 }
 
index b9a32df58b3896bb966f2050b5f2e225b45f9d35..6c96a2bb2a853153c9563085d56469ae58784421 100644 (file)
@@ -1,3 +1,17 @@
+2012-03-14  Matt Falkenhagen  <falken@chromium.org>
+
+        Allow per-script font settings to be specified in layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=78184
+
+        Reviewed by Hajime Morita.
+
+        This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of
+        the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented
+        for Chromium so far.
+
+        * win/WebKit2.def: Added symbols.
+        * win/WebKit2CFLite.def: Added symbols.
+
 2012-03-14  Michael Saboff  <msaboff@apple.com>
 
         REGRESSION(r110383): ASSERTION failures in JSCell::finishCreation causing multiple tests to "crash" on the Lion Intel Debug Bots
index 23ae7ba17113041102f0e7ebbb74e8ab63c86433..fbb2bbce7d4f4a1ef1af641008aed37472f0e98f 100644 (file)
@@ -187,14 +187,22 @@ EXPORTS
         ?s_frontendCounter@InspectorInstrumentation@WebCore@@0HA
         ?s_info@JSNode@WebCore@@2UClassInfo@JSC@@B
         ?scriptExecutionContext@JSDOMGlobalObject@WebCore@@QBEPAVScriptExecutionContext@2@XZ
+        ?scriptNameToCode@WebCore@@YA?AW4UScriptCode@@ABVString@WTF@@@Z
         ?scrollElementToRect@FrameView@WebCore@@QAEXPAVElement@2@ABVIntRect@2@@Z
+        ?setCursiveFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
+        ?setFantasyFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
+        ?setFixedFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z
         ?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z
         ?setPagination@Page@WebCore@@QAEXABUPagination@12@@Z
+        ?setPictographFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
+        ?setSansSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z
         ?setScrollOffsetFromInternals@ScrollableArea@WebCore@@QAEXABVIntPoint@2@@Z
+        ?setSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
+        ?setStandardFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z
         ?settings@Document@WebCore@@QBEPAVSettings@2@XZ
         ?settings@Frame@WebCore@@QBEPAVSettings@2@XZ
index a056e3fb5a4b81b015875250f485dfee7b1b6627..1673d620d55ac35aa4a38a378d55cd3b13ae6d6a 100644 (file)
@@ -180,14 +180,22 @@ EXPORTS
         ?s_frontendCounter@InspectorInstrumentation@WebCore@@0HA
         ?s_info@JSNode@WebCore@@2UClassInfo@JSC@@B
         ?scriptExecutionContext@JSDOMGlobalObject@WebCore@@QBEPAVScriptExecutionContext@2@XZ
+        ?scriptNameToCode@WebCore@@YA?AW4UScriptCode@@ABVString@WTF@@@Z
         ?scrollElementToRect@FrameView@WebCore@@QAEXPAVElement@2@ABVIntRect@2@@Z
+        ?setCursiveFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
+        ?setFantasyFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
+        ?setFixedFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z
         ?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z
         ?setPagination@Page@WebCore@@QAEXABUPagination@12@@Z
+        ?setPictographFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
+        ?setSansSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z
         ?setScrollOffsetFromInternals@ScrollableArea@WebCore@@QAEXABVIntPoint@2@@Z
+        ?setSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
+        ?setStandardFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z
         ?settings@Document@WebCore@@QBEPAVSettings@2@XZ
         ?settings@Frame@WebCore@@QBEPAVSettings@2@XZ
index 50c0ecc869cc42adb2af52ed0dae0004fcdbbeec..0294dadb844606ef45d6218201a6711b63f6a238 100644 (file)
@@ -57,6 +57,7 @@ _ZN7WebCore14ClientRectListD1Ev;
 _ZN7WebCore15setDOMExceptionEPN3JSC9ExecStateEi;
 _ZN7WebCore16HTMLInputElement17setSuggestedValueERKN3WTF6StringE;
 _ZN7WebCore16jsStringSlowCaseEPN3JSC9ExecStateERN3WTF7HashMapIPNS3_10StringImplENS0_4WeakINS0_8JSStringEEENS3_10StringHashENS3_10HashTraitsIS6_EENSB_IS9_EEEES6_;
+_ZN7WebCore16scriptNameToCodeERKN3WTF6StringE;
 _ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE;
 _ZN7WebCore18HTMLContentElement6createEPNS_8DocumentE;
 _ZN7WebCore19InspectorController39setResourcesDataSizeLimitsFromInternalsEii;
@@ -100,6 +101,13 @@ _ZN7WebCore24InspectorInstrumentation17didBeginFrameImplEPNS_19InstrumentingAgen
 _ZN7WebCore24InspectorInstrumentation18didCancelFrameImplEPNS_19InstrumentingAgentsE;
 _ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE;
 _ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb;
+_ZN7WebCore8Settings18setFixedFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings18setSerifFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings20setCursiveFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings20setFantasyFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings21setStandardFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings22setSansSerifFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings23setPictographFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
 _ZN7WebCore8Settings24setMockScrollbarsEnabledEb;
 _ZN7WebCore8Settings37setFixedElementsLayoutRelativeToFrameEb;
 _ZN7WebCore9FrameView17paintControlTintsEv;