From fb095fb2411d3127df035d93b7b33ff6064ad2e9 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 2 Nov 2015 16:10:36 +0000 Subject: Intern partial styles. Note this changes the public API. We can't compose directly over child style now, since it may be interned. --- include/libcss/computed.h | 7 ++++--- include/libcss/select.h | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/libcss/computed.h b/include/libcss/computed.h index 0009267..db3e3e4 100644 --- a/include/libcss/computed.h +++ b/include/libcss/computed.h @@ -82,13 +82,14 @@ css_error css_computed_style_destroy(css_computed_style *style); css_error css_computed_style_initialise(css_computed_style *style, struct css_select_handler *handler, void *pw); -css_error css_computed_style_compose(const css_computed_style *parent, - css_computed_style *child, +css_error css_computed_style_compose( + const css_computed_style *restrict parent, + const css_computed_style *restrict child, css_error (*compute_font_size)(void *pw, const struct css_hint *parent, struct css_hint *size), void *pw, - css_computed_style **result); + css_computed_style **restrict result); /****************************************************************************** * Property accessors below here * diff --git a/include/libcss/select.h b/include/libcss/select.h index 74fa5d2..3f1e14a 100644 --- a/include/libcss/select.h +++ b/include/libcss/select.h @@ -217,6 +217,9 @@ css_error css_select_ctx_count_sheets(css_select_ctx *ctx, uint32_t *count); css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index, const css_stylesheet **sheet); +css_error css_select_default_style(css_select_ctx *ctx, + css_select_handler *handler, void *pw, + css_computed_style **style); css_error css_select_style(css_select_ctx *ctx, void *node, uint64_t media, const css_stylesheet *inline_style, css_select_handler *handler, void *pw, -- cgit v1.2.3