| Differences between
and this patch
- Source/WebCore/ChangeLog +33 lines
Lines 1-3 Source/WebCore/ChangeLog_sec1
1
2012-04-10  Alexey Proskuryakov  <ap@apple.com>
2
3
        [Mac] lang, xml:lang, content-language ignored when choosing fonts
4
        https://bugs.webkit.org/show_bug.cgi?id=10874
5
        <rdar://problem/3220202>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        Adding a default font table for Mac port. Clients can still override these if they want to,
10
        but knowing which fonts to use is more about the platform than about the client.
11
12
        Tests: platform/mac/fonts/han-disunification.html
13
14
        * Resources/DefaultFonts.plist: Added. At this point, this just dis-unifies Han and provides
15
        defaults for common script.
16
17
        * WebCore.xcodeproj/project.pbxproj: Added SettingsMac.mm.
18
19
        * page/Settings.cpp:
20
        (WebCore::setGenericFontFamilyMap): Don't notify the page if we don't have one yet.
21
        (WebCore::Settings::Settings): Assign to m_page after calling initializeDefaultFontFamilies,
22
        so that we won't try to call page->setNeedsRecalcStyleInAllFrames() in a half-initialized
23
        Page that's creating settings.
24
        (WebCore::Settings::initializeDefaultFontFamilies): Dummy imlplementation for ports that
25
        rely on client to set defaults.
26
27
        * page/Settings.h: Added initializeDefaultFontFamilies().
28
29
        * page/mac/SettingsMac.mm: Added.
30
        (WebCore::defaultFontFamilyDictionary):
31
        (WebCore::Settings::initializeDefaultFontFamilies):
32
        Load defaults from a plist file inside WebCore framework.
33
1
2012-04-10  Anders Carlsson  <andersca@apple.com>
34
2012-04-10  Anders Carlsson  <andersca@apple.com>
2
35
3
        Unreviewed, rolling out r113611.
36
        Unreviewed, rolling out r113611.
- Source/WebCore/Resources/DefaultFonts.plist +61 lines
Line 0 Source/WebCore/Resources/DefaultFonts.plist_sec1
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
<plist version="1.0">
4
<dict>
5
	<key>hant</key>
6
	<dict>
7
		<key>monospace</key>
8
		<string>Apple LiGothic</string>
9
		<key>standard</key>
10
		<string>Apple LiGothic</string>
11
		<key>sans-serif</key>
12
		<string>Apple LiGothic</string>
13
		<key>serif</key>
14
		<string>Apple LiSung</string>
15
	</dict>
16
	<key>hans</key>
17
	<dict>
18
		<key>monospace</key>
19
		<string>STHeiti</string>
20
		<key>standard</key>
21
		<string>STHeiti</string>
22
		<key>sans-serif</key>
23
		<string>STHeiti</string>
24
		<key>serif</key>
25
		<string>STSong</string>
26
	</dict>
27
	<key>hrkt</key>
28
	<dict>
29
		<key>monospace</key>
30
		<string>Osaka-Mono</string>
31
		<key>standard</key>
32
		<string>Hiragino Kaku Gothic Pro</string>
33
		<key>sans-serif</key>
34
		<string>Hiragino Kaku Gothic Pro</string>
35
		<key>serif</key>
36
		<string>Hiragino Mincho Pro</string>
37
	</dict>
38
	<key>hang</key>
39
	<dict>
40
		<key>monospace</key>
41
		<string>AppleGothic</string>
42
		<key>standard</key>
43
		<string>AppleGothic</string>
44
		<key>sans-serif</key>
45
		<string>AppleGothic</string>
46
		<key>serif</key>
47
		<string>AppleMyungjo</string>
48
	</dict>
49
	<key>zyyy</key>
50
	<dict>
51
		<key>monospace</key>
52
		<string>Courier</string>
53
		<key>standard</key>
54
		<string>Times</string>
55
		<key>sans-serif</key>
56
		<string>Helvetica</string>
57
		<key>serif</key>
58
		<string>Times</string>
59
	</dict>
60
</dict>
61
</plist>
0
  + LF
62
  + LF
- Source/WebCore/WebCore.xcodeproj/project.pbxproj +8 lines
Lines 5900-5905 Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
5900
		E1B4CD2510B322E200BFFD7E /* CredentialStorageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1B4CD2410B322E200BFFD7E /* CredentialStorageMac.mm */; };
