12012-12-28 Alexis Menard <alexis@webkit.org>
2
3 Querying transition-timing-function value on the computed style does not return keywords when it should.
4 https://bugs.webkit.org/show_bug.cgi?id=105442
5
6 Reviewed by NOBODY (OOPS!).
7
8 http://www.w3.org/TR/css3-transitions/#transition-timing-function-property
9 contains a set of predefined timing functions which under the hood are
10 implemented using cubic-bezier but it's an implementation detail that
11 should not be exposed. It seems to be more clear to return a CSS
12 keyword rather than the cubic-bezier form when querying the value of
13 the property on the computed style. In fact the spec even say that for
14 example the initial value is "ease" and not cubic-bezier(0.25, 0.1,
15 0.25, 1.0). We could also imagine that in the future these predefined
16 values could contain other values not represented by a cubic-bezier
17 form. This behavior also align with the "linear" keyword which return
18 "linear" rather than cubic-bezier(0.0, 0.0, 1.0, 1.0).
19
20 Test: transitions/transitions-parsing.html has been updated to cover
21 the new behavior as well as making sure that an explicitly set value of
22 cubic-bezier(0.25, 0.1, 0.25, 1.0) does not return "ease" but the
23 cubic-bezier() form.
24
25 * css/CSSComputedStyleDeclaration.cpp:
26 (WebCore::createAnimationValue):
27 (WebCore):
28 (WebCore::getTimingFunctionValue):
29 * css/CSSToStyleMap.cpp:
30 (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
31 * platform/animation/TimingFunction.h:
32 (WebCore::CubicBezierTimingFunction::create):
33 (WebCore::CubicBezierTimingFunction::operator==):
34 (WebCore::CubicBezierTimingFunction::cubicBezierTimingFunctionType):
35 (CubicBezierTimingFunction):
36 (WebCore::CubicBezierTimingFunction::CubicBezierTimingFunction):
37