Gitweb links:

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

The branch, svenw/cocoa has been updated
       via  4178bb262a94dd4dfd511c07ae5f69ac1c1adc70 (commit)
       via  d884e0e53303c22e747c8d769189e21785b7f753 (commit)
       via  885c5ac91823b2f3d94e72028f603274d5cb3a42 (commit)
       via  470dce645bc9cfca1d438f62a8ffe7a6db80a278 (commit)
       via  89baae16b47fad0dcb50402e9a2ba887b05242c0 (commit)
       via  29e36cdf1a6f4404f804e5c2b46d38dad929416d (commit)
       via  08c275ed2c843441aad23d38646083de7a130753 (commit)
       via  790d30b7888d5818a4e2521aabe2f31f04d59341 (commit)
       via  110cc9fb3e098100a7ed91340a82e351a220bce1 (commit)
       via  7a75ec1576fc2a4f3d445b33b1d9f00e0007643d (commit)
       via  fe45bc1dbea417c2258a22797ace09926b33a481 (commit)
       via  17ae38771df50a81f49eebead84ff8914fb947e4 (commit)
       via  328a29d22f81b838a0a6b2f1d3d5fc4dbfe5e6e7 (commit)
       via  f04cedef1c7742f38b0b561efcd77e0476fcbf60 (commit)
      from  7b4163e0216538823630113ed7534c319e19c385 (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=4178bb262a94dd4dfd511c07ae5f69ac1c1adc70
commit 4178bb262a94dd4dfd511c07ae5f69ac1c1adc70
Merge: 885c5ac d884e0e
Author: Sven Weidauer <[email protected]>
Commit: Sven Weidauer <[email protected]>

    Merge remote-tracking branch 'origin/master' into svenw/cocoa



commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=885c5ac91823b2f3d94e72028f603274d5cb3a42
commit 885c5ac91823b2f3d94e72028f603274d5cb3a42
Merge: 7b4163e 470dce6
Author: Sven Weidauer <[email protected]>
Commit: Sven Weidauer <[email protected]>

    Merge remote-tracking branch 'origin/master' into svenw/cocoa



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

Summary of changes:
 !NetSurf/ChkSprites,ffb               |  Bin 1531 -> 2029 bytes
 content/fs_backing_store.c            |    5 +++
 content/handlers/image/jpeg.c         |   55 ++++++++++++++++++++++++---------
 content/handlers/image/rsvg.c         |   14 +++++++--
 desktop/browser_history.c             |    4 ++-
 docs/env.sh                           |    7 ++++-
 frontends/amiga/gui.c                 |    6 ++--
 frontends/amiga/theme.c               |    4 ++-
 frontends/framebuffer/font_internal.c |    4 +++
 frontends/framebuffer/gui.c           |    3 +-
 frontends/riscos/gui.c                |   13 +++++---
 render/html_object.c                  |   10 ++++++
 12 files changed, 93 insertions(+), 32 deletions(-)

diff --git a/!NetSurf/ChkSprites,ffb b/!NetSurf/ChkSprites,ffb
index 4e7d325..4e38dfb 100644
Binary files a/!NetSurf/ChkSprites,ffb and b/!NetSurf/ChkSprites,ffb differ
diff --git a/content/fs_backing_store.c b/content/fs_backing_store.c
index 1b59ea1..3736cc5 100644
--- a/content/fs_backing_store.c
+++ b/content/fs_backing_store.c
@@ -1565,6 +1565,7 @@ initialise(const struct llcache_store_parameters 
*parameters)
        ret = build_entrymap(newstate);
        if (ret != NSERROR_OK) {
                /* that obviously went well */
+               free(newstate->entries);
                free(newstate->path);
                free(newstate);
                return ret;
@@ -1573,6 +1574,8 @@ initialise(const struct llcache_store_parameters 
*parameters)
        ret = read_blocks(newstate);
        if (ret != NSERROR_OK) {
                /* oh dear */
+               free(newstate->addrmap);
+               free(newstate->entries);
                free(newstate->path);
                free(newstate);
                return ret;
@@ -1640,6 +1643,8 @@ finalise(void)
                              0);
                }
 
+               free(storestate->addrmap);
+               free(storestate->entries);
                free(storestate->path);
                free(storestate);
                storestate = NULL;
diff --git a/content/handlers/image/jpeg.c b/content/handlers/image/jpeg.c
index 44b1c52..123a0bf 100644
--- a/content/handlers/image/jpeg.c
+++ b/content/handlers/image/jpeg.c
@@ -214,7 +214,12 @@ jpeg_cache_convert(struct content *c)
        jpeg_read_header(&cinfo, TRUE);
 
        /* set output processing parameters */
-       cinfo.out_color_space = JCS_RGB;
+       if (cinfo.jpeg_color_space == JCS_CMYK ||
+                       cinfo.jpeg_color_space == JCS_YCCK) {
+               cinfo.out_color_space = JCS_CMYK;
+       } else {
+               cinfo.out_color_space = JCS_RGB;
+       }
        cinfo.dct_method = JDCT_ISLOW;
 
        /* commence the decompression, output parameters now valid */
@@ -248,22 +253,42 @@ jpeg_cache_convert(struct content *c)
                                           rowstride * cinfo.output_scanline);
                jpeg_read_scanlines(&cinfo, scanlines, 1);
 