5900
		E1B4CD2510B322E200BFFD7E /* CredentialStorageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1B4CD2410B322E200BFFD7E /* CredentialStorageMac.mm */; };
5901
		E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1BE512B0CF6C512002EA959 /* XSLTUnicodeSort.cpp */; };
5901
		E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1BE512B0CF6C512002EA959 /* XSLTUnicodeSort.cpp */; };
5902
		E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */ = {isa = PBXBuildFile; fileRef = E1BE512C0CF6C512002EA959 /* XSLTUnicodeSort.h */; };
5902
		E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */ = {isa = PBXBuildFile; fileRef = E1BE512C0CF6C512002EA959 /* XSLTUnicodeSort.h */; };
5903
		E1C2F245153398CE0083F974 /* DefaultFonts.plist in Resources */ = {isa = PBXBuildFile; fileRef = E1C2F244153398CE0083F974 /* DefaultFonts.plist */; };
5904
		E1C2F24A1533A2120083F974 /* SettingsMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1C2F2481533A2120083F974 /* SettingsMac.mm */; };
5903
		E1C362EF0EAF2AA9007410BC /* JSWorkerLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = E1C362ED0EAF2AA9007410BC /* JSWorkerLocation.h */; };
5905
		E1C362EF0EAF2AA9007410BC /* JSWorkerLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = E1C362ED0EAF2AA9007410BC /* JSWorkerLocation.h */; };
5904
		E1C362F00EAF2AA9007410BC /* JSWorkerLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1C362EE0EAF2AA9007410BC /* JSWorkerLocation.cpp */; };
5906
		E1C362F00EAF2AA9007410BC /* JSWorkerLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1C362EE0EAF2AA9007410BC /* JSWorkerLocation.cpp */; };
5905
		E1C36C030EB076D6007410BC /* JSDOMGlobalObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E1C36C020EB076D6007410BC /* JSDOMGlobalObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
5907
		E1C36C030EB076D6007410BC /* JSDOMGlobalObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E1C36C020EB076D6007410BC /* JSDOMGlobalObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
Lines 13043-13048 Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
13043
		E1B4CD2410B322E200BFFD7E /* CredentialStorageMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CredentialStorageMac.mm; sourceTree = "<group>"; };
13045
		E1B4CD2410B322E200BFFD7E /* CredentialStorageMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CredentialStorageMac.mm; sourceTree = "<group>"; };
13044
		E1BE512B0CF6C512002EA959 /* XSLTUnicodeSort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSLTUnicodeSort.cpp; sourceTree = "<group>"; };
13046
		E1BE512B0CF6C512002EA959 /* XSLTUnicodeSort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSLTUnicodeSort.cpp; sourceTree = "<group>"; };
13045
		E1BE512C0CF6C512002EA959 /* XSLTUnicodeSort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSLTUnicodeSort.h; sourceTree = "<group>"; };
13047
		E1BE512C0CF6C512002EA959 /* XSLTUnicodeSort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSLTUnicodeSort.h; sourceTree = "<group>"; };
13048
		E1C2F244153398CE0083F974 /* DefaultFonts.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = DefaultFonts.plist; sourceTree = "<group>"; };
13049
		E1C2F2481533A2120083F974 /* SettingsMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SettingsMac.mm; sourceTree = "<group>"; };
13046
		E1C362ED0EAF2AA9007410BC /* JSWorkerLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWorkerLocation.h; sourceTree = "<group>"; };
13050
		E1C362ED0EAF2AA9007410BC /* JSWorkerLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWorkerLocation.h; sourceTree = "<group>"; };
13047
		E1C362EE0EAF2AA9007410BC /* JSWorkerLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWorkerLocation.cpp; sourceTree = "<group>"; };
13051
		E1C362EE0EAF2AA9007410BC /* JSWorkerLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWorkerLocation.cpp; sourceTree = "<group>"; };
13048
		E1C36C020EB076D6007410BC /* JSDOMGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMGlobalObject.h; sourceTree = "<group>"; };
13052
		E1C36C020EB076D6007410BC /* JSDOMGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMGlobalObject.h; sourceTree = "<group>"; };
Lines 13909-13914 Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
13909
				85136C980AED665900F90A3D /* westResizeCursor.png */,
13913
				85136C980AED665900F90A3D /* westResizeCursor.png */,
