[Mac] lang, xml:lang, content-language ignored when choosing fonts
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 20:13:16 +0000 (20:13 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 20:13:16 +0000 (20:13 +0000)
commit3b22469bb2c48d9b09324dd56e20a8e41ad9737c
treeecd706a0f8de778a55e95f103fb6cb379a967c22
parent9cd2d60861ff9dde3eac2261700095a73648c2bb
    [Mac] lang, xml:lang, content-language ignored when choosing fonts
        https://bugs.webkit.org/show_bug.cgi?id=10874
        <rdar://problem/3220202>

        Reviewed by Dan Bernstein.

        Adding a default font table for Mac port. Clients can still override these if they want to,
        but knowing which fonts to use is more about the platform than about the client.

        Tests: platform/mac/fonts/han-disunification.html

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * Resources/DefaultFonts.plist.in: Added.
        Added SettingsMac.mm. Added preprocessed property list with default fonts.

        * page/Settings.cpp:
        (WebCore::setGenericFontFamilyMap): Don't notify the page if we don't have one yet.
        (WebCore::Settings::Settings): Assign to m_page after calling initializeDefaultFontFamilies,
        so that we won't try to call page->setNeedsRecalcStyleInAllFrames() in a half-initialized
        Page that's creating settings.
        (WebCore::Settings::initializeDefaultFontFamilies): Dummy imlplementation for ports that
        rely on client to set defaults.

        * page/Settings.h: Added initializeDefaultFontFamilies().

        * page/mac/SettingsMac.mm: Added.
        (WebCore::defaultFontFamilyDictionary):
        (WebCore::Settings::initializeDefaultFontFamilies):
        Load defaults from a plist file inside WebCore framework.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/fonts/han-disunification-expected-mismatch.html [new file with mode: 0644]
LayoutTests/platform/mac/fonts/han-disunification.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Resources/DefaultFonts.plist.in [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/page/mac/SettingsMac.mm [new file with mode: 0644]