summaryrefslogtreecommitdiff
path: root/content/content.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2020-05-13 19:03:14 +0100
committerVincent Sanders <vince@kyllikki.org>2020-05-13 19:03:14 +0100
commit3a7fc30a5f1c0945c021abf185274e88f72e7080 (patch)
tree2bb5252d22b799cc01ef1ee1858fdcb5473095bf /content/content.c
parent95e0a24fac2abc4cddaa91bf44304ebc3d776b17 (diff)
downloadnetsurf-3a7fc30a5f1c0945c021abf185274e88f72e7080.tar.gz
netsurf-3a7fc30a5f1c0945c021abf185274e88f72e7080.tar.bz2
implement content opacity check through the function table
Diffstat (limited to 'content/content.c')
-rw-r--r--content/content.c15
1 files changed, 3 insertions, 12 deletions
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;
}