summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-22 00:23:55 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-22 00:23:55 +0000
commitc58f7a4ff983d282488b7b3413dd3dd572a84ad1 (patch)
treef28580f30fc8ea91190f1af032bf90372e17479b /src
parent2caf5a7505210eadd95cd35ad34600275aafcd65 (diff)
downloadlibcss-c58f7a4ff983d282488b7b3413dd3dd572a84ad1.tar.gz
libcss-c58f7a4ff983d282488b7b3413dd3dd572a84ad1.tar.bz2
Sketch out something for presentational hints.
The client will have to maintain some state to be able to calculate this struct for every node selection, but that shouldn't be overly onerous. Also, the mess surrounding centering can only be sensibly solved through the addition of a new, prefixed, property. svn path=/trunk/libcss/; revision=6816
Diffstat (limited to 'src')
-rw-r--r--src/select/select.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/select/select.c b/src/select/select.c
index a27a0cf..7b83f90 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -240,6 +240,7 @@ css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
* \param node Node to select style for
* \param pseudo_element Pseudo element to select for, instead
* \param media Currently active media types
+ * \param hint Presentational hints, or NULL for none
* \param result Pointer to style to populate (assumed clean)
* \param handler Dispatch table of handler functions
* \param pw Client-specific private data for handler functions
@@ -256,7 +257,7 @@ css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
*/
css_error css_select_style(css_select_ctx *ctx, void *node,
uint32_t pseudo_element, uint64_t media,
- css_computed_style *result,
+ const css_hint *hints, css_computed_style *result,
css_select_handler *handler, void *pw)
{
uint32_t i;
@@ -287,6 +288,17 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
}
}
+ /** \todo take account of presentational hints:
+ *
+ * foreach property in hints:
+ * if !state.property.set || (state.property.origin == UA ||
+ * (state.property.origin == USER &&
+ * !state.property.important)):
+ * result.property = property
+ * state.property.set = true
+ */
+ UNUSED(hints);
+
/* Finally, fix up any remaining unset properties.
* Those properties which are inherited need to be set as inherit.
* Those which are not inherited need to be set to their default value.