[gtk+] cssprovider: Reset the scope before skipping to the next rule after an error happens.



commit fe12c46531ac8020470ece87b73fe4c05247c885
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Mar 7 23:00:16 2011 +0100

    cssprovider: Reset the scope before skipping to the next rule after an error happens.
    
    This is so the selector token gets parsed with the correct GScanner scope/config
    on all situations.

 gtk/gtkcssprovider.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 4bd6c56..51cec89 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -3564,6 +3564,8 @@ parse_stylesheet (GtkCssProvider  *css_provider,
               g_clear_error (&err);
             }
 
+          css_provider_reset_parser (css_provider);
+
           while (!g_scanner_eof (priv->scanner) &&
                  priv->scanner->token != G_TOKEN_RIGHT_CURLY)
             g_scanner_get_next_token (priv->scanner);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]