From 3a7fc30a5f1c0945c021abf185274e88f72e7080 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 13 May 2020 19:03:14 +0100 Subject: implement content opacity check through the function table --- content/content.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'content/content.c') diff --git a/content/content.c b/content/content.c index bc3f48429..f72f3d434 100644 --- a/content/content.c +++ b/content/content.c @@ -33,7 +33,6 @@ #include "netsurf/bitmap.h" #include "netsurf/content.h" #include "desktop/knockout.h" -#include "desktop/gui_internal.h" #include "content/content_protected.h" #include "content/textsearch.h" @@ -1294,21 +1293,13 @@ bool content_get_opaque(hlcache_handle *h) /* exported interface documented in content/content_protected.h */ bool content__get_opaque(struct content *c) { - bool opaque = false; - if ((c != NULL) && (c->handler != NULL) && - (c->handler->type != NULL) && - (c->handler->type() == CONTENT_IMAGE) && - (c->handler->get_internal != NULL) ) { - struct bitmap *bitmap = NULL; - bitmap = c->handler->get_internal(c, NULL); - if (bitmap != NULL) { - opaque = guit->bitmap->get_opaque(bitmap); - } + (c->handler->is_opaque != NULL)) { + return c->handler->is_opaque(c); } - return opaque; + return false; } -- cgit v1.2.3