Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/c38be94bf916908ded74ddfc80f5cbe6ed7324df
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/c38be94bf916908ded74ddfc80f5cbe6ed7324df
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/c38be94bf916908ded74ddfc80f5cbe6ed7324df

The branch, master has been updated
       via  c38be94bf916908ded74ddfc80f5cbe6ed7324df (commit)
      from  3f764b04597e0587fa7bb034c16c9a38401b8002 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=c38be94bf916908ded74ddfc80f5cbe6ed7324df
commit c38be94bf916908ded74ddfc80f5cbe6ed7324df
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    css: Fix blocking of presentational hints for author_level_css=0

diff --git a/content/handlers/css/hints.c b/content/handlers/css/hints.c
index 286befa..145cf81 100644
--- a/content/handlers/css/hints.c
+++ b/content/handlers/css/hints.c
@@ -1587,10 +1587,6 @@ static void css_hint_list(
        dom_exception err;
        dom_string *attr;
 
-       if (nsoption_bool(author_level_css) == false) {
-               return;
-       }
-
        err = dom_element_get_attribute(node, corestring_dom_type, &attr);
        if (err == DOM_NO_ERR && attr != NULL) {
                const char *attr_str = dom_string_data(attr);
@@ -1628,13 +1624,19 @@ static void css_hint_list(
 }
 
 
-/* Exported function, documeted in css/hints.h */
+/* Exported function, documented in css/hints.h */
 css_error node_presentational_hint(void *pw, void *node,
                uint32_t *nhints, css_hint **hints)
 {
        dom_exception exc;
        dom_html_element_type tag_type;
 
+       if (nsoption_bool(author_level_css) == false) {
+               *nhints = 0;
+               *hints = NULL;
+               return CSS_OK;
+       }
+
        css_hint_clean();
 
        exc = dom_html_element_get_tag_type(node, &tag_type);


-----------------------------------------------------------------------

Summary of changes:
 content/handlers/css/hints.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/content/handlers/css/hints.c b/content/handlers/css/hints.c
index 286befa..145cf81 100644
--- a/content/handlers/css/hints.c
+++ b/content/handlers/css/hints.c
@@ -1587,10 +1587,6 @@ static void css_hint_list(
        dom_exception err;
        dom_string *attr;
 
-       if (nsoption_bool(author_level_css) == false) {
-               return;
-       }
-
        err = dom_element_get_attribute(node, corestring_dom_type, &attr);
        if (err == DOM_NO_ERR && attr != NULL) {
                const char *attr_str = dom_string_data(attr);
@@ -1628,13 +1624,19 @@ static void css_hint_list(
 }
 
 
-/* Exported function, documeted in css/hints.h */
+/* Exported function, documented in css/hints.h */
 css_error node_presentational_hint(void *pw, void *node,
                uint32_t *nhints, css_hint **hints)
 {
        dom_exception exc;
        dom_html_element_type tag_type;
 
+       if (nsoption_bool(author_level_css) == false) {
+               *nhints = 0;
+               *hints = NULL;
+               return CSS_OK;
+       }
+
        css_hint_clean();
 
        exc = dom_html_element_get_tag_type(node, &tag_type);


-- 
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to