diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2015-11-02 16:10:36 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2016-11-19 14:30:07 +0000 |
commit | fb095fb2411d3127df035d93b7b33ff6064ad2e9 (patch) | |
tree | 46de66ca5bd6baf3a44e0b7d4b498eadeed2dd16 /src/select/computed.h | |
parent | 1d7d0f7616df4fb9fe6e6e5acd34e90859fcb12d (diff) | |
download | libcss-fb095fb2411d3127df035d93b7b33ff6064ad2e9.tar.gz libcss-fb095fb2411d3127df035d93b7b33ff6064ad2e9.tar.bz2 |
Intern partial styles.
Note this changes the public API. We can't compose directly
over child style now, since it may be interned.
Diffstat (limited to 'src/select/computed.h')
-rw-r--r-- | src/select/computed.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/select/computed.h b/src/select/computed.h index f965993..230711d 100644 --- a/src/select/computed.h +++ b/src/select/computed.h @@ -325,6 +325,23 @@ struct css_computed_style { uint32_t bin; }; + +/** + * Take a new reference to a computed style + * + * \param style The style to take a new reference to. + * \return The new computed style reference + */ +static inline css_computed_style * css__computed_style_ref( + css_computed_style *style) +{ + if (style == NULL) + return NULL; + + style->count++; + return style; +} + css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon); css_error css__compute_absolute_values(const css_computed_style *parent, |