diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/select/select.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/select/select.c b/src/select/select.c index dbf5d01..5f9da4a 100644 --- a/src/select/select.c +++ b/src/select/select.c @@ -7,10 +7,10 @@ #include <string.h> +#include <libcss/computed.h> #include <libcss/select.h> #include "stylesheet.h" -#include "select/computed.h" #include "select/hash.h" #include "select/propset.h" #include "utils/utils.h" @@ -28,6 +28,23 @@ struct css_select_ctx { }; /** + * State for each property during selection + */ +struct css_select_state { +/** \todo We need a better way of knowing the number of properties + * Bytecode opcodes cover 84 properties, then there's a + * further 15 generated from the side bits */ +#define N_PROPS (99) + struct { + uint32_t specificity; /* Specificity of property in result */ + uint32_t set : 1, /* Whether property is set in result */ + origin : 2, /* Origin of property in result */ + important : 1; /* Importance of property in result */ + } props[N_PROPS]; +#undef N_PROPS +}; + +/** * Create a selection context * * \param alloc Memory (de)allocation function |