diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-06-09 19:55:06 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-06-09 19:55:06 +0000 |
commit | 78594f3f60a2ce28f1d6ee95676bfa10492320fe (patch) | |
tree | e8d5e6e06d24e4b663ffb2bcd3115816879bdb0d /css/css.h | |
parent | ec820df42f083e60bdeb20d6fc1d83a9985091a3 (diff) | |
download | netsurf-78594f3f60a2ce28f1d6ee95676bfa10492320fe.tar.gz netsurf-78594f3f60a2ce28f1d6ee95676bfa10492320fe.tar.bz2 |
[project @ 2004-06-09 19:55:06 by jmb]
Implement background-image, background-repeat, background-position and background-attachment CSS properties.
background-attachment and background-position need more work.
Some redraw issues remain.
svn path=/import/netsurf/; revision=938
Diffstat (limited to 'css/css.h')
-rw-r--r-- | css/css.h | 38 |
1 files changed, 37 insertions, 1 deletions
@@ -53,10 +53,44 @@ typedef enum { CSS_TEXT_DECORATION_UNKNOWN = 0x1000 } css_text_decoration; +typedef enum { + CSS_BACKGROUND_POSITION_LENGTH, + CSS_BACKGROUND_POSITION_PERCENT, + CSS_BACKGROUND_POSITION_INHERIT +} css_background_position; + /** Representation of a complete CSS 2 style. */ struct css_style { colour background_color; + css_background_attachment background_attachment; + + struct { + enum { CSS_BACKGROUND_IMAGE_NONE, + CSS_BACKGROUND_IMAGE_INHERIT, + CSS_BACKGROUND_IMAGE_URI } type; + char *uri; + } background_image; + + struct { + struct { + css_background_position pos; + union { + float percent; + struct css_length length; + } value; + } horz; + struct { + css_background_position pos; + union { + float percent; + struct css_length length; + } value; + } vert; + } background_position; + + css_background_repeat background_repeat; + struct { colour color; struct { @@ -246,6 +280,7 @@ struct css_node { css_combinator comb; struct css_style *style; unsigned long specificity; + struct content *stylesheet; }; @@ -282,7 +317,8 @@ void css_destroy(struct content *c); #ifdef CSS_INTERNALS -struct css_node * css_new_node(css_node_type type, +struct css_node * css_new_node(struct content *stylesheet, + css_node_type type, const char *data, unsigned int data_length); void css_free_node(struct css_node *node); struct css_selector * css_new_selector(css_selector_type type, |