[OS X] Make checking if a font is the system font more robust
https://bugs.webkit.org/show_bug.cgi?id=132030
Reviewed by Dean Jackson.
Instead of inspecting a font's name to determine if it is a system font,
on OS X we can ask the system directly.
This patch also moves a platform-specific check into platform-specific
code, so that other platforms don't check for OS X-specific behavior.
Covered by existing tests.
* platform/graphics/Font.cpp:
(WebCore::Font::hasValidAverageCharWidth):
* platform/graphics/Font.h:
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::primaryFontDataIsSystemFont):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167713
268f45cc-cd09-0410-ab3c-
d52691b4dbfc