+               if (cinfo.out_color_space == JCS_CMYK) {
+                       int i;
+                       for (i = width - 1; 0 <= i; i--) {
+                               /* Trivial inverse CMYK -> RGBA */
+                               const int c = scanlines[0][i * 4 + 0];
+                               const int m = scanlines[0][i * 4 + 1];
+                               const int y = scanlines[0][i * 4 + 2];
+                               const int k = scanlines[0][i * 4 + 3];
+
+                               const int ck = c * k;
+                               const int mk = m * k;
+                               const int yk = y * k;
+
+#define DIV255(x) ((x) + 1 + ((x) >> 8)) >> 8
+                               scanlines[0][i * 4 + 0] = DIV255(ck);
+                               scanlines[0][i * 4 + 1] = DIV255(mk);
+                               scanlines[0][i * 4 + 2] = DIV255(yk);
+                               scanlines[0][i * 4 + 3] = 0xff;
+#undef DIV255
+                       }
+               } else {
 #if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4
-{
-               /* Missmatch between configured libjpeg pixel format and
-                * NetSurf pixel format.  Convert to RGBA */
-               int i;
-               for (i = width - 1; 0 <= i; i--) {
-                       int r = scanlines[0][i * RGB_PIXELSIZE + RGB_RED];
-                       int g = scanlines[0][i * RGB_PIXELSIZE + RGB_GREEN];
-                       int b = scanlines[0][i * RGB_PIXELSIZE + RGB_BLUE];
-                       scanlines[0][i * 4 + 0] = r;
-                       scanlines[0][i * 4 + 1] = g;
-                       scanlines[0][i * 4 + 2] = b;
-                       scanlines[0][i * 4 + 3] = 0xff;
-               }
-}
+                       /* Missmatch between configured libjpeg pixel format and
+                        * NetSurf pixel format.  Convert to RGBA */
+                       int i;
+                       for (i = width - 1; 0 <= i; i--) {
+                               int r = scanlines[0][i * RGB_PIXELSIZE + 
RGB_RED];
+                               int g = scanlines[0][i * RGB_PIXELSIZE + 
RGB_GREEN];
+                               int b = scanlines[0][i * RGB_PIXELSIZE + 
RGB_BLUE];
+                               scanlines[0][i * 4 + 0] = r;
+                               scanlines[0][i * 4 + 1] = g;
+                               scanlines[0][i * 4 + 2] = b;
+                               scanlines[0][i * 4 + 3] = 0xff;
+                       }
 #endif
+               }
        } while (cinfo.output_scanline != cinfo.output_height);
        guit->bitmap->modified(bitmap);
 
diff --git a/content/handlers/image/rsvg.c b/content/handlers/image/rsvg.c
index ca2d81e..2ba1b49 100644
--- a/content/handlers/image/rsvg.c
+++ b/content/handlers/image/rsvg.c
@@ -39,6 +39,8 @@
 #include <librsvg/rsvg-cairo.h>
 #endif
 
+#include <nsutils/endian.h>
+
 #include "utils/log.h"
 #include "utils/utils.h"
 #include "utils/messages.h"
@@ -139,15 +141,21 @@ static inline void rsvg_argb_to_abgr(uint8_t *pixels,
                int width, int height, size_t rowstride)
 {
        uint8_t *p = pixels;
+       int boff = 0, roff = 2;
+
+       if (endian_host_is_le() == false) {
+               boff = 1;
+               roff = 3;
+       }
 
        for (int y = 0; y < height; y++) {
                for (int x = 0; x < width; x++) {
                        /* Swap R and B */
-                       const uint8_t r = p[x+3];
+                       const uint8_t r = p[4*x+roff];
 
-                       p[x+3] = p[x];
+                       p[4*x+roff] = p[4*x+boff];
 
-                       p[x] = r;
+                       p[4*x+boff] = r;
                }
 
                p += rowstride;
diff --git a/desktop/browser_history.c b/desktop/browser_history.c
index 6403027..d9db0eb 100644
--- a/desktop/browser_history.c
+++ b/desktop/browser_history.c
@@ -601,7 +601,9 @@ nserror browser_window_history_go(struct browser_window *bw,
                                url, NULL, bw, NULL);
                history->current = current;
        } else {
-               browser_window_history_update(bw, bw->current_content);
+               if (bw->current_content != NULL) {
+                       browser_window_history_update(bw, bw->current_content);
+               }
                history->current = entry;
                error = browser_window_navigate(bw, url, NULL,
                                BW_NAVIGATE_NO_TERMINAL_HISTORY_UPDATE,
diff --git a/docs/env.sh b/docs/env.sh
index bb2cbab..f1c89a8 100644
--- a/docs/env.sh
+++ b/docs/env.sh
@@ -25,7 +25,7 @@
 ###############################################################################
 
 # deb packages for dpkg based systems
-NS_DEV_DEB="build-essential pkg-config git gperf libcurl3-dev libssl-dev 
libpng-dev libjpeg-dev"
+NS_DEV_DEB="build-essential pkg-config git gperf libcurl3-dev libpng-dev 
libjpeg-dev"
 NS_TOOL_DEB="flex bison libhtml-parser-perl"
 if [ "x${NETSURF_GTK_MAJOR}" = "x3" ]; then
     NS_GTK_DEB="libgtk-3-dev librsvg2-dev"
@@ -36,6 +36,11 @@ fi
 # apt get commandline to install necessary dev packages
 ns-apt-get-install()
 {
+    if /usr/bin/apt-cache show libssl1.0-dev >/dev/null 2>&1; then
+        NS_DEV_DEB="${NS_DEV_DEB} libssl1.0-dev"
+    else
+        NS_DEV_DEB="${NS_DEV_DEB} libssl-dev"
+    fi
     sudo apt-get install $(echo ${NS_DEV_DEB} ${NS_TOOL_DEB} ${NS_GTK_DEB})
 }
 
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 8e822f3..e337ede 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -4967,22 +4967,20 @@ void ami_get_hscroll_pos(struct gui_window_2 *gwin, 
ULONG *xs)
        if(gwin->objects[GID_HSCROLL])
        {
                GetAttr(SCROLLER_Top, (Object *)gwin->objects[GID_HSCROLL], xs);
+               *xs /= gwin->gw->scale;
        } else {
                *xs = 0;
        }
-
-       *xs /= gwin->gw->scale;
 }
 
 void ami_get_vscroll_pos(struct gui_window_2 *gwin, ULONG *ys)
 {
        if(gwin->objects[GID_VSCROLL]) {
                GetAttr(SCROLLER_Top, gwin->objects[GID_VSCROLL], ys);
+               *ys /= gwin->gw->scale;
        } else {
                *ys = 0;
        }
-
-       *ys /= gwin->gw->scale;
 }
 
 static bool gui_window_get_scroll(struct gui_window *g, int *restrict sx, int 
*restrict sy)
diff --git a/frontends/amiga/theme.c b/frontends/amiga/theme.c
index 5e4be07..63982c8 100644
--- a/frontends/amiga/theme.c
+++ b/frontends/amiga/theme.c
@@ -54,7 +54,8 @@
 
 static struct BitMap *throbber = NULL;
 static struct bitmap *throbber_nsbm = NULL;
-static int throbber_frames, throbber_update_interval;
+static int throbber_frames = 1;
+static int throbber_update_interval;
 static Object *mouseptrobj[AMI_LASTPOINTER+1];
 static struct BitMap *mouseptrbm[AMI_LASTPOINTER+1];
 
@@ -176,6 +177,7 @@ void ami_theme_throbber_setup(void)
 
        ami_get_theme_filename(throbberfile,"theme_throbber",false);
        throbber_frames=atoi(messages_get("theme_throbber_frames"));
+       if(throbber_frames == 0) throbber_frames = 1;
        throbber_update_interval = atoi(messages_get("theme_throbber_delay"));
        if(throbber_update_interval == 0) throbber_update_interval = 250;
 
diff --git a/frontends/framebuffer/font_internal.c 
b/frontends/framebuffer/font_internal.c
index 3b8a1c4..ff3471d 100644
--- a/frontends/framebuffer/font_internal.c
+++ b/frontends/framebuffer/font_internal.c
@@ -270,6 +270,7 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int 
scale)
                                break;
                        }
                }
+               /* Fall through. */
        case FB_BOLD:
                section = fb_bold_section_table[ucs4 / 256];
                if (section != 0 || ucs4 / 256 == 0) {
@@ -280,6 +281,7 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int 
scale)
                                break;
                        }
                }
+               /* Fall through. */
        case FB_ITALIC:
                section = fb_italic_section_table[ucs4 / 256];
                if (section != 0 || ucs4 / 256 == 0) {
@@ -290,6 +292,7 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int 
scale)
                                break;
                        }
                }
+               /* Fall through. */
        case FB_REGULAR:
                section = fb_regular_section_table[ucs4 / 256];
                if (section != 0 || ucs4 / 256 == 0) {
@@ -300,6 +303,7 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int 
scale)
                                break;
                        }
                }
+               /* Fall through. */
        default:
                glyph_data = get_codepoint(ucs4, style & FB_ITALIC);
                break;
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index e252f25..8bbaedc 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -951,8 +951,7 @@ fb_browser_window_input(fbtk_widget_t *widget, 
fbtk_callback_info *cbi)
                                browser_window_key_press(gw->bw, NS_KEY_REDO);
                                break;
                        }
-                       /* Z or Y pressed but not undo or redo;
-                        * Fall through to default handling */
+                       /* Z or Y pressed but not undo or redo; Fall through */
 
                default:
                        ucs4 = fbtk_keycode_to_ucs4(cbi->event->value.keycode,
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index cfc513f..be1bc8d 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -195,6 +195,7 @@ static struct
 static nsurl *gui_get_resource_url(const char *path)
 {
        static const char base_url[] = "file:///NetSurf:/Resources/";
+       const char *lang;
        size_t path_len, length;
        char *raw;
        nsurl *url = NULL;
@@ -220,8 +221,12 @@ static nsurl *gui_get_resource_url(const char *path)
 
        path_len = strlen(path);
 
+       lang = ro_gui_default_language();
+
        /* Find max URL length */
-       length = SLEN(base_url) + SLEN("xx/") + path_len + 1;
+       length = SLEN(base_url) +
+                       strlen(lang) + 1 + /* <lang> + / */
+                       path_len + 1; /* + NUL */
 
        raw = malloc(length);
        if (raw != NULL) {
@@ -230,13 +235,11 @@ static nsurl *gui_get_resource_url(const char *path)
                ptr += SLEN(base_url);
 
                /* Add language directory to URL, for translated files */
-               /* TODO: handle non-en langauages
-                *       handle non-html translated files */
+               /* TODO: handle non-html translated files */
                if (path_len > SLEN(".html") &&
                                strncmp(path + path_len - SLEN(".html"),
                                        ".html", SLEN(".html")) == 0) {
-                       memcpy(ptr, "en/", SLEN("en/"));
-                       ptr += SLEN("en/");
+                       ptr += sprintf(ptr, "%s/", lang);
                }
 
                /* Add filename to URL */
diff --git a/render/html_object.c b/render/html_object.c
index fb9e7b0..74e4bf0 100644
--- a/render/html_object.c
+++ b/render/html_object.c
@@ -97,6 +97,16 @@ html_object_done(struct box *box,
 
        box->object = object;
 
+       /* Normalise the box type, now it has been replaced. */
+       switch (box->type) {
+       case BOX_TABLE:
+               box->type = BOX_BLOCK;
+               break;
+       default:
+               /* TODO: Any other box types need mapping? */
+               break;
+       }
+
        if (!(box->flags & REPLACE_DIM)) {
                /* invalidate parent min, max widths */
                for (b = box; b; b = b->parent)


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