GNOME Bugzilla – Bug 595991
Add support for inline styles
Last modified: 2009-10-01 19:28:16 UTC
Add support for passing an inline-style string when creating a ShellThemeNode. Hook this up to a new 'style' property of NbtkWidget. Add a test case that demonstrates using this to update font sizes on the fly.
Created attachment 143731 [details] [review] Add support for inline styles
Created attachment 144321 [details] [review] Add support for inline styles Add support for passing an inline-style string when creating a StThemeNode. Hook this up to a new 'style' property of StWidget. Add a test case that demonstrates using this to update font sizes on the fly.
Comment on attachment 144321 [details] [review] Add support for inline styles >+ for (cur_decl = node->inline_properties; cur_decl; cur_decl = cur_decl->next) >+ cr_declaration_unref (cur_decl); reading cur_decl->next after cur_decl has been freed? everything else looks good
(In reply to comment #3) > (From update of attachment 144321 [details] [review]) > >+ for (cur_decl = node->inline_properties; cur_decl; cur_decl = cur_decl->next) > >+ cr_declaration_unref (cur_decl); > > reading cur_decl->next after cur_decl has been freed? > > everything else looks good Ah, good catch. Fixing this revealed that cr_declaration_unref() is completely busted for declaration lists - the unref unrefs just the head node, but if the head nodes refcount goes to zero, the entire list is destroyed. Changing the code to a simple cr_declaration_destroy (node->inline_properties); works.
Attachment 144321 [details] pushed as 6527dbc - Add support for inline styles