diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2003-10-10 18:13:36 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2003-10-10 18:13:36 +0000 |
commit | 0e5d05b12544a73d4ecaa4d89d22251afef92916 (patch) | |
tree | 8748ddbf57242d14615db0cbc67f381a710414c4 /css/css.c | |
parent | 33efbb28067863e576750f07fae855ed3580d66c (diff) | |
download | netsurf-0e5d05b12544a73d4ecaa4d89d22251afef92916.tar.gz netsurf-0e5d05b12544a73d4ecaa4d89d22251afef92916.tar.bz2 |
[project @ 2003-10-10 18:13:36 by jmb]
CSS visibility support (not collapse)
svn path=/import/netsurf/; revision=361
Diffstat (limited to 'css/css.c')
-rw-r--r-- | css/css.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -47,6 +47,7 @@ const struct css_style css_base_style = { { CSS_HEIGHT_AUTO, { 1, CSS_UNIT_EM } }, { CSS_LINE_HEIGHT_ABSOLUTE, { 1.3 } }, CSS_TEXT_ALIGN_LEFT, + CSS_VISIBILITY_VISIBLE, { CSS_WIDTH_AUTO, { { 1, CSS_UNIT_EM } } }, CSS_WHITE_SPACE_NORMAL }; @@ -63,6 +64,7 @@ const struct css_style css_empty_style = { { CSS_HEIGHT_INHERIT, { 1, CSS_UNIT_EM } }, { CSS_LINE_HEIGHT_INHERIT, { 1.3 } }, CSS_TEXT_ALIGN_INHERIT, + CSS_VISIBILITY_INHERIT, { CSS_WIDTH_INHERIT, { { 1, CSS_UNIT_EM } } }, CSS_WHITE_SPACE_INHERIT }; @@ -79,6 +81,7 @@ const struct css_style css_blank_style = { { CSS_HEIGHT_AUTO, { 1, CSS_UNIT_EM } }, { CSS_LINE_HEIGHT_INHERIT, { 1.3 } }, CSS_TEXT_ALIGN_INHERIT, + CSS_VISIBILITY_INHERIT, { CSS_WIDTH_AUTO, { { 1, CSS_UNIT_EM } } }, CSS_WHITE_SPACE_INHERIT }; @@ -613,6 +616,7 @@ void css_dump_style(const struct css_style * const style) } fprintf(stderr, "; "); fprintf(stderr, "text-align: %s; ", css_text_align_name[style->text_align]); + fprintf(stderr, "visibility: %s", css_visibility_name[style->visibility]); fprintf(stderr, "width: "); switch (style->width.width) { case CSS_WIDTH_AUTO: fprintf(stderr, "auto"); break; @@ -685,6 +689,8 @@ void css_cascade(struct css_style * const style, const struct css_style * const style->line_height = apply->line_height; if (apply->text_align != CSS_TEXT_ALIGN_INHERIT) style->text_align = apply->text_align; + if (apply->visibility != CSS_VISIBILITY_INHERIT) + style->visibility = apply->visibility; if (apply->width.width != CSS_WIDTH_INHERIT) style->width = apply->width; if (apply->white_space != CSS_WHITE_SPACE_INHERIT) @@ -754,6 +760,8 @@ void css_merge(struct css_style * const style, const struct css_style * const ap style->line_height = apply->line_height; if (apply->text_align != CSS_TEXT_ALIGN_INHERIT) style->text_align = apply->text_align; + if (apply->visibility != CSS_VISIBILITY_INHERIT) + style->visibility = apply->visibility; if (apply->width.width != CSS_WIDTH_INHERIT) style->width = apply->width; if (apply->white_space != CSS_WHITE_SPACE_INHERIT) |