13910
				1AB1AE780C051FDE00139F4F /* zoomInCursor.png */,
13914
				1AB1AE780C051FDE00139F4F /* zoomInCursor.png */,
13911
				1AB1AE790C051FDE00139F4F /* zoomOutCursor.png */,
13915
				1AB1AE790C051FDE00139F4F /* zoomOutCursor.png */,
13916
				E1C2F244153398CE0083F974 /* DefaultFonts.plist */,
13912
			);
13917
			);
13913
			path = Resources;
13918
			path = Resources;
13914
			sourceTree = "<group>";
13919
			sourceTree = "<group>";
Lines 16777-16782 Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
16777
				93C09A7E0B064EEF005ABD4D /* EventHandlerMac.mm */,
16782
				93C09A7E0B064EEF005ABD4D /* EventHandlerMac.mm */,
16778
				65BF023C0974819000C43196 /* FrameMac.mm */,
16783
				65BF023C0974819000C43196 /* FrameMac.mm */,
16779
				1C26497B0D7E24EC00BD10F2 /* PageMac.cpp */,
16784
				1C26497B0D7E24EC00BD10F2 /* PageMac.cpp */,
16785
				E1C2F2481533A2120083F974 /* SettingsMac.mm */,
16780
				F587854C02DE375901EA4122 /* WebCoreFrameView.h */,
16786
				F587854C02DE375901EA4122 /* WebCoreFrameView.h */,
16781
			);
16787
			);
16782
			path = mac;
16788
			path = mac;
Lines 24892-24897 Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
24892
				85136CA80AED665900F90A3D /* westResizeCursor.png in Resources */,
24898
				85136CA80AED665900F90A3D /* westResizeCursor.png in Resources */,
24893
				1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */,
24899
				1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */,
24894
				1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */,
24900
				1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */,
24901
				E1C2F245153398CE0083F974 /* DefaultFonts.plist in Resources */,
24895
			);
24902
			);
24896
			runOnlyForDeploymentPostprocessing = 0;
24903
			runOnlyForDeploymentPostprocessing = 0;
24897
		};
24904
		};
Lines 27740-27745 Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec6
27740
				A07D3355152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp in Sources */,
27747
				A07D3355152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp in Sources */,
27741
				A08CF154152B77B3009C5775 /* WebGLShaderPrecisionFormat.cpp in Sources */,
27748
				A08CF154152B77B3009C5775 /* WebGLShaderPrecisionFormat.cpp in Sources */,
27742
				C5A1EA7C152BCF04004D00B6 /* SimplifyMarkupCommand.cpp in Sources */,
27749
				C5A1EA7C152BCF04004D00B6 /* SimplifyMarkupCommand.cpp in Sources */,
27750
				E1C2F24A1533A2120083F974 /* SettingsMac.mm in Sources */,
27743
				5740E83C1532DE1700760628 /* TreeScopeAdjuster.cpp in Sources */,
27751
				5740E83C1532DE1700760628 /* TreeScopeAdjuster.cpp in Sources */,
27744
			);
27752
			);
27745
			runOnlyForDeploymentPostprocessing = 0;
27753
			runOnlyForDeploymentPostprocessing = 0;
- Source/WebCore/page/Settings.cpp -2 / +13 lines
Lines 64-70 static inline void setGenericFontFamilyM Source/WebCore/page/Settings.cpp_sec1
64
        return;
64
        return;
65
    else
65
    else
66
        fontMap.set(static_cast<int>(script), family);
66
        fontMap.set(static_cast<int>(script), family);
67
    page->setNeedsRecalcStyleInAllFrames();
67
68
    if (page)
69
        page->setNeedsRecalcStyleInAllFrames();
68
}
70
}
69
71
70
static inline const AtomicString& getGenericFontFamilyForScript(const ScriptFontFamilyMap& fontMap, UScriptCode script)
72
static inline const AtomicString& getGenericFontFamilyForScript(const ScriptFontFamilyMap& fontMap, UScriptCode script)
Lines 113-119 static EditingBehaviorType editingBehavi Source/WebCore/page/Settings.cpp_sec2
113
}
115
}
114
116
115
Settings::Settings(Page* page)
117
Settings::Settings(Page* page)
116
    : m_page(page)
118
    : m_page(0)
117
    , m_editableLinkBehavior(EditableLinkDefaultBehavior)
