Skip to content

Commit

Permalink
text-decoration-color animation should not be discrete
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=219691
<rdar://problem/72138361>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-transitions/properties-value-003-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

We mistakenly added animation support for text-decoration-color in r269812 as a discrete property.
We now correctly make it a property that supports interpolation of the color type.

* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):


Canonical link: https://commits.webkit.org/232266@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
graouts committed Dec 9, 2020
1 parent 07add7c commit 251ddb7
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 9 deletions.
11 changes: 11 additions & 0 deletions LayoutTests/imported/w3c/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2020-12-09 Antoine Quint <[email protected]>

text-decoration-color animation should not be discrete
https://bugs.webkit.org/show_bug.cgi?id=219691
<rdar://problem/72138361>

Reviewed by Simon Fraser.

* web-platform-tests/css/css-transitions/properties-value-003-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

2020-12-09 Antoine Quint <[email protected]>

REGRESSION (r269812): Amazon Prime: thumbnail fails to expand properly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ FAIL marker-offset length(cm) / values assert_not_equals: initial and target val
FAIL marker-offset length(cm) / events assert_equals: Expected TransitionEnd events triggered on .transition expected "marker-offset:2s" but got ""
FAIL marker-offset length(in) / values assert_not_equals: initial and target values may not match got disallowed value ""
FAIL marker-offset length(in) / events assert_equals: Expected TransitionEnd events triggered on .transition expected "marker-offset:2s" but got ""
FAIL text-decoration-color color(rgba) / values assert_not_equals: must not be target value after start got disallowed value "rgba(10, 10, 10, 0.4)"
FAIL text-decoration-color color(rgba) / events assert_equals: Expected TransitionEnd events triggered on .transition expected "text-decoration-color:2s" but got ""
PASS text-decoration-color color(rgba) / values
PASS text-decoration-color color(rgba) / events
PASS column-count integer(integer) / values
PASS column-count integer(integer) / events
PASS column-gap length(pt) / values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ PASS text-align uses discrete animation when animating between "start" and "end"
PASS text-align uses discrete animation when animating between "start" and "end" with effect easing
PASS text-align uses discrete animation when animating between "start" and "end" with keyframe easing
PASS text-decoration-color (type: color) has testInterpolation function
FAIL text-decoration-color supports animating as color of rgb() assert_equals: The value should be rgb(128, 0, 128) at 500ms expected "rgb(128, 0, 128)" but got "rgb(0, 0, 255)"
FAIL text-decoration-color supports animating as color of #RGB assert_equals: The value should be rgb(128, 0, 128) at 500ms expected "rgb(128, 0, 128)" but got "rgb(0, 0, 255)"
FAIL text-decoration-color supports animating as color of hsl() assert_equals: The value should be rgb(128, 0, 128) at 500ms expected "rgb(128, 0, 128)" but got "rgb(0, 0, 255)"
FAIL text-decoration-color supports animating as color of #RGBa assert_equals: The value should be rgba(85, 0, 170, 0.6) at 500ms expected "rgba(85, 0, 170, 0.6)" but got "rgba(0, 0, 255, 0.8)"
FAIL text-decoration-color supports animating as color of rgba() assert_equals: The value should be rgba(85, 0, 170, 0.6) at 500ms expected "rgba(85, 0, 170, 0.6)" but got "rgba(0, 0, 255, 0.8)"
FAIL text-decoration-color supports animating as color of hsla() assert_equals: The value should be rgba(85, 0, 170, 0.6) at 500ms expected "rgba(85, 0, 170, 0.6)" but got "rgba(0, 0, 255, 0.8)"
PASS text-decoration-color supports animating as color of rgb()
PASS text-decoration-color supports animating as color of #RGB
PASS text-decoration-color supports animating as color of hsl()
PASS text-decoration-color supports animating as color of #RGBa
PASS text-decoration-color supports animating as color of rgba()
PASS text-decoration-color supports animating as color of hsla()
PASS text-decoration-line (type: discrete) has testInterpolation function
PASS text-decoration-line uses discrete animation when animating between "underline" and "overline" with linear easing
PASS text-decoration-line uses discrete animation when animating between "underline" and "overline" with effect easing
Expand Down
14 changes: 14 additions & 0 deletions Source/WebCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
2020-12-09 Antoine Quint <[email protected]>

text-decoration-color animation should not be discrete
https://bugs.webkit.org/show_bug.cgi?id=219691
<rdar://problem/72138361>

Reviewed by Simon Fraser.

We mistakenly added animation support for text-decoration-color in r269812 as a discrete property.
We now correctly make it a property that supports interpolation of the color type.

* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

2020-12-09 Ryan Haddad <[email protected]>

Unreviewed, reverting r270544 and r270569.
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/animation/CSSPropertyAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,7 @@ CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap()
new PropertyWrapperFontStyle(),
new PropertyWrapper<TextDecorationThickness>(CSSPropertyTextDecorationThickness, &RenderStyle::textDecorationThickness, &RenderStyle::setTextDecorationThickness),
new PropertyWrapper<TextUnderlineOffset>(CSSPropertyTextUnderlineOffset, &RenderStyle::textUnderlineOffset, &RenderStyle::setTextUnderlineOffset),
new PropertyWrapperVisitedAffectedColor(CSSPropertyTextDecorationColor, &RenderStyle::textDecorationColor, &RenderStyle::setTextDecorationColor, &RenderStyle::visitedLinkTextDecorationColor, &RenderStyle::setVisitedLinkTextDecorationColor),

new LengthPropertyWrapper(CSSPropertyFlexBasis, &RenderStyle::flexBasis, &RenderStyle::setFlexBasis),
new PropertyWrapper<float>(CSSPropertyFlexGrow, &RenderStyle::flexGrow, &RenderStyle::setFlexGrow),
Expand Down Expand Up @@ -1964,7 +1965,6 @@ CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap()
new DiscretePropertyWrapper<RubyPosition>(CSSPropertyWebkitRubyPosition, &RenderStyle::rubyPosition, &RenderStyle::setRubyPosition),
new DiscretePropertyWrapper<TableLayoutType>(CSSPropertyTableLayout, &RenderStyle::tableLayout, &RenderStyle::setTableLayout),
new DiscretePropertyWrapper<TextAlignMode>(CSSPropertyTextAlign, &RenderStyle::textAlign, &RenderStyle::setTextAlign),
new DiscretePropertyWrapper<const Color&>(CSSPropertyTextDecorationColor, &RenderStyle::textDecorationColor, &RenderStyle::setTextDecorationColor),
new DiscretePropertyWrapper<OptionSet<TextDecoration>>(CSSPropertyTextDecorationLine, &RenderStyle::textDecoration, &RenderStyle::setTextDecoration),
new DiscretePropertyWrapper<TextDecorationStyle>(CSSPropertyTextDecorationStyle, &RenderStyle::textDecorationStyle, &RenderStyle::setTextDecorationStyle),
new DiscretePropertyWrapper<const Color&>(CSSPropertyWebkitTextEmphasisColor, &RenderStyle::textEmphasisColor, &RenderStyle::setTextEmphasisColor),
Expand Down

0 comments on commit 251ddb7

Please sign in to comment.