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