diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2015-03-07 21:37:05 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2016-11-19 14:30:07 +0000 |
commit | 60812fc682b8764c93020124bb43e7972f64cb73 (patch) | |
tree | f40a1c063a85187b5e3b493cfa9999c07340ec13 /src/select/arena.h | |
parent | e1d710863493dc91c09e0a71dc09d137be8e6b6e (diff) | |
download | libcss-60812fc682b8764c93020124bb43e7972f64cb73.tar.gz libcss-60812fc682b8764c93020124bb43e7972f64cb73.tar.bz2 |
Add arena module for interning computed styles.
Builds, but currently unused.
Diffstat (limited to 'src/select/arena.h')
-rw-r--r-- | src/select/arena.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/select/arena.h b/src/select/arena.h new file mode 100644 index 0000000..af06050 --- /dev/null +++ b/src/select/arena.h @@ -0,0 +1,45 @@ +/* + * This file is part of LibCSS + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * + * Copyright 2015 Michael Drake <tlsa@netsurf-browser.org> + */ + +#ifndef css_select_arena_h_ +#define css_select_arena_h_ + +struct css_computed_style; +struct css_computed_uncommon; + +/* + * Add computed style to the style sharing arena, or exchange for existing + * + * This takes a computed style. Note that the original computed style + * may be freed by this call and all future usage should be via the + * updated computed style parameter. + * + * \params style The style to intern; possibly freed and updated + * \return CSS_OK on success or appropriate error otherwise. + */ +enum css_error css__arena_intern_style(struct css_computed_style **style); + +/* + * Remove a computed style from the style sharing arena + * + * \params style The style to remove from the style sharing arena + * \return CSS_OK on success or appropriate error otherwise. + */ +enum css_error css__arena_remove_style(struct css_computed_style *style); + +/* + * Remove a computed style's uncommon block from the style sharing arena + * + * \params uncommon The uncommon style to remove from the style sharing arena + * \return CSS_OK on success or appropriate error otherwise. + */ +enum css_error css__arena_remove_uncommon_style( + struct css_computed_uncommon *uncommon); + +#endif + |