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
+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
+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
--- /dev/null
+<!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>
<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>
+++ /dev/null
-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"
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
# 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
# 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
# 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/
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
# 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/
# 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/
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
+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.
__ZN7WebCore16enclosingIntRectERKNS_9FloatRectE
__ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
__ZN7WebCore16isUserVisibleURLEP8NSString
+__ZN7WebCore16scriptNameToCodeERKN3WTF6StringE
__ZN7WebCore16startOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
__ZN7WebCore17CredentialStorage24getFromPersistentStorageERKNS_15ProtectionSpaceE
__ZN7WebCore17CredentialStorage3getERKNS_15ProtectionSpaceE
namespace WebCore {
-UScriptCode localeToScriptCodeForFontSelection(const String& locale);
+UScriptCode localeToScriptCodeForFontSelection(const String&);
+UScriptCode scriptNameToCode(const String&);
}
namespace WebCore {
-static UScriptCode getScriptCode(const String& scriptName)
+UScriptCode scriptNameToCode(const String& scriptName)
{
struct ScriptNameCode {
const char* name;
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;
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);
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
#include "FrameView.h"
#include "InspectorController.h"
#include "Language.h"
+#include "LocaleToScriptMapping.h"
#include "Page.h"
#include "RuntimeEnabledFeatures.h"
#include "Settings.h"
#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);
+}
+
}
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*);
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);
};
}
+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
?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
?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
_ZN7WebCore15setDOMExceptionEPN3JSC9ExecStateEi;
_ZN7WebCore16HTMLInputElement17setSuggestedValueERKN3WTF6StringE;
_ZN7WebCore16jsStringSlowCaseEPN3JSC9ExecStateERN3WTF7HashMapIPNS3_10StringImplENS0_4WeakINS0_8JSStringEEENS3_10StringHashENS3_10HashTraitsIS6_EENSB_IS9_EEEES6_;
+_ZN7WebCore16scriptNameToCodeERKN3WTF6StringE;
_ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE;
_ZN7WebCore18HTMLContentElement6createEPNS_8DocumentE;
_ZN7WebCore19InspectorController39setResourcesDataSizeLimitsFromInternalsEii;
_ZN7WebCore24InspectorInstrumentation18didCancelFrameImplEPNS_19InstrumentingAgentsE;
_ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE;
_ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb;
+_ZN7WebCore8Settings18setFixedFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings18setSerifFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings20setCursiveFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings20setFantasyFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings21setStandardFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings22setSansSerifFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
+_ZN7WebCore8Settings23setPictographFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
_ZN7WebCore8Settings24setMockScrollbarsEnabledEb;
_ZN7WebCore8Settings37setFixedElementsLayoutRelativeToFrameEb;
_ZN7WebCore9FrameView17paintControlTintsEv;