Changeset 110808 in webkit
- Timestamp:
- Mar 14, 2012 7:12:28 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 deleted
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r110713 r110808 1 2012-03-14 Matt Falkenhagen <falken@chromium.org> 2 3 Allow per-script font settings to be specified in layout tests 4 https://bugs.webkit.org/show_bug.cgi?id=78184 5 6 Reviewed by Hajime Morita. 7 8 This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of 9 the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented 10 for Chromium so far. 11 12 * Source/autotools/symbols.filter: Added symbols. 13 1 14 2012-03-14 Thiago Marcos P. Santos <thiago.santos@intel.com> 2 15 -
trunk/LayoutTests/ChangeLog
r110799 r110808 1 2012-03-14 Matt Falkenhagen <falken@chromium.org> 2 3 Allow per-script font settings to be specified in layout tests 4 https://bugs.webkit.org/show_bug.cgi?id=78184 5 6 Reviewed by Hajime Morita. 7 8 This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of 9 the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented 10 for Chromium so far. 11 12 * fast/text/international/locale-sensitive-fonts-expected.html: Added. Changed test to a reftest. 13 * fast/text/international/locale-sensitive-fonts.html: Changed to use InternalSettings. 14 * platform/chromium-win/fast/text/international/locale-sensitive-fonts-expected.png: Removed. 15 * platform/chromium/fast/text/international/locale-sensitive-fonts-expected.png: Removed. 16 * platform/chromium/fast/text/international/locale-sensitive-fonts-expected.txt: Removed. 17 * platform/efl/Skipped: Removed locale-sensitive-fonts.html since it no longer relies on overridePreference. 18 * platform/gtk-wk2/Skipped: Ditto. 19 * platform/gtk/Skipped: Ditto. 20 * platform/mac/Skipped: Ditto. 21 * platform/qt/Skipped: Ditto. 22 * platform/win/Skipped: Ditto. 23 * platform/wincairo/Skipped: Ditto. 24 * platform/wk2/Skipped: Ditto. 25 1 26 2012-03-14 Jessie Berlin <jberlin@apple.com> 2 27 -
trunk/LayoutTests/fast/text/international/locale-sensitive-fonts.html
r99517 r110808 3 3 <head> 4 4 <script> 5 if (window. layoutTestController) {6 layoutTestController.overridePreference("WebKitStandardFontMap", [ "Hans", "Ahem" ]);7 layoutTestController.overridePreference("WebKitFantasyFontMap", [ "Hans", "Ahem" ]);5 if (window.internals) { 6 window.internals.settings.setStandardFontFamily("Ahem", "Hans"); 7 window.internals.settings.setFantasyFontFamily("Ahem", "Hans"); 8 8 } 9 9 </script> -
trunk/LayoutTests/platform/efl/Skipped
r110713 r110808 660 660 fast/text/international/content-language-font-selection.html 661 661 fast/text/international/content-language-with-subtags.html 662 fast/text/international/locale-sensitive-fonts.html663 662 fast/text/zero-font-size.html 664 663 fast/viewport/viewport-128.html -
trunk/LayoutTests/platform/gtk-wk2/Skipped
r107879 r110808 211 211 fast/text/international/content-language-font-selection.html 212 212 fast/text/international/content-language-with-subtags.html 213 fast/text/international/locale-sensitive-fonts.html214 213 fast/repaint/no-caret-repaint-in-non-content-editable-element.html 215 214 editing/selection/caret-mode-paragraph-keys-navigation.html -
trunk/LayoutTests/platform/gtk/Skipped
r110675 r110808 378 378 fast/text/international/content-language-font-selection.html 379 379 fast/text/international/content-language-with-subtags.html 380 fast/text/international/locale-sensitive-fonts.html381 380 382 381 # Needs layoutTestController.enableAutoResizeMode() -
trunk/LayoutTests/platform/mac/Skipped
r110644 r110808 523 523 fast/text/international/content-language-font-selection.html 524 524 fast/text/international/content-language-with-subtags.html 525 fast/text/international/locale-sensitive-fonts.html526 525 527 526 # Web Intents is not yet enabled. -
trunk/LayoutTests/platform/qt/Skipped
r110686 r110808 1054 1054 fast/text/international/content-language-font-selection.html 1055 1055 fast/text/international/content-language-with-subtags.html 1056 fast/text/international/locale-sensitive-fonts.html1057 1056 loader/go-back-to-different-window-size.html 1058 1057 -
trunk/LayoutTests/platform/win/Skipped
r110420 r110808 1534 1534 fast/text/international/content-language-font-selection.html 1535 1535 fast/text/international/content-language-with-subtags.html 1536 fast/text/international/locale-sensitive-fonts.html1537 1536 1538 1537 # Web Intents is not yet enabled. -
trunk/LayoutTests/platform/wincairo/Skipped
r110420 r110808 2047 2047 fast/text/international/content-language-font-selection.html 2048 2048 fast/text/international/content-language-with-subtags.html 2049 fast/text/international/locale-sensitive-fonts.html2050 2049 2051 2050 # Web Intents is not yet enabled. -
trunk/LayoutTests/platform/wk2/Skipped
r110766 r110808 295 295 fast/text/international/content-language-font-selection.html 296 296 fast/text/international/content-language-with-subtags.html 297 fast/text/international/locale-sensitive-fonts.html298 297 css3/filters/effect-combined.html 299 298 css3/filters/filter-repaint.html -
trunk/Source/WebCore/ChangeLog
r110807 r110808 1 2012-03-14 Matt Falkenhagen <falken@chromium.org> 2 3 Allow per-script font settings to be specified in layout tests 4 https://bugs.webkit.org/show_bug.cgi?id=78184 5 6 Reviewed by Hajime Morita. 7 8 This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of 9 the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented 10 for Chromium so far. 11 12 Test: changed fast/text/international/locale-sensitive-fonts.html to use InternalSettings 13 instead of overridePreference. 14 15 * WebCore.exp.in: Added symbols. 16 * platform/text/LocaleToScriptMapping.h: Added scriptNameToCode used by InternalSettings. 17 (WebCore): 18 * platform/text/LocaleToScriptMappingDefault.cpp: 19 (WebCore::scriptNameToCode): 20 (WebCore::localeToScriptCodeForFontSelection): 21 * platform/text/LocaleToScriptMappingICU.cpp: 22 (WebCore::scriptNameToCode): 23 (WebCore): 24 * testing/InternalSettings.cpp: Added per-script font settings. 25 (WebCore): 26 (WebCore::setFontFamily): 27 (WebCore::InternalSettings::setStandardFontFamily): 28 (WebCore::InternalSettings::setSerifFontFamily): 29 (WebCore::InternalSettings::setSansSerifFontFamily): 30 (WebCore::InternalSettings::setFixedFontFamily): 31 (WebCore::InternalSettings::setCursiveFontFamily): 32 (WebCore::InternalSettings::setFantasyFontFamily): 33 (WebCore::InternalSettings::setPictographFontFamily): 34 * testing/InternalSettings.h: 35 (InternalSettings): 36 * testing/InternalSettings.idl: 37 1 38 2012-03-14 Kwonjin Jeong <gram@company100.net> 2 39 -
trunk/Source/WebCore/WebCore.exp.in
r110784 r110808 528 528 __ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE 529 529 __ZN7WebCore16isUserVisibleURLEP8NSString 530 __ZN7WebCore16scriptNameToCodeERKN3WTF6StringE 530 531 __ZN7WebCore16startOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE 531 532 __ZN7WebCore17CredentialStorage24getFromPersistentStorageERKNS_15ProtectionSpaceE -
trunk/Source/WebCore/platform/text/LocaleToScriptMapping.h
r95901 r110808 37 37 namespace WebCore { 38 38 39 UScriptCode localeToScriptCodeForFontSelection(const String& locale); 39 UScriptCode localeToScriptCodeForFontSelection(const String&); 40 UScriptCode scriptNameToCode(const String&); 40 41 41 42 } -
trunk/Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp
r103397 r110808 38 38 namespace WebCore { 39 39 40 static UScriptCode getScriptCode(const String& scriptName)40 UScriptCode scriptNameToCode(const String& scriptName) 41 41 { 42 42 struct ScriptNameCode { … … 159 159 } 160 160 161 HashMap<String, UScriptCode>::iterator it = scriptNameCodeMap.find(scriptName );161 HashMap<String, UScriptCode>::iterator it = scriptNameCodeMap.find(scriptName.lower()); 162 162 if (it != scriptNameCodeMap.end()) 163 163 return it->second; … … 388 388 if (pos == notFound) 389 389 break; 390 UScriptCode code = getScriptCode(canonicalLocale.substring(pos + 1));390 UScriptCode code = scriptNameToCode(canonicalLocale.substring(pos + 1)); 391 391 if (code != USCRIPT_INVALID_CODE && code != USCRIPT_UNKNOWN) 392 392 return code; -
trunk/Source/WebCore/platform/text/LocaleToScriptMappingICU.cpp
r109175 r110808 78 78 } 79 79 80 UScriptCode scriptNameToCode(const String& name) 81 { 82 int32_t code = u_getPropertyValueEnum(UCHAR_SCRIPT, name.utf8().data()); 83 if (code >= 0 && code < USCRIPT_CODE_LIMIT) 84 return static_cast<UScriptCode>(code); 85 return USCRIPT_INVALID_CODE; 86 } 87 80 88 } // namespace WebCore -
trunk/Source/WebCore/testing/InternalSettings.cpp
r110014 r110808 34 34 #include "InspectorController.h" 35 35 #include "Language.h" 36 #include "LocaleToScriptMapping.h" 36 37 #include "Page.h" 37 38 #include "RuntimeEnabledFeatures.h" … … 245 246 } 246 247 247 } 248 typedef void (Settings::*SetFontFamilyFunction)(const AtomicString&, UScriptCode); 249 static void setFontFamily(Settings* settings, const String& family, const String& script, SetFontFamilyFunction setter) 250 { 251 UScriptCode code = scriptNameToCode(script); 252 if (code != USCRIPT_INVALID_CODE) 253 (settings->*setter)(family, code); 254 } 255 256 void InternalSettings::setStandardFontFamily(const String& family, const String& script, ExceptionCode& ec) 257 { 258 InternalSettingsGuardForSettings(); 259 setFontFamily(settings(), family, script, &Settings::setStandardFontFamily); 260 } 261 262 void InternalSettings::setSerifFontFamily(const String& family, const String& script, ExceptionCode& ec) 263 { 264 InternalSettingsGuardForSettings(); 265 setFontFamily(settings(), family, script, &Settings::setSerifFontFamily); 266 } 267 268 void InternalSettings::setSansSerifFontFamily(const String& family, const String& script, ExceptionCode& ec) 269 { 270 InternalSettingsGuardForSettings(); 271 setFontFamily(settings(), family, script, &Settings::setSansSerifFontFamily); 272 } 273 274 void InternalSettings::setFixedFontFamily(const String& family, const String& script, ExceptionCode& ec) 275 { 276 InternalSettingsGuardForSettings(); 277 setFontFamily(settings(), family, script, &Settings::setFixedFontFamily); 278 } 279 280 void InternalSettings::setCursiveFontFamily(const String& family, const String& script, ExceptionCode& ec) 281 { 282 InternalSettingsGuardForSettings(); 283 setFontFamily(settings(), family, script, &Settings::setCursiveFontFamily); 284 } 285 286 void InternalSettings::setFantasyFontFamily(const String& family, const String& script, ExceptionCode& ec) 287 { 288 InternalSettingsGuardForSettings(); 289 setFontFamily(settings(), family, script, &Settings::setFantasyFontFamily); 290 } 291 292 void InternalSettings::setPictographFontFamily(const String& family, const String& script, ExceptionCode& ec) 293 { 294 InternalSettingsGuardForSettings(); 295 setFontFamily(settings(), family, script, &Settings::setPictographFontFamily); 296 } 297 298 } -
trunk/Source/WebCore/testing/InternalSettings.h
r110014 r110808 64 64 void setTouchEventEmulationEnabled(bool enabled, ExceptionCode&); 65 65 void setShadowDOMEnabled(bool enabled, ExceptionCode&); 66 void setStandardFontFamily(const String& family, const String& script, ExceptionCode&); 67 void setSerifFontFamily(const String& family, const String& script, ExceptionCode&); 68 void setSansSerifFontFamily(const String& family, const String& script, ExceptionCode&); 69 void setFixedFontFamily(const String& family, const String& script, ExceptionCode&); 70 void setCursiveFontFamily(const String& family, const String& script, ExceptionCode&); 71 void setFantasyFontFamily(const String& family, const String& script, ExceptionCode&); 72 void setPictographFontFamily(const String& family, const String& script, ExceptionCode&); 66 73 67 74 void restoreTo(Settings*); -
trunk/Source/WebCore/testing/InternalSettings.idl
r110014 r110808 43 43 void setTouchEventEmulationEnabled(in boolean enabled) raises(DOMException); 44 44 void setShadowDOMEnabled(in boolean enabled) raises(DOMException); 45 void setStandardFontFamily(in DOMString family, in DOMString script) raises(DOMException); 46 void setSerifFontFamily(in DOMString family, in DOMString script) raises(DOMException); 47 void setSansSerifFontFamily(in DOMString family, in DOMString script) raises(DOMException); 48 void setFixedFontFamily(in DOMString family, in DOMString script) raises(DOMException); 49 void setCursiveFontFamily(in DOMString family, in DOMString script) raises(DOMException); 50 void setFantasyFontFamily(in DOMString family, in DOMString script) raises(DOMException); 51 void setPictographFontFamily(in DOMString family, in DOMString script) raises(DOMException); 45 52 }; 46 53 } -
trunk/Source/WebKit2/ChangeLog
r110804 r110808 1 2012-03-14 Matt Falkenhagen <falken@chromium.org> 2 3 Allow per-script font settings to be specified in layout tests 4 https://bugs.webkit.org/show_bug.cgi?id=78184 5 6 Reviewed by Hajime Morita. 7 8 This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of 9 the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented 10 for Chromium so far. 11 12 * win/WebKit2.def: Added symbols. 13 * win/WebKit2CFLite.def: Added symbols. 14 1 15 2012-03-14 Michael Saboff <msaboff@apple.com> 2 16 -
trunk/Source/WebKit2/win/WebKit2.def
r110706 r110808 188 188 ?s_info@JSNode@WebCore@@2UClassInfo@JSC@@B 189 189 ?scriptExecutionContext@JSDOMGlobalObject@WebCore@@QBEPAVScriptExecutionContext@2@XZ 190 ?scriptNameToCode@WebCore@@YA?AW4UScriptCode@@ABVString@WTF@@@Z 190 191 ?scrollElementToRect@FrameView@WebCore@@QAEXPAVElement@2@ABVIntRect@2@@Z 192 ?setCursiveFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 191 193 ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z 194 ?setFantasyFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 195 ?setFixedFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 192 196 ?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z 193 197 ?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z 194 198 ?setPagination@Page@WebCore@@QAEXABUPagination@12@@Z 199 ?setPictographFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 195 200 ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z 201 ?setSansSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 196 202 ?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z 197 203 ?setScrollOffsetFromInternals@ScrollableArea@WebCore@@QAEXABVIntPoint@2@@Z 204 ?setSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 205 ?setStandardFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 198 206 ?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z 199 207 ?settings@Document@WebCore@@QBEPAVSettings@2@XZ -
trunk/Source/WebKit2/win/WebKit2CFLite.def
r110706 r110808 181 181 ?s_info@JSNode@WebCore@@2UClassInfo@JSC@@B 182 182 ?scriptExecutionContext@JSDOMGlobalObject@WebCore@@QBEPAVScriptExecutionContext@2@XZ 183 ?scriptNameToCode@WebCore@@YA?AW4UScriptCode@@ABVString@WTF@@@Z 183 184 ?scrollElementToRect@FrameView@WebCore@@QAEXPAVElement@2@ABVIntRect@2@@Z 185 ?setCursiveFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 184 186 ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z 187 ?setFantasyFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 188 ?setFixedFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 185 189 ?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z 186 190 ?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z 187 191 ?setPagination@Page@WebCore@@QAEXABUPagination@12@@Z 192 ?setPictographFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 188 193 ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z 194 ?setSansSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 189 195 ?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z 190 196 ?setScrollOffsetFromInternals@ScrollableArea@WebCore@@QAEXABVIntPoint@2@@Z 197 ?setSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 198 ?setStandardFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z 191 199 ?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z 192 200 ?settings@Document@WebCore@@QBEPAVSettings@2@XZ -
trunk/Source/autotools/symbols.filter
r110706 r110808 58 58 _ZN7WebCore16HTMLInputElement17setSuggestedValueERKN3WTF6StringE; 59 59 _ZN7WebCore16jsStringSlowCaseEPN3JSC9ExecStateERN3WTF7HashMapIPNS3_10StringImplENS0_4WeakINS0_8JSStringEEENS3_10StringHashENS3_10HashTraitsIS6_EENSB_IS9_EEEES6_; 60 _ZN7WebCore16scriptNameToCodeERKN3WTF6StringE; 60 61 _ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE; 61 62 _ZN7WebCore18HTMLContentElement6createEPNS_8DocumentE; … … 101 102 _ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE; 102 103 _ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb; 104 _ZN7WebCore8Settings18setFixedFontFamilyERKN3WTF12AtomicStringE11UScriptCode; 105 _ZN7WebCore8Settings18setSerifFontFamilyERKN3WTF12AtomicStringE11UScriptCode; 106 _ZN7WebCore8Settings20setCursiveFontFamilyERKN3WTF12AtomicStringE11UScriptCode; 107 _ZN7WebCore8Settings20setFantasyFontFamilyERKN3WTF12AtomicStringE11UScriptCode; 108 _ZN7WebCore8Settings21setStandardFontFamilyERKN3WTF12AtomicStringE11UScriptCode; 109 _ZN7WebCore8Settings22setSansSerifFontFamilyERKN3WTF12AtomicStringE11UScriptCode; 110 _ZN7WebCore8Settings23setPictographFontFamilyERKN3WTF12AtomicStringE11UScriptCode; 103 111 _ZN7WebCore8Settings24setMockScrollbarsEnabledEb; 104 112 _ZN7WebCore8Settings37setFixedElementsLayoutRelativeToFrameEb;
Note: See TracChangeset
for help on using the changeset viewer.