119
    , m_editableLinkBehavior(EditableLinkDefaultBehavior)
118
    , m_textDirectionSubmenuInclusionBehavior(TextDirectionSubmenuAutomaticallyIncluded)
120
    , m_textDirectionSubmenuInclusionBehavior(TextDirectionSubmenuAutomaticallyIncluded)
119
    , m_passwordEchoDurationInSeconds(1)
121
    , m_passwordEchoDurationInSeconds(1)
Lines 260-265 Settings::Settings(Page* page) Source/WebCore/page/Settings.cpp_sec3
260
    // A Frame may not have been created yet, so we initialize the AtomicString 
262
    // A Frame may not have been created yet, so we initialize the AtomicString 
261
    // hash before trying to use it.
263
    // hash before trying to use it.
262
    AtomicString::init();
264
    AtomicString::init();
265
    initializeDefaultFontFamilies();
266
    m_page = page; // Page is not yet fully initialized wen constructing Settings, so keeping m_page null over initializeDefaultFontFamilies() call.
263
}
267
}
264
268
265
PassOwnPtr<Settings> Settings::create(Page* page)
269
PassOwnPtr<Settings> Settings::create(Page* page)
Lines 267-272 PassOwnPtr<Settings> Settings::create(Pa Source/WebCore/page/Settings.cpp_sec4
267
    return adoptPtr(new Settings(page));
271
    return adoptPtr(new Settings(page));
268
} 
272
} 
269
273
274
#if !PLATFORM(MAC)
275
void Settings::initializeDefaultFontFamilies()
276
{
277
    // Other platforms can set up fonts from a client, but on Mac, we want it in WebCore to share code between WebKit1 and WebKit2.
278
}
279
#endif
280
270
const AtomicString& Settings::standardFontFamily(UScriptCode script) const
281
const AtomicString& Settings::standardFontFamily(UScriptCode script) const
271
{
282
{
272
    return getGenericFontFamilyForScript(m_standardFontFamilyMap, script);
283
    return getGenericFontFamilyForScript(m_standardFontFamilyMap, script);
- Source/WebCore/page/Settings.h +2 lines
Lines 555-560 namespace WebCore { Source/WebCore/page/Settings.h_sec1
555
    private:
555
    private:
556
        Settings(Page*);
556
        Settings(Page*);
557
557
558
        void initializeDefaultFontFamilies();
559
558
        Page* m_page;
560
        Page* m_page;
559
561
560
        String m_defaultTextEncodingName;
562
        String m_defaultTextEncodingName;
- Source/WebCore/page/mac/SettingsMac.mm +104 lines
Line 0 Source/WebCore/page/mac/SettingsMac.mm_sec1
1
/*
2
 * Copyright (C) 2012 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "Settings.h"
28
29
#include "LocaleToScriptMapping.h"
30
#include <wtf/text/CString.h>
31
32
namespace WebCore {
33
34
static NSDictionary *defaultFontFamilyDictionary()
35
{
36
    static NSDictionary *fontFamilyDictionary;
37
    if (fontFamilyDictionary)
38
        return fontFamilyDictionary;
39
40
    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebCore"];
41
    NSData *fileData = [NSData dataWithContentsOfURL:[bundle URLForResource:@"DefaultFonts" withExtension:@"plist"]];
42
    NSError *error;
43
    id propertyList = [NSPropertyListSerialization propertyListWithData:fileData options:NSPropertyListImmutable format:0 error:&error];
44
    if (!propertyList)
45
        FATAL("Could not read font fallback file: %s", [[error description] UTF8String]);
46
    if (![propertyList isKindOfClass:[NSDictionary class]])
47
        FATAL("Font fallback file has incorrect format - root object is not a dictionary");
48
49
    fontFamilyDictionary = static_cast<NSDictionary *>(propertyList);
50
    CFRetain(fontFamilyDictionary);
51
    return fontFamilyDictionary;
52
}
53
54
void Settings::initializeDefaultFontFamilies()
55
{
56
    DEFINE_STATIC_LOCAL(AtomicString, standardFamily, ("standard"));
57
    DEFINE_STATIC_LOCAL(AtomicString, monospaceFamily, ("monospace"));
58
    DEFINE_STATIC_LOCAL(AtomicString, serifFamily, ("serif"));
59
    DEFINE_STATIC_LOCAL(AtomicString, sansSerifFamily, ("sans-serif"));
60
    DEFINE_STATIC_LOCAL(AtomicString, cursiveFamily, ("cursive"));
61
    DEFINE_STATIC_LOCAL(AtomicString, fantasyFamily, ("fantasy"));
62
    DEFINE_STATIC_LOCAL(AtomicString, pictographFamily, ("pictograph"));
63
64
    [defaultFontFamilyDictionary() enumerateKeysAndObjectsUsingBlock: ^(id key, id obj, BOOL *) {
65
        if (![key isKindOfClass:[NSString class]])
66
            FATAL("Font fallback file has incorrect format - script name is not a string");
67
        if (![obj isKindOfClass:[NSDictionary class]])
68
            FATAL("Font fallback file has incorrect format - per-script value is not a dictionary");
69
70
        UScriptCode script = scriptNameToCode(static_cast<NSString *>(key));
71
        if (script == USCRIPT_UNKNOWN)
72
            FATAL("Font fallback file has incorrect format - unknown language code %s", [key UTF8String]);
73
74
        [obj enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *) {
75
            if (![key isKindOfClass:[NSString class]])
76
                FATAL("Font fallback file has incorrect format - generic family name is not a string");
77
            if (![obj isKindOfClass:[NSString class]])
78
                FATAL("Font fallback file has incorrect format - font family name is not a string");
79
80
            AtomicString genericFamily = static_cast<NSString *>(key);
81
            String familyName = static_cast<NSString *>(obj);
82
83
            if (genericFamily == standardFamily)
84
                setStandardFontFamily(familyName, script);
85
            else if (genericFamily == monospaceFamily)
86
                setFixedFontFamily(familyName, script);
87
            else if (genericFamily == serifFamily)
88
                setSerifFontFamily(familyName, script);
89
            else if (genericFamily == sansSerifFamily)
90
                setSansSerifFontFamily(familyName, script);
91
            else if (genericFamily == cursiveFamily)
92
                setCursiveFontFamily(familyName, script);
93
            else if (genericFamily == fantasyFamily)
94
                setFantasyFontFamily(familyName, script);
95
            else if (genericFamily == pictographFamily)
96
                setPictographFontFamily(familyName, script);
97
            else
98
                FATAL("Font fallback file has incorrect format - unknown font family name %s", familyName.utf8().data());
99
        }];
100
    }];
101
}
102
103
104
} // namespace WebCore
0
  + LF
105
  + LF
- LayoutTests/ChangeLog +11 lines
Lines 1-3 LayoutTests/ChangeLog_sec1
1
2012-04-10  Alexey Proskuryakov  <ap@apple.com>
2
3
        [Mac] lang, xml:lang, content-language ignored when choosing fonts
4
        https://bugs.webkit.org/show_bug.cgi?id=10874
5
        <rdar://problem/3220202>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        * platform/mac/fonts/han-disunification-expected-mismatch.html: Added.
10
        * platform/mac/fonts/han-disunification.html: Added.
11
1
2012-04-10  Anders Carlsson  <andersca@apple.com>
12
2012-04-10  Anders Carlsson  <andersca@apple.com>
2
13
3
        Unreviewed, rolling out r113611.
14
        Unreviewed, rolling out r113611.
- LayoutTests/platform/mac/fonts/han-disunification-expected-mismatch.html +6 lines
Line 0 LayoutTests/platform/mac/fonts/han-disunification-expected-mismatch.html_sec1
1
<meta charset="utf-8">
2
<p>Japanese and Chinese renderings of this character should be different:</p>
3
<body>
4
<p style="font-size:60px">Japanese: <span lang="zh">与</span></p>
5
<p style="font-size:60px">Chinese: <span lang="ja">与</span></p>
6
</body>
0
  + text/html
7
  + text/html
- LayoutTests/platform/mac/fonts/han-disunification.html +6 lines
Line 0 LayoutTests/platform/mac/fonts/han-disunification.html_sec1
1
<meta charset="utf-8">
2
<p>Japanese and Chinese renderings of this character should be different:</p>
3
<body>
4
<p style="font-size:60px">Japanese: <span lang="ja">与</span></p>
5
<p style="font-size:60px">Chinese: <span lang="zh">与</span></p>
6
</body>
0
  + text/html
7
  + text/html

Return to Bug 10874