Support the ch unit from css3-values
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 21:18:49 +0000 (21:18 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 21:18:49 +0000 (21:18 +0000)
commit85926aadad8311f1c9dd0607437db4ffecbebe41
tree725331df584eee13a0a0aea5d9517d2ee6b7e8d9
parentc9752066b6c6b301195fbc2d5dd7b56490206ff8
Support the ch unit from css3-values
https://bugs.webkit.org/show_bug.cgi?id=85755

Patch by Lamarque V. Souza <Lamarque.Souza@basyskom.com> on 2013-02-14
Reviewed by David Hyatt.

Original patch by Sumedha Widyadharma <sumedha.widyadharma@basyskom.com>.

Source/WebCore:

Test: fast/css/css3-ch-unit.html

* css/CSSCalculationValue.cpp:
(WebCore::unitCategory):
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::validUnit):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::detectNumberToken):
* css/CSSParserValues.cpp:
(WebCore::CSSParserValue::createCSSValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeLengthDouble):
(WebCore::CSSPrimitiveValue::customCssText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isFontRelativeLength):
(WebCore::CSSPrimitiveValue::isLength):
* platform/graphics/FontMetrics.h:
(WebCore::FontMetrics::FontMetrics):
(WebCore::FontMetrics::zeroWidth):
(WebCore::FontMetrics::setZeroWidth):
(FontMetrics):
(WebCore::FontMetrics::hasZeroWidth):
(WebCore::FontMetrics::setHasZeroWidth):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::platformGlyphInit):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::zeroGlyph):
(WebCore::SimpleFontData::setZeroGlyph):
(SimpleFontData):
* platform/graphics/qt/SimpleFontDataQt.cpp:
(WebCore::SimpleFontData::platformInit):

LayoutTests:

* fast/css/css3-ch-unit-expected.txt: Added.
* fast/css/css3-ch-unit.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/css3-ch-unit-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/css3-ch-unit.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSCalculationValue.cpp
Source/WebCore/css/CSSGrammar.y.in
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParserValues.cpp
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSPrimitiveValue.h
Source/WebCore/platform/graphics/FontMetrics.h
Source/WebCore/platform/graphics/SimpleFontData.cpp
Source/WebCore/platform/graphics/SimpleFontData.h
Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp