After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680980 - Code that gives me a spinner in gtk+ 3.4.4 does not in 3.5.8
Code that gives me a spinner in gtk+ 3.4.4 does not in 3.5.8
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.5.x
Other Linux
: Normal blocker
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-08-01 13:52 UTC by Albert Astals Cid
Modified: 2012-09-17 19:42 UTC
See Also:
GNOME target: 3.6
GNOME version: 3.5/3.6


Attachments
The said file (1.13 KB, text/plain)
2012-08-01 13:52 UTC, Albert Astals Cid
Details

Description Albert Astals Cid 2012-08-01 13:52:48 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
Comment 1 Emmanuele Bassi (:ebassi) 2012-08-01 16:37:08 UTC
yes, GtkSpinner is known to be broken.
Comment 2 Emmanuele Bassi (:ebassi) 2012-08-01 16:38:16 UTC
let's put this on the blockers list.
Comment 3 Cosimo Cecchi 2012-09-10 17:20:19 UTC
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
Comment 4 Cosimo Cecchi 2012-09-10 18:55:17 UTC
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.
Comment 5 Cosimo Cecchi 2012-09-10 18:56:36 UTC
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.
Comment 6 Benjamin Otte (Company) 2012-09-10 22:07:53 UTC
(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.
Comment 7 Matthias Clasen 2012-09-17 19:42:03 UTC
Lets consider this fixed for the purposes of 3.6