]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Opacity is actually not supported attribute
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 24 Jun 2018 10:19:09 +0000 (11:19 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 24 Jun 2018 10:19:09 +0000 (11:19 +0100)
src/libserver/html.c
src/libserver/html.h

index 27aea6a1193bb1802554137af1ca2eec0fa7b5ac..4e7e4dc237c55dd075ffdf4a8b0451f50fdf2fd9 100644 (file)
@@ -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;
index 24ea0d3c773d83e3e88abe1c63acfb6d94032a0f..0414f48d9a7724df3a2afb92d22d3e4f1b05d97f 100644 (file)
@@ -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 {