From fd7078b1ad470c3de96d32c3699eb862259df990 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 28 Sep 2003 17:37:43 +0000 Subject: [project @ 2003-09-28 17:37:43 by bursa] Implement CSS specificity and fix bugs. svn path=/import/netsurf/; revision=329 --- render/box.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'render') 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) -- cgit v1.2.3