NEW 119956
Support animation of CSS gradients
https://bugs.webkit.org/show_bug.cgi?id=119956
Summary Support animation of CSS gradients
Dirk Schulze
Reported 2013-08-17 11:33:25 PDT
Support animations of CSS gradients
Attachments
Rotating gradient example (404 bytes, text/html)
2013-08-19 03:41 PDT, Dirk Schulze
no flags
Patch (9.80 KB, patch)
2013-08-19 03:43 PDT, Dirk Schulze
no flags
Patch (23.57 KB, patch)
2013-09-08 14:03 PDT, Dirk Schulze
no flags
Dirk Schulze
Comment 1 2013-08-19 03:41:16 PDT
Created attachment 209074 [details] Rotating gradient example
Dirk Schulze
Comment 2 2013-08-19 03:43:39 PDT
Created attachment 209075 [details] Patch Wit this patch, linear gradient angles can be animated as well as colors from color-stops. Animating the angle as described by the spec at the moment, leads to weird wonky looking gradients, since the gradient length gets shrinked on the edges and stretched on the corners.
WebKit Commit Bot
Comment 3 2013-08-19 03:45:17 PDT
Attachment 209075 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/css/CSSGradientValue.cpp', u'Source/WebCore/css/CSSGradientValue.h', u'Source/WebCore/page/animation/CSSPropertyAnimation.cpp']" exit_code: 1 Source/WebCore/page/animation/CSSPropertyAnimation.cpp:37: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/css/CSSGradientValue.h:129: The parameter name "to" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dirk Schulze
Comment 4 2013-08-21 07:45:45 PDT
I think the tasks can be divided into three parts that don't necessarily need to be done in one patch: Animation of Colors, Animation of Color stops (with the help of calc as requested by CSS specs) Animation of Gradient direction/position I am not particular keen about the last step, since that requires layout information that we might not have at animation time. The first part should be very easy (done in the patch already) and the most important use case anyway.
Dirk Schulze
Comment 5 2013-09-08 14:03:37 PDT
Created attachment 210992 [details] Patch color-stop animation from the latest proposal on www-style. Interpolate unordered color-stop list and use calc() to blend different types. The patch cleans up CSSGradientValue.cpp quite a bit as well.
WebKit Commit Bot
Comment 6 2013-09-08 14:06:12 PDT
Attachment 210992 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/css/CSSGradientValue.cpp', u'Source/WebCore/css/CSSGradientValue.h', u'Source/WebCore/page/animation/CSSPropertyAnimation.cpp']" exit_code: 1 Source/WebCore/css/CSSGradientValue.cpp:145: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Source/WebCore/css/CSSGradientValue.h:129: The parameter name "to" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Radar WebKit Bug Importer
Comment 7 2016-01-20 09:21:47 PST
Note You need to log in before you can comment on or make changes to this bug.