CSS calc parsing stage
authormikelawther@chromium.org <mikelawther@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Jan 2012 00:05:00 +0000 (00:05 +0000)
committermikelawther@chromium.org <mikelawther@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Jan 2012 00:05:00 +0000 (00:05 +0000)
commit9f4b1438a8854ef0e8ccc8d71e837f7bcdb6c615
tree4257bbf824d6f12f590ca8fc8ed429a79b40e957
parent43e4b6eaa8fb0e753ce9ac62db7bc30df2aaab0e
CSS calc parsing stage
https://bugs.webkit.org/show_bug.cgi?id=57082

This is the parsing stage of calc. The expressions are evaluated and
expression trees are generated. CSS values are not created yet - that
will happen in a subsequent commit.

Reviewed by David Hyatt.

No functional change - covered by existing tests in LayoutTests/css3/calc.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSCalculationValue.cpp: Added.
(WebCore):
(WebCore::unitCategory):
(WebCore::CSSCalcValue::customCssText):
(WebCore::CSSCalcExpressionNode::~CSSCalcExpressionNode):
(CSSCalcPrimitiveValue):
(WebCore::CSSCalcPrimitiveValue::create):
(WebCore::CSSCalcPrimitiveValue::cssText):
(WebCore::CSSCalcPrimitiveValue::CSSCalcPrimitiveValue):
():
(CSSCalcBinaryOperation):
(WebCore::CSSCalcBinaryOperation::create):
(WebCore::CSSCalcBinaryOperation::CSSCalcBinaryOperation):
(WebCore::checkDepthAndIndex):
(CSSCalcExpressionNodeParser):
(WebCore::CSSCalcExpressionNodeParser::parseCalc):
(Value):
(WebCore::CSSCalcExpressionNodeParser::operatorValue):
(WebCore::CSSCalcExpressionNodeParser::parseValue):
(WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
(WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
(WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
(WebCore::CSSCalcExpressionNodeParser::parseValueExpression):
(WebCore::CSSCalcValue::create):
* css/CSSCalculationValue.h: Added.
(WebCore):
():
(CSSCalcExpressionNode):
(WebCore::CSSCalcExpressionNode::category):
(WebCore::CSSCalcExpressionNode::isInt):
(WebCore::CSSCalcExpressionNode::isZero):
(WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode):
(CSSCalcValue):
(WebCore::CSSCalcValue::category):
(WebCore::CSSCalcValue::isInt):
(WebCore::CSSCalcValue::CSSCalcValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::validCalculationUnit):
(WebCore):
(WebCore::CSSParser::validUnit):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillPositionComponent):
(WebCore::CSSParser::parsedDouble):
(WebCore::CSSParser::isCalculation):
(WebCore::CSSParser::colorIntFromValue):
(WebCore::CSSParser::parseColorParameters):
(WebCore::CSSParser::parseHSLParameters):
(WebCore::ShadowParseContext::ShadowParseContext):
(WebCore::ShadowParseContext::commitLength):
(WebCore::ShadowParseContext::commitStyle):
(ShadowParseContext):
(WebCore::CSSParser::parseShadow):
(WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
(WebCore::BorderImageSliceParseContext::commitNumber):
(WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
(BorderImageSliceParseContext):
(WebCore::CSSParser::parseBorderImageSlice):
(WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext):
(WebCore::BorderImageQuadParseContext::commitNumber):
(WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
(BorderImageQuadParseContext):
(WebCore::CSSParser::parseBorderImageQuad):
(WebCore::CSSParser::parseCalculation):
* css/CSSParser.h:
():
(CSSParser):
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isCalculationValue):
():
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* platform/CalculationValue.cpp: Added.
(WebCore):
* platform/CalculationValue.h: Added.
(WebCore):
():

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSCalculationValue.cpp [new file with mode: 0755]
Source/WebCore/css/CSSCalculationValue.h [new file with mode: 0755]
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSValue.cpp
Source/WebCore/css/CSSValue.h
Source/WebCore/css/SVGCSSParser.cpp
Source/WebCore/platform/CalculationValue.cpp [new file with mode: 0755]
Source/WebCore/platform/CalculationValue.h [new file with mode: 0755]