Gitweb links:

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

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

    HTML redraw: Don't render scrollbars when the CSS doesn't permit it.

diff --git a/content/handlers/html/html_redraw.c 
b/content/handlers/html/html_redraw.c
index 268bd62..0d2f6b5 100644
--- a/content/handlers/html/html_redraw.c
+++ b/content/handlers/html/html_redraw.c
@@ -1224,7 +1224,6 @@ bool html_redraw_box(const html_content *html, struct box 
*box,
        struct rect rect;
        int x_scrolled, y_scrolled;
        struct box *bg_box = NULL;
-       bool has_x_scroll, has_y_scroll;
        css_computed_clip_rect css_rect;
        enum css_overflow_e overflow_x = CSS_OVERFLOW_VISIBLE;
        enum css_overflow_e overflow_y = CSS_OVERFLOW_VISIBLE;
@@ -1849,9 +1848,13 @@ bool html_redraw_box(const html_content *html, struct 
box *box,
             (box->object && content_get_type(box->object) ==
              CONTENT_HTML)) && box->parent != NULL) {
                nserror res;
+               bool has_x_scroll = (overflow_x == CSS_OVERFLOW_SCROLL);
+               bool has_y_scroll = (overflow_y == CSS_OVERFLOW_SCROLL);
 
-               has_x_scroll = box_hscrollbar_present(box);
-               has_y_scroll = box_vscrollbar_present(box);
+               has_x_scroll |= (overflow_x == CSS_OVERFLOW_AUTO) &&
+                               box_hscrollbar_present(box);
+               has_y_scroll |= (overflow_y == CSS_OVERFLOW_AUTO) &&
+                               box_vscrollbar_present(box);
 
                res = box_handle_scrollbars((struct content *)html,
                                            box, has_x_scroll, has_y_scroll);


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

Summary of changes:
 content/handlers/html/html_redraw.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/content/handlers/html/html_redraw.c 
b/content/handlers/html/html_redraw.c
index 268bd62..0d2f6b5 100644
--- a/content/handlers/html/html_redraw.c
+++ b/content/handlers/html/html_redraw.c
@@ -1224,7 +1224,6 @@ bool html_redraw_box(const html_content *html, struct box 
*box,
        struct rect rect;
        int x_scrolled, y_scrolled;
        struct box *bg_box = NULL;
-       bool has_x_scroll, has_y_scroll;
        css_computed_clip_rect css_rect;
        enum css_overflow_e overflow_x = CSS_OVERFLOW_VISIBLE;
        enum css_overflow_e overflow_y = CSS_OVERFLOW_VISIBLE;
@@ -1849,9 +1848,13 @@ bool html_redraw_box(const html_content *html, struct 
box *box,
             (box->object && content_get_type(box->object) ==
              CONTENT_HTML)) && box->parent != NULL) {
                nserror res;
+               bool has_x_scroll = (overflow_x == CSS_OVERFLOW_SCROLL);
+               bool has_y_scroll = (overflow_y == CSS_OVERFLOW_SCROLL);
 
-               has_x_scroll = box_hscrollbar_present(box);
-               has_y_scroll = box_vscrollbar_present(box);
+               has_x_scroll |= (overflow_x == CSS_OVERFLOW_AUTO) &&
+                               box_hscrollbar_present(box);
+               has_y_scroll |= (overflow_y == CSS_OVERFLOW_AUTO) &&
+                               box_vscrollbar_present(box);
 
                res = box_handle_scrollbars((struct content *)html,
                                            box, has_x_scroll, has_y_scroll);


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to