diff options
author | James Bursa <james@netsurf-browser.org> | 2003-09-28 17:37:43 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-09-28 17:37:43 +0000 |
commit | fd7078b1ad470c3de96d32c3699eb862259df990 (patch) | |
tree | 96d323b56e836932538eb5f3710045efa1b93874 /render | |
parent | c48e0ce8dc0ac13b31c143be21b1ccc9a92d921d (diff) | |
download | netsurf-fd7078b1ad470c3de96d32c3699eb862259df990.tar.gz netsurf-fd7078b1ad470c3de96d32c3699eb862259df990.tar.bz2 |
[project @ 2003-09-28 17:37:43 by bursa]
Implement CSS specificity and fix bugs.
svn path=/import/netsurf/; revision=329
Diffstat (limited to 'render')
-rw-r--r-- | render/box.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/render/box.c b/render/box.c index 8d87eca23..b681b9637 100644 --- a/render/box.c +++ b/render/box.c @@ -485,19 +485,6 @@ struct css_style * box_get_style(struct content ** stylesheet, css_cascade(style, style_new); free(style_new); - if ((s = (char *) xmlGetProp(n, (const xmlChar *) "align"))) { - if (strcmp((const char *) n->name, "table") == 0 || - strcmp((const char *) n->name, "img") == 0) { - if (stricmp(s, "left") == 0) style->float_ = CSS_FLOAT_LEFT; - else if (stricmp(s, "right") == 0) style->float_ = CSS_FLOAT_RIGHT; - } else { - if (stricmp(s, "left") == 0) style->text_align = CSS_TEXT_ALIGN_LEFT; - else if (stricmp(s, "center") == 0) style->text_align = CSS_TEXT_ALIGN_CENTER; - else if (stricmp(s, "right") == 0) style->text_align = CSS_TEXT_ALIGN_RIGHT; - } - xmlFree(s); - } - if ((s = (char *) xmlGetProp(n, (const xmlChar *) "bgcolor"))) { unsigned int r, g, b; if (s[0] == '#' && sscanf(s + 1, "%2x%2x%2x", &r, &g, &b) == 3) @@ -507,13 +494,6 @@ struct css_style * box_get_style(struct content ** stylesheet, xmlFree(s); } - if ((s = (char *) xmlGetProp(n, (const xmlChar *) "clear"))) { - if (stricmp(s, "all") == 0) style->clear = CSS_CLEAR_BOTH; - else if (stricmp(s, "left") == 0) style->clear = CSS_CLEAR_LEFT; - else if (stricmp(s, "right") == 0) style->clear = CSS_CLEAR_RIGHT; - xmlFree(s); - } - if ((s = (char *) xmlGetProp(n, (const xmlChar *) "color"))) { unsigned int r, g, b; if (s[0] == '#' && sscanf(s + 1, "%2x%2x%2x", &r, &g, &b) == 3) |