WebCore: Fix for <rdar://problem/7083741> Implement a CSS extension to 
adjust sub-pixel anti-aliasing for text
-and corresponding-
https://bugs.webkit.org/show_bug.cgi?id=29291

Reviewed by Darin Adler.

Added tests:
* fast/css/font-smoothing.html: Added.
* fast/css/parsing-webkit-font-smoothing.html: Added.

This patch adds a new CSS property called -webkit-font-smoothing 
that accepts the following as valid input: auto | none | 
antialiased | subpixel-antialiased

Return appropriate computed style for -webkit-font-smoothing
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

Add a case for CSSPropertyWebkitFontSmoothing, and accept valid 
input.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):

Add mappings for FontSmoothing to the right CSS values.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator FontSmoothing):

Add -webkit-font-smoothing
* css/CSSPropertyNames.in:

Set fontSmoothing on the FontDescription.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):

Add antialiased and subpixel-antialiased as possible new CSS 
values.
* css/CSSValueKeywords.in:
Store the font smoothing CSS value in the FontDescription.
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::fontSmoothing):
(WebCore::FontDescription::setFontSmoothing):
(WebCore::FontDescription::operator==):

Call setShouldAntialias() and setShouldUseSmoothing() appropriately 
based on the CSS fontSmoothing() value.
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs):
* platform/graphics/win/FontCGWin.cpp:
(WebCore::Font::drawGlyphs):

New function fontSmoothing()
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::fontSmoothing):

New enum FontSmoothing.
* rendering/style/RenderStyleConstants.h:
(WebCore::):

LayoutTests: Tests for <rdar://problem/7083741> Implement a CSS extension to 
adjust sub-pixel anti-aliasing for text

Reviewed by Darin Adler.

New tests:
* fast/css/font-smoothing.html: Added.
* fast/css/parsing-webkit-font-smoothing-expected.txt: Added.
* fast/css/parsing-webkit-font-smoothing.html: Added.
* fast/css/resources/parsing-webkit-font-smoothing.js: Added.
(test):
* platform/mac/fast/css/font-smoothing-expected.checksum: Added.
* platform/mac/fast/css/font-smoothing-expected.png: Added.
* platform/mac/fast/css/font-smoothing-expected.txt: Added.

These tests have updated results now that -webkit-font-smoothing is 
reported with computed style.
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed