summaryrefslogtreecommitdiff
path: root/src/select
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-07-16 14:37:55 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-07-16 14:37:55 +0000
commitda7915e3931a0b43d75d2a1e041f339f356e1d4b (patch)
tree4c9c0f2d57673b2f8adc5c119ce0a7ca47955809 /src/select
parentda878aa8d77630cb1f54d84e56eaa6df545e2dbd (diff)
downloadlibcss-da7915e3931a0b43d75d2a1e041f339f356e1d4b.tar.gz
libcss-da7915e3931a0b43d75d2a1e041f339f356e1d4b.tar.bz2
Add a flag to the font size computation callback to indicate that the resultant absolute font size should not be clamped to a fixed minimum (e.g. if the client has a minimum permissible font size)
svn path=/trunk/libcss/; revision=8586
Diffstat (limited to 'src/select')
-rw-r--r--src/select/computed.c9
-rw-r--r--src/select/computed.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/select/computed.c b/src/select/computed.c
index 9bbaa52..4e3d219 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -216,7 +216,7 @@ css_error css_computed_style_initialise(css_computed_style *style,
css_error css_computed_style_compose(const css_computed_style *parent,
const css_computed_style *child,
css_error (*compute_font_size)(void *pw,
- const css_hint *parent, css_hint *size),
+ const css_hint *parent, bool may_clamp, css_hint *size),
void *pw,
css_computed_style *result)
{
@@ -265,7 +265,7 @@ css_error css_computed_style_compose(const css_computed_style *parent,
css_error compute_absolute_values(const css_computed_style *parent,
css_computed_style *style,
css_error (*compute_font_size)(void *pw,
- const css_hint *parent, css_hint *size),
+ const css_hint *parent, bool may_clamp, css_hint *size),
void *pw)
{
css_hint psize, size, ex_size;
@@ -282,7 +282,8 @@ css_error compute_absolute_values(const css_computed_style *parent,
&size.data.length.value,
&size.data.length.unit);
- error = compute_font_size(pw, parent != NULL ? &psize : NULL, &size);
+ error = compute_font_size(pw, parent != NULL ? &psize : NULL,
+ true, &size);
if (error != CSS_OK)
return error;
@@ -295,7 +296,7 @@ css_error compute_absolute_values(const css_computed_style *parent,
ex_size.status = CSS_FONT_SIZE_DIMENSION;
ex_size.data.length.value = INTTOFIX(1);
ex_size.data.length.unit = CSS_UNIT_EX;
- error = compute_font_size(pw, &size, &ex_size);
+ error = compute_font_size(pw, &size, false, &ex_size);
if (error != CSS_OK)
return error;
diff --git a/src/select/computed.h b/src/select/computed.h
index 5527742..4b0e1aa 100644
--- a/src/select/computed.h
+++ b/src/select/computed.h
@@ -14,7 +14,7 @@
css_error compute_absolute_values(const css_computed_style *parent,
css_computed_style *style,
css_error (*compute_font_size)(void *pw,
- const css_hint *parent, css_hint *size),
+ const css_hint *parent, bool may_clamp, css_hint *size),
void *pw);
#endif