Changeset 290898 in webkit
- Timestamp:
- Mar 7, 2022, 11:13:52 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/to-color-change-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/animation/CSSPropertyAnimation.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r290897 r290898 1 2022-03-07 Antoine Quint <graouts@webkit.org> 2 3 [web-animations] animating "fill" and "stroke" to or from "currentColor" should work 4 https://bugs.webkit.org/show_bug.cgi?id=237531 5 6 Reviewed by Antti Koivisto. 7 8 * web-platform-tests/web-animations/responsive/to-color-change-expected.txt: 9 1 10 2022-03-07 Antoine Quint <graouts@webkit.org> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/to-color-change-expected.txt
r290897 r290898 1 1 2 2 PASS Background color responsive to currentColor changes 3 FAIL Fill color responsive to currentColor changes assert_equals: expected "rgb(0, 34, 102)" but got "rgb(0, 0, 0)" 3 PASS Fill color responsive to currentColor changes 4 4 PASS Color interpolation uses pre-multiplied colors 5 5 PASS Border color responsive to currentColor changes 6 6 PASS Border color responsive to currentColor changes again 7 7 PASS Outline color responsive to currentColor changes 8 FAIL Stroke color responsive to currentColor changes assert_equals: expected "rgb(0, 34, 102)" but got "none" 8 PASS Stroke color responsive to currentColor changes 9 9 PASS Text decoration color responsive to currentColor changes 10 10 FAIL Color responsive to parent currentColor changes assert_equals: expected "rgb(34, 51, 34)" but got "rgb(0, 51, 51)" -
trunk/Source/WebCore/ChangeLog
r290897 r290898 1 2022-03-07 Antoine Quint <graouts@webkit.org> 2 3 [web-animations] animating "fill" and "stroke" to or from "currentColor" should work 4 https://bugs.webkit.org/show_bug.cgi?id=237531 5 6 Reviewed by Antti Koivisto. 7 8 Invalid colors should use the value for the "color" property on the provided RenderStyle. 9 10 * animation/CSSPropertyAnimation.cpp: 11 1 12 2022-03-07 Antoine Quint <graouts@webkit.org> 2 13 -
trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp
r290897 r290898 2122 2122 2123 2123 if (!fromColor.isValid()) 2124 fromColor = Color();2124 fromColor = a.color(); 2125 2125 if (!toColor.isValid()) 2126 toColor = Color();2126 toColor = b.color(); 2127 2127 2128 2128 return fromColor == toColor; … … 2133 2133 void blend(RenderStyle& destination, const RenderStyle& from, const RenderStyle& to, const CSSPropertyBlendingContext& context) const final 2134 2134 { 2135 if ((from.*m_paintTypeGetter)() != SVGPaintType::RGBColor 2136 || (to.*m_paintTypeGetter)() != SVGPaintType::RGBColor) 2135 auto isValidPaintType = [](SVGPaintType paintType) { 2136 return paintType == SVGPaintType::RGBColor || paintType == SVGPaintType::CurrentColor; 2137 }; 2138 2139 if (!isValidPaintType((from.*m_paintTypeGetter)()) || !isValidPaintType((to.*m_paintTypeGetter)())) 2137 2140 return; 2138 2141 … … 2144 2147 2145 2148 if (!fromColor.isValid()) 2146 fromColor = Color();2149 fromColor = from.color(); 2147 2150 if (!toColor.isValid()) 2148 toColor = Color();2151 toColor = to.color(); 2149 2152 (destination.*m_setter)(blendFunc(fromColor, toColor, context)); 2150 2153 }
Note:
See TracChangeset
for help on using the changeset viewer.