GNOME Bugzilla – Bug 680980
Code that gives me a spinner in gtk+ 3.4.4 does not in 3.5.8
Last modified: 2012-09-17 19:42:03 UTC
Created attachment 220058 [details] The said file The following vala code gives me a spinning spinner when run against gtk+ 3.4.4 while it gives me a static spinner if run against gtk+ 3.5.8
yes, GtkSpinner is known to be broken.
let's put this on the blockers list.
CSS animations support has now been implemented by Benjamin in a branch [1], and I just pushed another on top of his, that makes spinners animate again [2]. [1] http://git.gnome.org/browse/gtk+/log/?h=wip/css [2] http://git.gnome.org/browse/gtk+/log/?h=wip/spinner
Some review of Benjamin's commits in wip/css d2a728f879c0bb06e61358ab6e8bf82fc069fe24: + _gtk_css_parser_error (parser, "Expected closing '}'after keyframes block"); Missing space in the error message. + * @GTK_CSS_SECTION_KEYFRAMES: The section defines keyframes. See <ulink + * url="http://dev.w3.org/csswg/css3-animations/#keyframes">CSS + * animations</ulink> for details. Since 3.4 Since: 3.6. +static gboolean +parse_keyframes (GtkCssScanner *scanner) + if (!_gtk_css_parser_try (scanner->parser, "{", TRUE)) + { Missing g_free (name); 2db5578f33a3007f661cf255bf97d7785d94ac73: +static gboolean +gtk_css_animation_is_finished (GtkStyleAnimation *style_animation, + gint64 at_time_us) +{ + GtkCssAnimation *animation = GTK_CSS_ANIMATION (style_animation); + double iteration; + + iteration = gtk_css_animation_get_iteration (animation, at_time_us); + + return FALSE; Should remove this return probably.
I also noticed (with my wip/spinner branch) that from time to time the animation doesn't correctly start - but it might be a side-effect of this stray return FALSE above.
(In reply to comment #4) > Missing space in the error message. > > [...] > > Since: 3.6. > > [...] > > Missing g_free (name); > Fixed locally. > 2db5578f33a3007f661cf255bf97d7785d94ac73: > > +static gboolean > +gtk_css_animation_is_finished (GtkStyleAnimation *style_animation, > + gint64 at_time_us) > +{ > + GtkCssAnimation *animation = GTK_CSS_ANIMATION (style_animation); > + double iteration; > + > + iteration = gtk_css_animation_get_iteration (animation, at_time_us); > + > + return FALSE; > > Should remove this return probably. > I agree that the function is broken, but I'm not sure what the correct behavior is according to spec. And I think last I tried the browsers didn't agree on when an animation "ends". I think an animation is defined to exist for as long as its name appears in the "animation-name" css property. So the correct thing in this function would be to always return FALSE, which is what I've patched things to do locally.
Lets consider this fixed for the purposes of 3.6