Skip to content
  • mmaxfield@apple.com's avatar
    a fractional value of the css letter-spacing property is not rendered as expected · fe4e2eb6
    mmaxfield@apple.com authored
    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: http://svn.webkit.org/repository/webkit/trunk@161521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    fe4e2eb6