diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2016-02-02 15:42:09 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2016-02-05 10:49:58 +0000 |
commit | 278451463f53ddc4fed2c9a104089f17a8c9158f (patch) | |
tree | 7697853ed2b4f05eea786e47ecc90e13ab7bdd04 /css/css.c | |
parent | e42afd9b3215e4711c68bc040bb5ceb1b8f17a44 (diff) | |
download | netsurf-278451463f53ddc4fed2c9a104089f17a8c9158f.tar.gz netsurf-278451463f53ddc4fed2c9a104089f17a8c9158f.tar.bz2 |
Rewrite hints handling to be more efficient.
Now we only look for hints that are actually possible for the
given element. This new way of doing things is made possible
by the new LibCSS API for hints.
This also makes use of the LibDOM HTMLElement tag type to avoid
lots of massive if-else-if ladders of dom_string_caseless_isequal
calls.
Diffstat (limited to 'css/css.c')
-rw-r--r-- | css/css.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -31,6 +31,7 @@ #include "utils/messages.h" #include "css/css.h" +#include "css/hints.h" #include "css/internal.h" /* Define to trace import fetches */ @@ -806,6 +807,7 @@ static void nscss_fini(void) css_stylesheet_destroy(blank_import); blank_import = NULL; } + css_hint_fini(); } static const content_handler css_content_handler = { @@ -832,6 +834,10 @@ nserror nscss_init(void) if (error != NSERROR_OK) goto error; + error = css_hint_init(); + if (error != NSERROR_OK) + goto error; + return NSERROR_OK; error: |