WebCore:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Dec 2007 06:21:47 +0000 (06:21 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Dec 2007 06:21:47 +0000 (06:21 +0000)
commitc58e0532845d90da341de99bc0734b7d077bfe38
tree1b7214e8fa20e2034edda2ad5fb93182a1c10d32
parent853e0108fd60ece29031c740d6746778bd996d11
WebCore:

        Reviewed by Darin Adler and Dave Hyatt.

        - Substitute the user's preferred standard font for an unknown primary
          font before falling back on the platform's last resort font

        Cannot be tested in DumpRenderTree because it sets the standard font to
        Times, which is also the hard-coded last resort font on Mac.

        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::getFontData): Changed the early bail out
        condition to allow getting generic font families from settings even if
        there are not @font-face rules. Fixed a typo that mapped fantasy to
        cursive. Added a mapping from -webkit-standard to the standard family.
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::CSSStyleSelector): Changed to always create
        a font selector.
        (WebCore::CSSRuleSet::addRulesFromSheet):
        (WebCore::CSSStyleSelector::applyProperty): Changed to always use the
        font selector.
        * css/CSSStyleSelector.h:
        (WebCore::CSSStyleSelector::fontSelector):
        * platform/graphics/FontCache.cpp:
        (WebCore::FontCache::getFontData): Try the user's preferred standard
        font before the platform's last resort font.

LayoutTests:

        - remove passing tests following the change to font fallback

        * platform/win/Skipped: Removed tests that failed only because they
        specified as primary font family a font family that was not available
        on Windows and therefore were rendered using the platform last resort
        font, Times New Roman. Now they are rendered using the 'standard'
        font family, which is set to Times on both Mac and Windows when running
        the tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/win/Skipped
WebCore/ChangeLog
WebCore/css/CSSFontSelector.cpp
WebCore/css/CSSStyleSelector.cpp
WebCore/css/CSSStyleSelector.h
WebCore/platform/graphics/FontCache.cpp