author | mikelawther@chromium.org <mikelawther@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | |

Mon, 21 Jan 2013 07:05:16 +0000 (07:05 +0000) | ||

committer | mikelawther@chromium.org <mikelawther@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | |

Mon, 21 Jan 2013 07:05:16 +0000 (07:05 +0000) | ||

commit | 4955c5ab5fa88bf4fbc81cd0bd6f06c03cd69459 | |

tree | 8bb358565d9a651d2e8c91ca4afc8539dcf007da | tree | snapshot |

parent | 98f06fd74ba9b084049d3526c82e08a99466ed22 | commit | diff |

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

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: