Gitweb links:

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

The branch, master has been updated
       via  f21c41a2e549e22e523118e8d8f2c881c0f088a7 (commit)
       via  b2f5c80ef82c2e76bd33f58b6454031500c98504 (commit)
      from  19052001541aeac269b846d2a81e7f78e7c26c2d (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=f21c41a2e549e22e523118e8d8f2c881c0f088a7
commit f21c41a2e549e22e523118e8d8f2c881c0f088a7
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    change browser_window_redraw to use unscaled coordinates

diff --git a/content/handlers/html/html_redraw.c 
b/content/handlers/html/html_redraw.c
index d05df87..6216d60 100644
--- a/content/handlers/html/html_redraw.c
+++ b/content/handlers/html/html_redraw.c
@@ -1786,8 +1786,8 @@ bool html_redraw_box(const html_content *html, struct box 
*box,
        } else if (box->iframe) {
                /* Offset is passed to browser window redraw unscaled */
                browser_window_redraw(box->iframe,
-                               (x + padding_left) / scale,
-                               (y + padding_top) / scale, &r, ctx);
+                               x + padding_left,
+                               y + padding_top, &r, ctx);
 
        } else if (box->gadget && box->gadget->type == GADGET_CHECKBOX) {
                if (!html_redraw_checkbox(x + padding_left, y + padding_top,
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index e3eae6c..9d8a5e3 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -1929,6 +1929,9 @@ browser_window_redraw(struct browser_window *bw,
        struct rect content_clip;
        nserror res;
 
+       x /= bw->scale;
+       y /= bw->scale;
+
        if (bw == NULL) {
                NSLOG(netsurf, INFO, "NULL browser window");
                return false;
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 7413739..914187b 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -357,7 +357,6 @@ fb_redraw(fbtk_widget_t *widget,
                .plot = &fb_plotters
        };
        nsfb_t *nsfb = fbtk_get_nsfb(widget);
-       float scale = browser_window_get_scale(bw);
 
        x = fbtk_get_absx(widget);
        y = fbtk_get_absy(widget);
@@ -377,8 +376,8 @@ fb_redraw(fbtk_widget_t *widget,
        clip.y1 = bwidget->redraw_box.y1;
 
        browser_window_redraw(bw,
-                       (x - bwidget->scrollx) / scale,
-                       (y - bwidget->scrolly) / scale,
+                       x - bwidget->scrollx,
+                       y - bwidget->scrolly,
                        &clip, &ctx);
 
        if (fbtk_get_caret(widget, &caret_x, &caret_y, &caret_h)) {
@@ -1861,10 +1860,9 @@ static bool
 gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
 {
        struct browser_widget_s *bwidget = fbtk_get_userpw(g->browser);
-       float scale = browser_window_get_scale(g->bw);
 
-       *sx = bwidget->scrollx / scale;
-       *sy = bwidget->scrolly / scale;
+       *sx = bwidget->scrollx;
+       *sy = bwidget->scrolly;
 
        return true;
 }
@@ -1884,12 +1882,11 @@ static nserror
 gui_window_set_scroll(struct gui_window *gw, const struct rect *rect)
 {
        struct browser_widget_s *bwidget = fbtk_get_userpw(gw->browser);
-       float scale = browser_window_get_scale(gw->bw);
 
        assert(bwidget);
 
-       widget_scroll_x(gw, rect->x0 * scale, true);
-       widget_scroll_y(gw, rect->y0 * scale, true);
+       widget_scroll_x(gw, rect->x0, true);
+       widget_scroll_y(gw, rect->y0, true);
 
        return NSERROR_OK;
 }
diff --git a/frontends/windows/drawable.c b/frontends/windows/drawable.c
index 9383f70..84b11ed 100644
--- a/frontends/windows/drawable.c
+++ b/frontends/windows/drawable.c
@@ -383,8 +383,8 @@ nsws_drawable_paint(struct gui_window *gw, HWND hwnd)
                 */
                
                browser_window_redraw(gw->bw,
-                                     -gw->scrollx / gw->scale,
-                                     -gw->scrolly / gw->scale,
+                                     -gw->scrollx,
+                                     -gw->scrolly,
                                      &clip,
                                      &ctx);
        }
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index b9a0dfc..e1254d8 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -882,8 +882,8 @@ win32_window_invalidate_area(struct gui_window *gw, const 
struct rect *rect)
        if (rect != NULL) {
                redrawrectp = &redrawrect;
 
-               redrawrect.left = (long)rect->x0 - (gw->scrollx / gw->scale);
-               redrawrect.top = (long)rect->y0 - (gw->scrolly / gw->scale);
+               redrawrect.left = (long)rect->x0 - gw->scrollx;
+               redrawrect.top = (long)rect->y0 - gw->scrolly;
                redrawrect.right =(long)rect->x1;
                redrawrect.bottom = (long)rect->y1;
 
@@ -1417,7 +1417,6 @@ win32_window_create(struct browser_window *bw,
 
        gw->width = 800;
        gw->height = 600;
-       gw->scale = 1.0;
        gw->toolbuttonsize = 24;
        gw->requestscrollx = 0;
        gw->requestscrolly = 0;
@@ -1609,9 +1608,8 @@ win32_window_place_caret(struct gui_window *w, int x, int 
y,
                return;
        }
 
-       CreateCaret(w->drawingarea, (HBITMAP)NULL, 1, height * w->scale);
-       SetCaretPos(x * w->scale - w->scrollx,
-                   y * w->scale - w->scrolly);
+       CreateCaret(w->drawingarea, (HBITMAP)NULL, 1, height );
+       SetCaretPos(x - w->scrollx, y  - w->scrolly);
        ShowCaret(w->drawingarea);
 }
 
diff --git a/frontends/windows/window.h b/frontends/windows/window.h
index c887ed5..80f5f27 100644
--- a/frontends/windows/window.h
+++ b/frontends/windows/window.h
@@ -62,8 +62,6 @@ struct gui_window {
 
        HACCEL acceltable; /**< accelerators */
 
-       float scale; /**< scale of content */
-
        int scrollx; /**< current scroll location */
        int scrolly; /**< current scroll location */
 


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=b2f5c80ef82c2e76bd33f58b6454031500c98504
commit b2f5c80ef82c2e76bd33f58b6454031500c98504
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    trivial documentation cleanups

diff --git a/desktop/searchweb.c b/desktop/searchweb.c
index fed6f3e..c934ff4 100644
--- a/desktop/searchweb.c
+++ b/desktop/searchweb.c
@@ -17,7 +17,7 @@
  */
 
 /**
- * \file desktop/searchweb.c
+ * \file
  * \brief core web search facilities implementation.
  */
 
diff --git a/frontends/windows/window.h b/frontends/windows/window.h
index 3cdb9ae..c887ed5 100644
--- a/frontends/windows/window.h
+++ b/frontends/windows/window.h
@@ -16,8 +16,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _NETSURF_WINDOWS_WINDOW_H_
-#define _NETSURF_WINDOWS_WINDOW_H_
+#ifndef NETSURF_WINDOWS_WINDOW_H_
+#define NETSURF_WINDOWS_WINDOW_H_
 
 /** The window operation function table for win32 */
 extern struct gui_window_table *win32_window_table;


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

Summary of changes:
 content/handlers/html/html_redraw.c |    4 ++--
 desktop/browser_window.c            |    3 +++
 desktop/searchweb.c                 |    2 +-
 frontends/framebuffer/gui.c         |   15 ++++++---------
 frontends/windows/drawable.c        |    4 ++--
 frontends/windows/window.c          |   10 ++++------
 frontends/windows/window.h          |    6 ++----
 7 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/content/handlers/html/html_redraw.c 
b/content/handlers/html/html_redraw.c
index d05df87..6216d60 100644
--- a/content/handlers/html/html_redraw.c
+++ b/content/handlers/html/html_redraw.c
@@ -1786,8 +1786,8 @@ bool html_redraw_box(const html_content *html, struct box 
*box,
        } else if (box->iframe) {
                /* Offset is passed to browser window redraw unscaled */
                browser_window_redraw(box->iframe,
-                               (x + padding_left) / scale,
-                               (y + padding_top) / scale, &r, ctx);
+                               x + padding_left,
+                               y + padding_top, &r, ctx);
 
        } else if (box->gadget && box->gadget->type == GADGET_CHECKBOX) {
                if (!html_redraw_checkbox(x + padding_left, y + padding_top,
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index e3eae6c..9d8a5e3 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -1929,6 +1929,9 @@ browser_window_redraw(struct browser_window *bw,
        struct rect content_clip;
        nserror res;
 
+       x /= bw->scale;
+       y /= bw->scale;
+
        if (bw == NULL) {
                NSLOG(netsurf, INFO, "NULL browser window");
                return false;
diff --git a/desktop/searchweb.c b/desktop/searchweb.c
index fed6f3e..c934ff4 100644
--- a/desktop/searchweb.c
+++ b/desktop/searchweb.c
@@ -17,7 +17,7 @@
  */
 
 /**
- * \file desktop/searchweb.c
+ * \file
  * \brief core web search facilities implementation.
  */
 
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 7413739..914187b 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -357,7 +357,6 @@ fb_redraw(fbtk_widget_t *widget,
                .plot = &fb_plotters
        };
        nsfb_t *nsfb = fbtk_get_nsfb(widget);
-       float scale = browser_window_get_scale(bw);
 
        x = fbtk_get_absx(widget);
        y = fbtk_get_absy(widget);
@@ -377,8 +376,8 @@ fb_redraw(fbtk_widget_t *widget,
        clip.y1 = bwidget->redraw_box.y1;
 
        browser_window_redraw(bw,
-                       (x - bwidget->scrollx) / scale,
-                       (y - bwidget->scrolly) / scale,
+                       x - bwidget->scrollx,
+                       y - bwidget->scrolly,
                        &clip, &ctx);
 
        if (fbtk_get_caret(widget, &caret_x, &caret_y, &caret_h)) {
@@ -1861,10 +1860,9 @@ static bool
 gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
 {
        struct browser_widget_s *bwidget = fbtk_get_userpw(g->browser);
-       float scale = browser_window_get_scale(g->bw);
 
-       *sx = bwidget->scrollx / scale;
-       *sy = bwidget->scrolly / scale;
+       *sx = bwidget->scrollx;
+       *sy = bwidget->scrolly;
 
        return true;
 }
@@ -1884,12 +1882,11 @@ static nserror
 gui_window_set_scroll(struct gui_window *gw, const struct rect *rect)
 {
        struct browser_widget_s *bwidget = fbtk_get_userpw(gw->browser);
-       float scale = browser_window_get_scale(gw->bw);
 
        assert(bwidget);
 
-       widget_scroll_x(gw, rect->x0 * scale, true);
-       widget_scroll_y(gw, rect->y0 * scale, true);
+       widget_scroll_x(gw, rect->x0, true);
+       widget_scroll_y(gw, rect->y0, true);
 
        return NSERROR_OK;
 }
diff --git a/frontends/windows/drawable.c b/frontends/windows/drawable.c
index 9383f70..84b11ed 100644
--- a/frontends/windows/drawable.c
+++ b/frontends/windows/drawable.c
@@ -383,8 +383,8 @@ nsws_drawable_paint(struct gui_window *gw, HWND hwnd)
                 */
                
                browser_window_redraw(gw->bw,
-                                     -gw->scrollx / gw->scale,
-                                     -gw->scrolly / gw->scale,
+                                     -gw->scrollx,
+                                     -gw->scrolly,
                                      &clip,
                                      &ctx);
        }
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index b9a0dfc..e1254d8 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -882,8 +882,8 @@ win32_window_invalidate_area(struct gui_window *gw, const 
struct rect *rect)
        if (rect != NULL) {
                redrawrectp = &redrawrect;
 
-               redrawrect.left = (long)rect->x0 - (gw->scrollx / gw->scale);
-               redrawrect.top = (long)rect->y0 - (gw->scrolly / gw->scale);
+               redrawrect.left = (long)rect->x0 - gw->scrollx;
+               redrawrect.top = (long)rect->y0 - gw->scrolly;
                redrawrect.right =(long)rect->x1;
                redrawrect.bottom = (long)rect->y1;
 
@@ -1417,7 +1417,6 @@ win32_window_create(struct browser_window *bw,
 
        gw->width = 800;
        gw->height = 600;
-       gw->scale = 1.0;
        gw->toolbuttonsize = 24;
        gw->requestscrollx = 0;
        gw->requestscrolly = 0;
@@ -1609,9 +1608,8 @@ win32_window_place_caret(struct gui_window *w, int x, int 
y,
                return;
        }
 
-       CreateCaret(w->drawingarea, (HBITMAP)NULL, 1, height * w->scale);
-       SetCaretPos(x * w->scale - w->scrollx,
-                   y * w->scale - w->scrolly);
+       CreateCaret(w->drawingarea, (HBITMAP)NULL, 1, height );
+       SetCaretPos(x - w->scrollx, y  - w->scrolly);
        ShowCaret(w->drawingarea);
 }
 
diff --git a/frontends/windows/window.h b/frontends/windows/window.h
index 3cdb9ae..80f5f27 100644
--- a/frontends/windows/window.h
+++ b/frontends/windows/window.h
@@ -16,8 +16,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _NETSURF_WINDOWS_WINDOW_H_
-#define _NETSURF_WINDOWS_WINDOW_H_
+#ifndef NETSURF_WINDOWS_WINDOW_H_
+#define NETSURF_WINDOWS_WINDOW_H_
 
 /** The window operation function table for win32 */
 extern struct gui_window_table *win32_window_table;
@@ -62,8 +62,6 @@ struct gui_window {
 
        HACCEL acceltable; /**< accelerators */
 
-       float scale; /**< scale of content */
-
        int scrollx; /**< current scroll location */
        int scrolly; /**< current scroll location */
 


-- 
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