Gitweb links:

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

The branch, master has been updated
       via  920041a13103b0b207da56d2cb9d16c9ebcaba65 (commit)
      from  598629c7369c717f76f52436c27863c073e0e2c8 (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=920041a13103b0b207da56d2cb9d16c9ebcaba65
commit 920041a13103b0b207da56d2cb9d16c9ebcaba65
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    html: layout: Fix to ignore non-element children of lists.

diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c
index 94cdf8f..082e537 100644
--- a/content/handlers/html/layout.c
+++ b/content/handlers/html/layout.c
@@ -4426,15 +4426,22 @@ layout__check_element_type(
                const dom_node *node,
                dom_html_element_type type)
 {
-       dom_html_element_type node_type;
+       dom_html_element_type element_type;
+       dom_node_type node_type;
        dom_exception exc;
 
-       exc = dom_html_element_get_tag_type(node, &node_type);
+       exc = dom_node_get_node_type(node, &node_type);
+       if (exc != DOM_NO_ERR ||
+           node_type != DOM_ELEMENT_NODE) {
+               return false;
+       }
+
+       exc = dom_html_element_get_tag_type(node, &element_type);
        if (exc != DOM_NO_ERR) {
                return false;
        }
 
-       return node_type == type;
+       return element_type == type;
 }
 
 


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

Summary of changes:
 content/handlers/html/layout.c |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c
index 94cdf8f..082e537 100644
--- a/content/handlers/html/layout.c
+++ b/content/handlers/html/layout.c
@@ -4426,15 +4426,22 @@ layout__check_element_type(
                const dom_node *node,
                dom_html_element_type type)
 {
-       dom_html_element_type node_type;
+       dom_html_element_type element_type;
+       dom_node_type node_type;
        dom_exception exc;
 
-       exc = dom_html_element_get_tag_type(node, &node_type);
+       exc = dom_node_get_node_type(node, &node_type);
+       if (exc != DOM_NO_ERR ||
+           node_type != DOM_ELEMENT_NODE) {
+               return false;
+       }
+
+       exc = dom_html_element_get_tag_type(node, &element_type);
        if (exc != DOM_NO_ERR) {
                return false;
        }
 
-       return node_type == type;
+       return element_type == type;
 }
 
 


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

Reply via email to