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 595991 - Add support for inline styles
Add support for inline styles
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-09-22 19:08 UTC by Owen Taylor
Modified: 2009-10-01 19:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add support for inline styles (15.60 KB, patch)
2009-09-22 19:08 UTC, Owen Taylor
none Details | Review
Add support for inline styles (16.01 KB, patch)
2009-09-30 00:09 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2009-09-22 19:08:37 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.
Comment 1 Owen Taylor 2009-09-22 19:08:40 UTC
Created attachment 143731 [details] [review]
Add support for inline styles
Comment 2 Owen Taylor 2009-09-30 00:09:59 UTC
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 3 Dan Winship 2009-09-30 20:51:26 UTC
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
Comment 4 Owen Taylor 2009-09-30 23:13:32 UTC
(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.
Comment 5 Owen Taylor 2009-10-01 19:28:14 UTC
Attachment 144321 [details] pushed as 6527dbc - Add support for inline styles