Reviewers: Timothy Loh, dstockwell
CL:
https://codereview.chromium.org/2537373005/Message:
This patch is pretty simple, but it has a difference
with a regular color due to the "auto" value in caret-color.
Patch caret-color-019.html (the one checking that "auto"
is not interpolable) will be upstreamed to the CSS WG suite.
I'm not doing it right now, just in case we decide to have
a different behavior for caret-color, something similar
to what happens on the rest of color properties.
For example, with the current patch the following CSS
will cause that the color is gradually changed to "red",
but the caret-color is not animated:
input { transition: color 2s, caret-color 2s; }
input:focus { color: red; caret-color: red; }
I guess that it's not a big issue anyway, and we can deal
with this special behavior for caret-color in animations.
@florian was open to update the spec if we can think on
something to solve this issue.
Description:
[css-ui] Make caret-color animatable
This patch makes caret-color an animatable property.
The only special part is becuase "auto" and "currentColor"
computed styles are "auto" and "currentColor". That makes them
not interpolable. So we need to do some extra checks in
CSSAnimatableValueFactory::create().
Add a new test (caret-color-transition.html) to verify that transitions
work as expected.
Also the animations test (caret-color-018.html) from the W3C suite
is passing now.
Created a new test (caret-color-019.html) to verify that
the caret-color doesn't interpolate when "auto" value is used.
BUG=669490
TEST=editing/caret/caret-color-transition.html
TEST=imported/csswg-test/css-ui-3/caret-color-018.html
TEST=imported/csswg-test/css-ui-3/caret-color-019.html
Affected files (+107, -2 lines):
M third_party/WebKit/LayoutTests/TestExpectations
A third_party/WebKit/LayoutTests/editing/caret/caret-color-transition.html
A third_party/WebKit/LayoutTests/editing/caret/caret-color-transition-expected.txt
A third_party/WebKit/LayoutTests/imported/csswg-test/css-ui-3/caret-color-019.html
M third_party/WebKit/Source/core/animation/ColorPropertyFunctions.cpp
M third_party/WebKit/Source/core/animation/PropertyInterpolationTypesMapping.cpp
M third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
M third_party/WebKit/Source/core/css/CSSProperties.in
M third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp