From: Vsevolod Stakhov Date: Sun, 24 Jun 2018 10:19:09 +0000 (+0100) Subject: [Minor] Opacity is actually not supported attribute X-Git-Tag: 1.7.7~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f48f00d4e8d5e10354b3880fdc1c9f3d5efc99f7;p=thirdparty%2Frspamd.git [Minor] Opacity is actually not supported attribute --- diff --git a/src/libserver/html.c b/src/libserver/html.c index 27aea6a119..4e7e4dc237 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -1164,9 +1164,6 @@ rspamd_html_parse_tag_component (rspamd_mempool_t *pool, if (g_ascii_strncasecmp (p, "bgcolor", len) == 0) { NEW_COMPONENT (RSPAMD_HTML_COMPONENT_BGCOLOR); } - else if (g_ascii_strncasecmp (p, "opacity", len) == 0) { - NEW_COMPONENT (RSPAMD_HTML_COMPONENT_OPACITY); - } } else if (len == 4) { if (g_ascii_strncasecmp (p, "size", len) == 0) { @@ -2324,20 +2321,6 @@ rspamd_html_process_block_tag (rspamd_mempool_t *pool, struct html_tag *tag, &bl->font_color); msg_debug_html ("got color: %xd", bl->font_color.d.val); break; - case RSPAMD_HTML_COMPONENT_OPACITY: - rspamd_strlcpy (numbuf, comp->start, - MIN (sizeof (numbuf), comp->len + 1)); - opacity = strtod (numbuf, NULL); - - if (opacity > 1) { - opacity = 1; - } - else if (opacity < 0) { - opacity = 0; - } - - bl->font_color.d.comp.alpha = (guint8)(opacity * 255.0); - break; default: /* NYI */ break; diff --git a/src/libserver/html.h b/src/libserver/html.h index 24ea0d3c77..0414f48d9a 100644 --- a/src/libserver/html.h +++ b/src/libserver/html.h @@ -35,7 +35,6 @@ enum html_component_type { RSPAMD_HTML_COMPONENT_WIDTH, RSPAMD_HTML_COMPONENT_HEIGHT, RSPAMD_HTML_COMPONENT_SIZE, - RSPAMD_HTML_COMPONENT_OPACITY }; struct html_tag_component {