a fractional value of the css letter-spacing property is not rendered as expected
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Jan 2014 22:22:50 +0000 (22:22 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Jan 2014 22:22:50 +0000 (22:22 +0000)
commit91191a25141a6f607d55492c827838a7aed84e06
treed3728f6031bfbaaa8458af35dcca8e9990b89236
parent358e17b2c8cc7da02458b8edfb4ed0659310cc33
a fractional value of the css letter-spacing property is not rendered as expected
https://bugs.webkit.org/show_bug.cgi?id=20606

Reviewed by Simon Fraser.

Source/WebCore:

This turns on fractional letter-spacing and word-spacing CSS values.
It is taken mostly from Blink r153727 and iOS. Updating the relevant
types is all that is necessary

Existing tests have been updated.

* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
(WebCore::Font::width):
* platform/graphics/Font.h:
(WebCore::Font::wordSpacing):
(WebCore::Font::letterSpacing):
(WebCore::Font::setWordSpacing):
(WebCore::Font::setLetterSpacing):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::wordSpacing):
(WebCore::RenderStyle::letterSpacing):
(WebCore::RenderStyle::setWordSpacing):
(WebCore::RenderStyle::setLetterSpacing):
* rendering/style/RenderStyle.h:

LayoutTests:

Manually verified that these tests are correct after enabling fractional letter-spacing and word spacing

* platform/mac/css1/text_properties/letter_spacing-expected.png:
* platform/mac/css1/text_properties/letter_spacing-expected.txt:
* platform/mac/css1/text_properties/word_spacing-expected.png:
* platform/mac/css1/text_properties/word_spacing-expected.txt:
* platform/mac/fast/text/basic/013-expected.png:
* platform/mac/fast/text/basic/013-expected.txt:
* platform/mac/fast/text/text-letter-spacing-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/text-spacing-01-b-expected.png:
* platform/mac/svg/W3C-SVG-1.1/text-spacing-01-b-expected.txt:
* platform/mac/svg/batik/text/textLayout-expected.txt:
* platform/mac/svg/custom/text-letter-spacing-expected.png:
* platform/mac/svg/custom/text-letter-spacing-expected.txt:
* platform/mac/svg/text/text-spacing-01-b-expected.png:
* platform/mac/svg/text/text-spacing-01-b-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/css1/text_properties/letter_spacing-expected.png
LayoutTests/platform/mac/css1/text_properties/letter_spacing-expected.txt
LayoutTests/platform/mac/css1/text_properties/word_spacing-expected.png
LayoutTests/platform/mac/css1/text_properties/word_spacing-expected.txt
LayoutTests/platform/mac/fast/text/basic/013-expected.png
LayoutTests/platform/mac/fast/text/basic/013-expected.txt
LayoutTests/platform/mac/fast/text/text-letter-spacing-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-spacing-01-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-spacing-01-b-expected.txt
LayoutTests/platform/mac/svg/batik/text/textLayout-expected.txt
LayoutTests/platform/mac/svg/custom/text-letter-spacing-expected.png
LayoutTests/platform/mac/svg/custom/text-letter-spacing-expected.txt
LayoutTests/platform/mac/svg/text/text-spacing-01-b-expected.png
LayoutTests/platform/mac/svg/text/text-spacing-01-b-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/DeprecatedStyleBuilder.cpp
Source/WebCore/page/animation/CSSPropertyAnimation.cpp
Source/WebCore/platform/graphics/Font.cpp
Source/WebCore/platform/graphics/Font.h
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h