summaryrefslogtreecommitdiff
path: root/src/select/arena.h
blob: af060509c0f1de9dc46082f20c89666b07693b49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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