CSS3 calc: unprefix implementation
authormikelawther@chromium.org <mikelawther@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Jan 2013 07:05:16 +0000 (07:05 +0000)
committermikelawther@chromium.org <mikelawther@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Jan 2013 07:05:16 +0000 (07:05 +0000)
commit4955c5ab5fa88bf4fbc81cd0bd6f06c03cd69459
tree8bb358565d9a651d2e8c91ca4afc8539dcf007da
parent98f06fd74ba9b084049d3526c82e08a99466ed22
CSS3 calc: unprefix implementation
https://bugs.webkit.org/show_bug.cgi?id=91951

Reviewed by Ojan Vafai.

Source/WebCore:

Add support for the unprefixed 'calc()' function, while retaining support for the prefixed version.

Test: css3/calc/simple-calcs-prefixed.html

* css/CSSCalculationValue.cpp:
(WebCore::buildCssText):
(WebCore::CSSCalcValue::create):
* css/CSSParser.cpp:
(WebCore::CSSParser::isCalculation):
(WebCore::CSSParser::detectFunctionTypeToken):

LayoutTests:

Changed all -webkit-calc() occurrences to calc().
Made a copy of the simplest test file so very basic tests for the prefixed version
are retained.

* css3/calc/background-position-parsing.html:
* css3/calc/block-mask-overlay-image-outset.html:
* css3/calc/border-radius.html:
* css3/calc/border.html:
* css3/calc/box-reflect.html:
* css3/calc/calc-errors.html:
* css3/calc/color-hsl.html:
* css3/calc/color-rgb.html:
* css3/calc/css3-radial-gradients.html:
* css3/calc/cssom-expected.txt:
* css3/calc/cssom.html:
* css3/calc/font-monospace.html:
* css3/calc/font-size-fractional.html:
* css3/calc/font-size.html:
* css3/calc/font.html:
* css3/calc/getComputedStyle-margin-percentage.html:
* css3/calc/gradient-color-stops.html:
* css3/calc/img-size.html:
* css3/calc/line-height.html:
* css3/calc/margin.html:
* css3/calc/negative-padding.html:
* css3/calc/padding.html:
* css3/calc/reflection-computed-style-expected.txt:
* css3/calc/reflection-computed-style.html:
* css3/calc/regression-62276.html:
* css3/calc/simple-calcs-prefixed-expected.txt: Added.
* css3/calc/simple-calcs-prefixed.html: Copied from LayoutTests/css3/calc/simple-calcs.html.
* css3/calc/simple-calcs.html:
* css3/calc/simple-composited-mask.html:
* css3/calc/table-border-spacing.html:
* css3/calc/table-calcs.html:
* css3/calc/table-empty-cells.html:
* css3/calc/transforms-scale.html:
* css3/calc/transforms-translate.html:
* css3/calc/transition-crash.html:
* css3/calc/transition-crash2.html:
* css3/calc/transition-crash3.html:
* css3/calc/transition-crash4.html:
* css3/calc/transitions-dependent.html:
* css3/calc/transitions.html:
* css3/calc/vertical-align-expected.html:
* css3/calc/vertical-align.html:
* css3/calc/zoom-with-em.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
47 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/calc/background-position-parsing.html
LayoutTests/css3/calc/block-mask-overlay-image-outset.html
LayoutTests/css3/calc/border-radius.html
LayoutTests/css3/calc/border.html
LayoutTests/css3/calc/box-reflect.html
LayoutTests/css3/calc/calc-errors.html
LayoutTests/css3/calc/color-hsl.html
LayoutTests/css3/calc/color-rgb.html
LayoutTests/css3/calc/css3-radial-gradients.html
LayoutTests/css3/calc/cssom-expected.txt
LayoutTests/css3/calc/cssom.html
LayoutTests/css3/calc/font-monospace.html
LayoutTests/css3/calc/font-size-fractional.html
LayoutTests/css3/calc/font-size.html
LayoutTests/css3/calc/font.html
LayoutTests/css3/calc/getComputedStyle-margin-percentage.html
LayoutTests/css3/calc/gradient-color-stops.html
LayoutTests/css3/calc/img-size.html
LayoutTests/css3/calc/line-height.html
LayoutTests/css3/calc/margin.html
LayoutTests/css3/calc/negative-padding.html
LayoutTests/css3/calc/padding.html
LayoutTests/css3/calc/reflection-computed-style-expected.txt
LayoutTests/css3/calc/reflection-computed-style.html
LayoutTests/css3/calc/regression-62276.html
LayoutTests/css3/calc/simple-calcs-prefixed-expected.txt [new file with mode: 0644]
LayoutTests/css3/calc/simple-calcs-prefixed.html [new file with mode: 0644]
LayoutTests/css3/calc/simple-calcs.html
LayoutTests/css3/calc/simple-composited-mask.html
LayoutTests/css3/calc/table-border-spacing.html
LayoutTests/css3/calc/table-calcs.html
LayoutTests/css3/calc/table-empty-cells.html
LayoutTests/css3/calc/transforms-scale.html
LayoutTests/css3/calc/transforms-translate.html
LayoutTests/css3/calc/transition-crash.html
LayoutTests/css3/calc/transition-crash2.html
LayoutTests/css3/calc/transition-crash3.html
LayoutTests/css3/calc/transition-crash4.html
LayoutTests/css3/calc/transitions-dependent.html
LayoutTests/css3/calc/transitions.html
LayoutTests/css3/calc/vertical-align-expected.html
LayoutTests/css3/calc/vertical-align.html
LayoutTests/css3/calc/zoom-with-em.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSCalculationValue.cpp
Source/WebCore/css/CSSParser.cpp