Gitweb links:

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

The branch, master has been updated
       via  8924f0c7f97103a27576ca1a09b7272da2af0c04 (commit)
       via  2b8501b342dc9ac7c3e886c2c93ef73c326392c7 (commit)
       via  860fbc2f8c09339213c79d815dce0f67b51f4348 (commit)
      from  53d07a8e462488891f248571fd27b00197790bf7 (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=8924f0c7f97103a27576ca1a09b7272da2af0c04
commit 8924f0c7f97103a27576ca1a09b7272da2af0c04
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    fix warnings in amiga stringview

diff --git a/frontends/amiga/stringview/stringview.c 
b/frontends/amiga/stringview/stringview.c
index 245782b..60c694a 100755
--- a/frontends/amiga/stringview/stringview.c
+++ b/frontends/amiga/stringview/stringview.c
@@ -161,7 +161,7 @@ static uint32 myStringSearch( Class *cl, Object *obj )
        if(searchString)
        {
                searchString += 3;
-               if (bufpos >= searchString - data->SearchBuffer)
+               if (bufpos >= (uint32)(searchString - data->SearchBuffer))
                        bufpos -= searchString - data->SearchBuffer;
        }
        else
@@ -848,7 +848,7 @@ Class *MakeStringClass( void )
 
        if ( cl )
        {
-               cl->cl_Dispatcher.h_Entry = 
(uint32(*)())myStringClassDispatcher;
+               cl->cl_Dispatcher.h_Entry = 
(uint32(*)(void))myStringClassDispatcher;
        }
 
     URLHistory_Init();


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

    fix incorrect content handler function table operations return types

diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c
index 99ccffe..a9fe809 100644
--- a/frontends/amiga/dt_anim.c
+++ b/frontends/amiga/dt_anim.c
@@ -74,9 +74,9 @@ static void amiga_dt_anim_destroy(struct content *c);
 static bool amiga_dt_anim_redraw(struct content *c,
                struct content_redraw_data *data, const struct rect *clip,
                const struct redraw_context *ctx);
-static void amiga_dt_anim_open(struct content *c, struct browser_window *bw,
+static nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw,
                struct content *page, struct object_params *params);
-static void amiga_dt_anim_close(struct content *c);
+static nserror amiga_dt_anim_close(struct content *c);
 static nserror amiga_dt_anim_clone(const struct content *old, struct content 
**newc);
 static content_type amiga_dt_anim_content_type(void);
 
@@ -290,18 +290,18 @@ bool amiga_dt_anim_redraw(struct content *c,
  * \param  box     box containing c, or 0 if not an object
  * \param  params  object parameters, or 0 if not an object
  */
-void amiga_dt_anim_open(struct content *c, struct browser_window *bw,
+nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw,
        struct content *page, struct object_params *params)
 {
        NSLOG(netsurf, INFO, "amiga_dt_anim_open");
 
-       return;
+       return NSERROR_OK;
 }
 
-void amiga_dt_anim_close(struct content *c)
+nserror amiga_dt_anim_close(struct content *c)
 {
        NSLOG(netsurf, INFO, "amiga_dt_anim_close");
-       return;
+       return NSERROR_OK;
 }
 
 void amiga_dt_anim_reformat(struct content *c, int width, int height)
diff --git a/frontends/amiga/dt_sound.c b/frontends/amiga/dt_sound.c
index e008103..8b63d6a 100644
--- a/frontends/amiga/dt_sound.c
+++ b/frontends/amiga/dt_sound.c
@@ -58,7 +58,7 @@ static void amiga_dt_sound_destroy(struct content *c);
 static bool amiga_dt_sound_redraw(struct content *c,
                struct content_redraw_data *data, const struct rect *clip,
                const struct redraw_context *ctx);
-static void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
+static nserror amiga_dt_sound_open(struct content *c, struct browser_window 
*bw,
                struct content *page, struct object_params *params);
 static nserror amiga_dt_sound_clone(const struct content *old, struct content 
**newc);
 static content_type amiga_dt_sound_content_type(void);
@@ -221,7 +221,7 @@ bool amiga_dt_sound_redraw(struct content *c,
 }
 
 
-void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
+nserror amiga_dt_sound_open(struct content *c, struct browser_window *bw,
        struct content *page, struct object_params *params)
 {
        amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c;
@@ -248,7 +248,7 @@ void amiga_dt_sound_open(struct content *c, struct 
browser_window *bw,
        if(plugin->dto && (plugin->immediate == true))
                amiga_dt_sound_play(plugin->dto);
 
-       return;
+       return NSERROR_OK;
 }
 
 
diff --git a/frontends/amiga/plugin_hack.c b/frontends/amiga/plugin_hack.c
index fa75bd9..a775936 100644
--- a/frontends/amiga/plugin_hack.c
+++ b/frontends/amiga/plugin_hack.c
@@ -53,9 +53,9 @@ static void amiga_plugin_hack_destroy(struct content *c);
 static bool amiga_plugin_hack_redraw(struct content *c,
                struct content_redraw_data *data, const struct rect *clip,
                const struct redraw_context *ctx);
-static void amiga_plugin_hack_open(struct content *c, struct browser_window 
*bw,
+static nserror amiga_plugin_hack_open(struct content *c, struct browser_window 
*bw,
                struct content *page, struct object_params *params);
-static void amiga_plugin_hack_close(struct content *c);
+static nserror amiga_plugin_hack_close(struct content *c);
 static nserror amiga_plugin_hack_clone(const struct content *old, struct 
content **newc);
 static content_type amiga_plugin_hack_content_type(void);
 
@@ -186,7 +186,7 @@ bool amiga_plugin_hack_redraw(struct content *c,
  *                 object within a page
  * \param  params  object parameters, or 0 if not an object
  */
-void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
+nserror amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
        struct content *page, struct object_params *params)
 {
        NSLOG(netsurf, INFO, "amiga_plugin_hack_open %s",
@@ -199,13 +199,13 @@ void amiga_plugin_hack_open(struct content *c, struct 
browser_window *bw,
                c->height = 0;
        }
 
-       return;
+       return NSERROR_OK;
 }
 
-void amiga_plugin_hack_close(struct content *c)
+nserror amiga_plugin_hack_close(struct content *c)
 {
        NSLOG(netsurf, INFO, "amiga_plugin_hack_close");
-       return;
+       return NSERROR_OK;
 }
 
 void amiga_plugin_hack_reformat(struct content *c, int width, int height)


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

    make browser_window_update internal to browser window as intended

diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 096b944..7bc5cc5 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -709,6 +709,129 @@ browser_window_convert_to_download(struct browser_window 
*bw,
 
 
 /**
+ * scroll to a fragment if present
+ *
+ * \param bw browser window
+ * \return true if the scroll was sucessful
+ */
+static bool frag_scroll(struct browser_window *bw)
+{
+       struct rect rect;
+
+       if (bw->frag_id == NULL) {
+               return false;
+       }
+
+       if (!html_get_id_offset(bw->current_content,
+                               bw->frag_id,
+                               &rect.x0,
+                               &rect.y0)) {
+               return false;
+       }
+
+       rect.x1 = rect.x0;
+       rect.y1 = rect.y0;
+       if (browser_window_set_scroll(bw, &rect) == NSERROR_OK) {
+               if (bw->current_content != NULL &&
+                   bw->history != NULL &&
+                   bw->history->current != NULL) {
+                       browser_window_history_update(bw, bw->current_content);
+               }
+               return true;
+       }
+       return false;
+}
+
+
+/**
+ * Redraw browser window, set extent to content, and update title.
+ *
+ * \param  bw            browser_window
+ * \param  scroll_to_top  move view to top of page
+ */
+static void browser_window_update(struct browser_window *bw, bool 
scroll_to_top)
+{
+       static const struct rect zrect = {
+               .x0 = 0,
+               .y0 = 0,
+               .x1 = 0,
+               .y1 = 0
+       };
+
+       if (bw->current_content == NULL) {
+               return;
+       }
+
+       switch (bw->browser_window_type) {
+
+       case BROWSER_WINDOW_NORMAL:
+               /* Root browser window, constituting a front end window/tab */
+               guit->window->set_title(bw->window,
+                                       content_get_title(bw->current_content));
+
+               browser_window_update_extent(bw);
+
+               /* if frag_id exists, then try to scroll to it */
+               /** @todo don't do this if the user has scrolled */
+               if (!frag_scroll(bw)) {
+                       if (scroll_to_top) {
+                               browser_window_set_scroll(bw, &zrect);
+                       }
+               }
+
+               guit->window->invalidate(bw->window, NULL);
+
+               break;
+
+       case BROWSER_WINDOW_IFRAME:
+               /* Internal iframe browser window */
+               assert(bw->parent != NULL);
+               assert(bw->parent->current_content != NULL);
+
+               browser_window_update_extent(bw);
+
+               if (scroll_to_top) {
+                       browser_window_set_scroll(bw, &zrect);
+               }
+
+               /* if frag_id exists, then try to scroll to it */
+               /** @todo don't do this if the user has scrolled */
+               frag_scroll(bw);
+
+               html_redraw_a_box(bw->parent->current_content, bw->box);
+               break;
+
+       case BROWSER_WINDOW_FRAME:
+               {
+                       struct rect rect;
+                       browser_window_update_extent(bw);
+
+                       if (scroll_to_top) {
+                               browser_window_set_scroll(bw, &zrect);
+                       }
+
+                       /* if frag_id exists, then try to scroll to it */
+                       /** @todo don't do this if the user has scrolled */
+                       frag_scroll(bw);
+
+                       rect.x0 = scrollbar_get_offset(bw->scroll_x);
+                       rect.y0 = scrollbar_get_offset(bw->scroll_y);
+                       rect.x1 = rect.x0 + bw->width;
+                       rect.y1 = rect.y0 + bw->height;
+
+                       browser_window_invalidate_rect(bw, &rect);
+               }
+               break;
+
+       default:
+       case BROWSER_WINDOW_FRAMESET:
+               /* Nothing to do */
+               break;
+       }
+}
+
+
+/**
  * handle message for content ready on browser window
  */
 static nserror browser_window_content_ready(struct browser_window *bw)
@@ -1837,41 +1960,6 @@ static void browser_window_destroy_internal(struct 
browser_window *bw)
 
 
 /**
- * scroll to a fragment if present
- *
- * \param bw browser window
- * \return true if the scroll was sucessful
- */
-static bool frag_scroll(struct browser_window *bw)
-{
-       struct rect rect;
-
-       if (bw->frag_id == NULL) {
-               return false;
-       }
-
-       if (!html_get_id_offset(bw->current_content,
-                               bw->frag_id,
-                               &rect.x0,
-                               &rect.y0)) {
-               return false;
-       }
-
-       rect.x1 = rect.x0;
-       rect.y1 = rect.y0;
-       if (browser_window_set_scroll(bw, &rect) == NSERROR_OK) {
-               if (bw->current_content != NULL &&
-                   bw->history != NULL &&
-                   bw->history->current != NULL) {
-                       browser_window_history_update(bw, bw->current_content);
-               }
-               return true;
-       }
-       return false;
-}
-
-
-/**
  * Set browser window scale.
  *
  * \param bw Browser window.
@@ -2589,7 +2677,7 @@ browser_window_redraw(struct browser_window *bw,
                        /* Set current child */
                        child = &bw->children[cur_child];
 
-                       /* Get frame edge box in global coordinates */
+                       /* Get frame edge area in global coordinates */
                        content_clip.x0 = (x + child->x) * child->scale;
                        content_clip.y0 = (y + child->y) * child->scale;
                        content_clip.x1 = content_clip.x0 +
@@ -3994,89 +4082,6 @@ browser_window_set_dimensions(struct browser_window *bw, 
int width, int height)
 }
 
 
-/* Exported interface, documented in netsurf/browser_window.h */
-void browser_window_update(struct browser_window *bw, bool scroll_to_top)
-{
-       static const struct rect zrect = {
-               .x0 = 0,
-               .y0 = 0,
-               .x1 = 0,
-               .y1 = 0
-       };
-
-       if (bw->current_content == NULL) {
-               return;
-       }
-
-       switch (bw->browser_window_type) {
-
-       case BROWSER_WINDOW_NORMAL:
-               /* Root browser window, constituting a front end window/tab */
-               guit->window->set_title(bw->window,
-                                       content_get_title(bw->current_content));
-
-               browser_window_update_extent(bw);
-
-               /* if frag_id exists, then try to scroll to it */
-               /** @todo don't do this if the user has scrolled */
-               if (!frag_scroll(bw)) {
-                       if (scroll_to_top) {
-                               browser_window_set_scroll(bw, &zrect);
-                       }
-               }
-
-               guit->window->invalidate(bw->window, NULL);
-
-               break;
-
-       case BROWSER_WINDOW_IFRAME:
-               /* Internal iframe browser window */
-               assert(bw->parent != NULL);
-               assert(bw->parent->current_content != NULL);
-
-               browser_window_update_extent(bw);
-
-               if (scroll_to_top) {
-                       browser_window_set_scroll(bw, &zrect);
-               }
-
-               /* if frag_id exists, then try to scroll to it */
-               /** @todo don't do this if the user has scrolled */
-               frag_scroll(bw);
-
-               html_redraw_a_box(bw->parent->current_content, bw->box);
-               break;
-
-       case BROWSER_WINDOW_FRAME:
-               {
-                       struct rect rect;
-                       browser_window_update_extent(bw);
-
-                       if (scroll_to_top) {
-                               browser_window_set_scroll(bw, &zrect);
-                       }
-
-                       /* if frag_id exists, then try to scroll to it */
-                       /** @todo don't do this if the user has scrolled */
-                       frag_scroll(bw);
-
-                       rect.x0 = scrollbar_get_offset(bw->scroll_x);
-                       rect.y0 = scrollbar_get_offset(bw->scroll_y);
-                       rect.x1 = rect.x0 + bw->width;
-                       rect.y1 = rect.y0 + bw->height;
-
-                       browser_window_invalidate_rect(bw, &rect);
-               }
-               break;
-
-       default:
-       case BROWSER_WINDOW_FRAMESET:
-               /* Nothing to do */
-               break;
-       }
-}
-
-
 /* Exported interface, documented in browser/browser_private.h */
 nserror
 browser_window_invalidate_rect(struct browser_window *bw, struct rect *rect)
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 673f751..36ee756 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -3596,6 +3596,135 @@ static void ami_change_tab(struct gui_window_2 *gwin, 
int direction)
        ami_switch_tab(gwin, true);
 }
 
+
+static void gui_window_set_title(struct gui_window *g, const char *restrict 
title)
+{
+       struct Node *node;
+       char *restrict utf8title;
+
+       if(!g) return;
+       if(!title) return;
+
+       utf8title = ami_utf8_easy((char *)title);
+
+       if(g->tab_node) {
+               node = g->tab_node;
+
+               if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle)))
+               {
+                       SetGadgetAttrs((struct Gadget 
*)g->shared->objects[GID_TABS],
+                                                       g->shared->win, NULL,
+                                                       CLICKTAB_Labels, ~0,
+                                                       TAG_DONE);
+
+                       if(g->tabtitle) free(g->tabtitle);
+                       g->tabtitle = strdup(utf8title);
+
+                       SetClickTabNodeAttrs(node, TNA_Text, g->tabtitle,
+                                                       TNA_HintInfo, 
g->tabtitle,
+                                                       TAG_DONE);
+
+                       RefreshSetGadgetAttrs((struct Gadget 
*)g->shared->objects[GID_TABS],
+                                                               g->shared->win, 
NULL,
+                                                               
CLICKTAB_Labels, &g->shared->tab_list,
+                                                               TAG_DONE);
+
+                       if(ClickTabBase->lib_Version < 53)
+                               RethinkLayout((struct Gadget 
*)g->shared->objects[GID_TABLAYOUT],
+                                       g->shared->win, NULL, TRUE);
+               }
+       }
+
+       if(g == g->shared->gw) {
+               if((g->shared->wintitle == NULL) || (strcmp(utf8title, 
g->shared->wintitle)))
+               {
+                       if(g->shared->wintitle) free(g->shared->wintitle);
+                       g->shared->wintitle = strdup(utf8title);
+                       SetWindowTitles(g->shared->win, g->shared->wintitle, 
ami_gui_get_screen_title());
+               }
+       }
+
+       ami_utf8_free(utf8title);
+}
+
+static void gui_window_update_extent(struct gui_window *g)
+{
+       struct IBox *bbox;
+
+       if(!g || !g->bw) return;
+       if(browser_window_has_content(g->bw) == false) return;
+
+       if(g == g->shared->gw) {
+               int width, height;
+               if(ami_gui_get_space_box((Object 
*)g->shared->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
+                       amiga_warn_user("NoMemory", "");
+                       return;
+               }
+
+               if(g->shared->objects[GID_VSCROLL]) {
+                       browser_window_get_extents(g->bw, true, &width, 
&height);
+                       RefreshSetGadgetAttrs((struct Gadget 
*)(APTR)g->shared->objects[GID_VSCROLL],g->shared->win,NULL,
+                               SCROLLER_Total, (ULONG)(height),
+                               SCROLLER_Visible, bbox->Height,
+                       TAG_DONE);
+               }
+
+               if(g->shared->objects[GID_HSCROLL])
+               {
+                       browser_window_get_extents(g->bw, true, &width, 
&height);
+                       RefreshSetGadgetAttrs((struct Gadget 
*)(APTR)g->shared->objects[GID_HSCROLL],
+                               g->shared->win, NULL,
+                               SCROLLER_Total, (ULONG)(width),
+                               SCROLLER_Visible, bbox->Width,
+                               TAG_DONE);
+               }
+
+               ami_gui_free_space_box(bbox);
+       }
+
+       ami_gui_scroller_update(g->shared);
+       g->shared->new_content = true;
+}
+
+
+/**
+ * Invalidates an area of an amiga browser window
+ *
+ * \param g gui_window
+ * \param rect area to redraw or NULL for the entire window area
+ * \return NSERROR_OK on success or appropriate error code
+ */
+static nserror amiga_window_invalidate_area(struct gui_window *g,
+                                           const struct rect *restrict rect)
+{
+       struct nsObject *nsobj;
+       struct rect *restrict deferred_rect;
+
+       if(!g) return NSERROR_BAD_PARAMETER;
+
+       if (rect == NULL) {
+               if (g != g->shared->gw) {
+                       return NSERROR_OK;
+               }
+       } else {
+               if (ami_gui_window_update_box_deferred_check(g->deferred_rects, 
rect,
+                                                           
g->deferred_rects_pool)) {
+                       deferred_rect = 
ami_memory_itempool_alloc(g->deferred_rects_pool,
+                                                                 sizeof(struct 
rect));
+                       CopyMem(rect, deferred_rect, sizeof(struct rect));
+                       nsobj = AddObject(g->deferred_rects, AMINS_RECT);
+                       nsobj->objstruct = deferred_rect;
+               } else {
+                       NSLOG(netsurf, INFO,
+                             "Ignoring duplicate or subset of queued box 
redraw");
+               }
+       }
+       ami_schedule_redraw(g->shared, false);
+
+       return NSERROR_OK;
+}
+
+
 static void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
 {
        struct Node *tabnode;
@@ -3641,7 +3770,10 @@ static void ami_switch_tab(struct gui_window_2 *gwin, 
bool redraw)
                struct rect rect;
 
                ami_plot_clear_bbox(gwin->win->RPort, bbox);
-               browser_window_update(gwin->gw->bw, false);
+               gui_window_set_title(gwin->gw,
+                                    browser_window_get_title(gwin->gw->bw));
+               gui_window_update_extent(gwin->gw);
+               amiga_window_invalidate_area(gwin->gw, NULL);
 
                rect.x0 = rect.x1 = gwin->gw->scrollx;
                rect.y0 = rect.y1 = gwin->gw->scrolly;
@@ -4148,7 +4280,12 @@ static void ami_toggletabbar(struct gui_window_2 *gwin, 
bool show)
        RethinkLayout((struct Gadget *)gwin->objects[GID_MAIN],
                        gwin->win, NULL, TRUE);
 
-       if(gwin->gw && gwin->gw->bw) browser_window_update(gwin->gw->bw, false);
+       if (gwin->gw && gwin->gw->bw) {
+               gui_window_set_title(gwin->gw,
+                                    browser_window_get_title(gwin->gw->bw));
+               gui_window_update_extent(gwin->gw);
+               amiga_window_invalidate_area(gwin->gw, NULL);
+       }
 }
 
 void ami_gui_tabs_toggle_all(void)
@@ -4406,44 +4543,6 @@ static void ami_do_redraw_limits(struct gui_window *g, 
struct browser_window *bw
 }
 
 
-/**
- * Invalidates an area of an amiga browser window
- *
- * \param g gui_window
- * \param rect area to redraw or NULL for the entire window area
- * \return NSERROR_OK on success or appropriate error code
- */
-static nserror amiga_window_invalidate_area(struct gui_window *g,
-                                           const struct rect *restrict rect)
-{
-       struct nsObject *nsobj;
-       struct rect *restrict deferred_rect;
-
-       if(!g) return NSERROR_BAD_PARAMETER;
-
-       if (rect == NULL) {
-               if (g != g->shared->gw) {
-                       return NSERROR_OK;
-               }
-       } else {
-               if (ami_gui_window_update_box_deferred_check(g->deferred_rects, 
rect,
-                                                           
g->deferred_rects_pool)) {
-                       deferred_rect = 
ami_memory_itempool_alloc(g->deferred_rects_pool,
-                                                                 sizeof(struct 
rect));
-                       CopyMem(rect, deferred_rect, sizeof(struct rect));
-                       nsobj = AddObject(g->deferred_rects, AMINS_RECT);
-                       nsobj->objstruct = deferred_rect;
-               } else {
-                       NSLOG(netsurf, INFO,
-                             "Ignoring duplicate or subset of queued box 
redraw");
-               }
-       }
-       ami_schedule_redraw(g->shared, false);
-
-       return NSERROR_OK;
-}
-
-
 static void ami_refresh_window(struct gui_window_2 *gwin)
 {
        /* simplerefresh only */
@@ -5509,55 +5608,6 @@ static void gui_window_destroy(struct gui_window *g)
        win_destroyed = true;
 }
 
-static void gui_window_set_title(struct gui_window *g, const char *restrict 
title)
-{
-       struct Node *node;
-       char *restrict utf8title;
-
-       if(!g) return;
-       if(!title) return;
-
-       utf8title = ami_utf8_easy((char *)title);
-
-       if(g->tab_node) {
-               node = g->tab_node;
-
-               if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle)))
-               {
-                       SetGadgetAttrs((struct Gadget 
*)g->shared->objects[GID_TABS],
-                                                       g->shared->win, NULL,
-                                                       CLICKTAB_Labels, ~0,
-                                                       TAG_DONE);
-
-                       if(g->tabtitle) free(g->tabtitle);
-                       g->tabtitle = strdup(utf8title);
-
-                       SetClickTabNodeAttrs(node, TNA_Text, g->tabtitle,
-                                                       TNA_HintInfo, 
g->tabtitle,
-                                                       TAG_DONE);
-
-                       RefreshSetGadgetAttrs((struct Gadget 
*)g->shared->objects[GID_TABS],
-                                                               g->shared->win, 
NULL,
-                                                               
CLICKTAB_Labels, &g->shared->tab_list,
-                                                               TAG_DONE);
-
-                       if(ClickTabBase->lib_Version < 53)
-                               RethinkLayout((struct Gadget 
*)g->shared->objects[GID_TABLAYOUT],
-                                       g->shared->win, NULL, TRUE);
-               }
-       }
-
-       if(g == g->shared->gw) {
-               if((g->shared->wintitle == NULL) || (strcmp(utf8title, 
g->shared->wintitle)))
-               {
-                       if(g->shared->wintitle) free(g->shared->wintitle);
-                       g->shared->wintitle = strdup(utf8title);
-                       SetWindowTitles(g->shared->win, g->shared->wintitle, 
ami_gui_get_screen_title());
-               }
-       }
-
-       ami_utf8_free(utf8title);
-}
 
 static void ami_redraw_callback(void *p)
 {
@@ -5868,45 +5918,6 @@ gui_window_set_scroll(struct gui_window *g, const struct 
rect *rect)
        return NSERROR_OK;
 }
 
-static void gui_window_update_extent(struct gui_window *g)
-{
-       struct IBox *bbox;
-
-       if(!g || !g->bw) return;
-       if(browser_window_has_content(g->bw) == false) return;
-
-       if(g == g->shared->gw) {
-               int width, height;
-               if(ami_gui_get_space_box((Object 
*)g->shared->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
-                       amiga_warn_user("NoMemory", "");
-                       return;
-               }
-
-               if(g->shared->objects[GID_VSCROLL]) {
-                       browser_window_get_extents(g->bw, true, &width, 
&height);
-                       RefreshSetGadgetAttrs((struct Gadget 
*)(APTR)g->shared->objects[GID_VSCROLL],g->shared->win,NULL,
-                               SCROLLER_Total, (ULONG)(height),
-                               SCROLLER_Visible, bbox->Height,
-                       TAG_DONE);
-               }
-
-               if(g->shared->objects[GID_HSCROLL])
-               {
-                       browser_window_get_extents(g->bw, true, &width, 
&height);
-                       RefreshSetGadgetAttrs((struct Gadget 
*)(APTR)g->shared->objects[GID_HSCROLL],
-                               g->shared->win, NULL,
-                               SCROLLER_Total, (ULONG)(width),
-                               SCROLLER_Visible, bbox->Width,
-                               TAG_DONE);
-               }
-
-               ami_gui_free_space_box(bbox);
-       }
-
-       ami_gui_scroller_update(g->shared);
-       g->shared->new_content = true;
-}
-
 static void gui_window_set_status(struct gui_window *g, const char *text)
 {
        char *utf8text;
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index e682eb8..e192191 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1364,8 +1364,6 @@ nsws_window_resize(struct gui_window *gw,
        }
        nsws_window_update_forward_back(gw);
 
-       browser_window_update(gw->bw, false);
-
        if (gw->toolbar != NULL) {
                SendMessage(gw->toolbar, TB_SETSTATE,
                            (WPARAM) IDM_NAV_STOP,
diff --git a/include/netsurf/browser_window.h b/include/netsurf/browser_window.h
index 73ca8e8..521340a 100644
--- a/include/netsurf/browser_window.h
+++ b/include/netsurf/browser_window.h
@@ -302,15 +302,6 @@ void browser_window_set_dimensions(struct browser_window 
*bw,
 
 
 /**
- * Redraw browser window, set extent to content, and update title.
- *
- * \param  bw            browser_window
- * \param  scroll_to_top  move view to top of page
- */
-void browser_window_update(struct browser_window *bw, bool scroll_to_top);
-
-
-/**
  * Stop all fetching activity in a browser window.
  *
  * \param bw The browser window to stop activity in.


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

Summary of changes:
 desktop/browser_window.c                |  243 ++++++++++++++--------------
 frontends/amiga/dt_anim.c               |   12 +-
 frontends/amiga/dt_sound.c              |    6 +-
 frontends/amiga/gui.c                   |  267 ++++++++++++++++---------------
 frontends/amiga/plugin_hack.c           |   12 +-
 frontends/amiga/stringview/stringview.c |    4 +-
 frontends/windows/window.c              |    2 -
 include/netsurf/browser_window.h        |    9 --
 8 files changed, 280 insertions(+), 275 deletions(-)

diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 096b944..7bc5cc5 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -709,6 +709,129 @@ browser_window_convert_to_download(struct browser_window 
*bw,
 
 
 /**
+ * scroll to a fragment if present
+ *
+ * \param bw browser window
+ * \return true if the scroll was sucessful
+ */
+static bool frag_scroll(struct browser_window *bw)
+{
+       struct rect rect;
+
+       if (bw->frag_id == NULL) {
+               return false;
+       }
+
+       if (!html_get_id_offset(bw->current_content,
+                               bw->frag_id,
+                               &rect.x0,
+                               &rect.y0)) {
+               return false;
+       }
+
+       rect.x1 = rect.x0;
+       rect.y1 = rect.y0;
+       if (browser_window_set_scroll(bw, &rect) == NSERROR_OK) {
+               if (bw->current_content != NULL &&
+                   bw->history != NULL &&
+                   bw->history->current != NULL) {
+                       browser_window_history_update(bw, bw->current_content);
+               }
+               return true;
+       }
+       return false;
+}
+
+
+/**
+ * Redraw browser window, set extent to content, and update title.
+ *
+ * \param  bw            browser_window
+ * \param  scroll_to_top  move view to top of page
+ */
+static void browser_window_update(struct browser_window *bw, bool 
scroll_to_top)
+{
+       static const struct rect zrect = {
+               .x0 = 0,
+               .y0 = 0,
+               .x1 = 0,
+               .y1 = 0
+       };
+
+       if (bw->current_content == NULL) {
+               return;
+       }
+
+       switch (bw->browser_window_type) {
+
+       case BROWSER_WINDOW_NORMAL:
+               /* Root browser window, constituting a front end window/tab */
+               guit->window->set_title(bw->window,
+                                       content_get_title(bw->current_content));
+
+               browser_window_update_extent(bw);
+
+               /* if frag_id exists, then try to scroll to it */
+               /** @todo don't do this if the user has scrolled */
+               if (!frag_scroll(bw)) {
+                       if (scroll_to_top) {
+                               browser_window_set_scroll(bw, &zrect);
+                       }
+               }
+
+               guit->window->invalidate(bw->window, NULL);
+
+               break;
+
+       case BROWSER_WINDOW_IFRAME:
+               /* Internal iframe browser window */
+               assert(bw->parent != NULL);
+               assert(bw->parent->current_content != NULL);
+
+               browser_window_update_extent(bw);
+
+               if (scroll_to_top) {
+                       browser_window_set_scroll(bw, &zrect);
+               }
+
+               /* if frag_id exists, then try to scroll to it */
+               /** @todo don't do this if the user has scrolled */
+               frag_scroll(bw);
+
+               html_redraw_a_box(bw->parent->current_content, bw->box);
+               break;
+
+       case BROWSER_WINDOW_FRAME:
+               {
+                       struct rect rect;
+                       browser_window_update_extent(bw);
+
+                       if (scroll_to_top) {
+                               browser_window_set_scroll(bw, &zrect);
+                       }
+
+                       /* if frag_id exists, then try to scroll to it */
+                       /** @todo don't do this if the user has scrolled */
+                       frag_scroll(bw);
+
+                       rect.x0 = scrollbar_get_offset(bw->scroll_x);
+                       rect.y0 = scrollbar_get_offset(bw->scroll_y);
+                       rect.x1 = rect.x0 + bw->width;
+                       rect.y1 = rect.y0 + bw->height;
+
+                       browser_window_invalidate_rect(bw, &rect);
+               }
+               break;
+
+       default:
+       case BROWSER_WINDOW_FRAMESET:
+               /* Nothing to do */
+               break;
+       }
+}
+
+
+/**
  * handle message for content ready on browser window
  */
 static nserror browser_window_content_ready(struct browser_window *bw)
@@ -1837,41 +1960,6 @@ static void browser_window_destroy_internal(struct 
browser_window *bw)
 
 
 /**
- * scroll to a fragment if present
- *
- * \param bw browser window
- * \return true if the scroll was sucessful
- */
-static bool frag_scroll(struct browser_window *bw)
-{
-       struct rect rect;
-
-       if (bw->frag_id == NULL) {
-               return false;
-       }
-
-       if (!html_get_id_offset(bw->current_content,
-                               bw->frag_id,
-                               &rect.x0,
-                               &rect.y0)) {
-               return false;
-       }
-
-       rect.x1 = rect.x0;
-       rect.y1 = rect.y0;
-       if (browser_window_set_scroll(bw, &rect) == NSERROR_OK) {
-               if (bw->current_content != NULL &&
-                   bw->history != NULL &&
-                   bw->history->current != NULL) {
-                       browser_window_history_update(bw, bw->current_content);
-               }
-               return true;
-       }
-       return false;
-}
-
-
-/**
  * Set browser window scale.
  *
  * \param bw Browser window.
@@ -2589,7 +2677,7 @@ browser_window_redraw(struct browser_window *bw,
                        /* Set current child */
                        child = &bw->children[cur_child];
 
-                       /* Get frame edge box in global coordinates */
+                       /* Get frame edge area in global coordinates */
                        content_clip.x0 = (x + child->x) * child->scale;
                        content_clip.y0 = (y + child->y) * child->scale;
                        content_clip.x1 = content_clip.x0 +
@@ -3994,89 +4082,6 @@ browser_window_set_dimensions(struct browser_window *bw, 
int width, int height)
 }
 
 
-/* Exported interface, documented in netsurf/browser_window.h */
-void browser_window_update(struct browser_window *bw, bool scroll_to_top)
-{
-       static const struct rect zrect = {
-               .x0 = 0,
-               .y0 = 0,
-               .x1 = 0,
-               .y1 = 0
-       };
-
-       if (bw->current_content == NULL) {
-               return;
-       }
-
-       switch (bw->browser_window_type) {
-
-       case BROWSER_WINDOW_NORMAL:
-               /* Root browser window, constituting a front end window/tab */
-               guit->window->set_title(bw->window,
-                                       content_get_title(bw->current_content));
-
-               browser_window_update_extent(bw);
-
-               /* if frag_id exists, then try to scroll to it */
-               /** @todo don't do this if the user has scrolled */
-               if (!frag_scroll(bw)) {
-                       if (scroll_to_top) {
-                               browser_window_set_scroll(bw, &zrect);
-                       }
-               }
-
-               guit->window->invalidate(bw->window, NULL);
-
-               break;
-
-       case BROWSER_WINDOW_IFRAME:
-               /* Internal iframe browser window */
-               assert(bw->parent != NULL);
-               assert(bw->parent->current_content != NULL);
-
-               browser_window_update_extent(bw);
-
-               if (scroll_to_top) {
-                       browser_window_set_scroll(bw, &zrect);
-               }
-
-               /* if frag_id exists, then try to scroll to it */
-               /** @todo don't do this if the user has scrolled */
-               frag_scroll(bw);
-
-               html_redraw_a_box(bw->parent->current_content, bw->box);
-               break;
-
-       case BROWSER_WINDOW_FRAME:
-               {
-                       struct rect rect;
-                       browser_window_update_extent(bw);
-
-                       if (scroll_to_top) {
-                               browser_window_set_scroll(bw, &zrect);
-                       }
-
-                       /* if frag_id exists, then try to scroll to it */
-                       /** @todo don't do this if the user has scrolled */
-                       frag_scroll(bw);
-
-                       rect.x0 = scrollbar_get_offset(bw->scroll_x);
-                       rect.y0 = scrollbar_get_offset(bw->scroll_y);
-                       rect.x1 = rect.x0 + bw->width;
-                       rect.y1 = rect.y0 + bw->height;
-
-                       browser_window_invalidate_rect(bw, &rect);
-               }
-               break;
-
-       default:
-       case BROWSER_WINDOW_FRAMESET:
-               /* Nothing to do */
-               break;
-       }
-}
-
-
 /* Exported interface, documented in browser/browser_private.h */
 nserror
 browser_window_invalidate_rect(struct browser_window *bw, struct rect *rect)
diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c
index 99ccffe..a9fe809 100644
--- a/frontends/amiga/dt_anim.c
+++ b/frontends/amiga/dt_anim.c
@@ -74,9 +74,9 @@ static void amiga_dt_anim_destroy(struct content *c);
 static bool amiga_dt_anim_redraw(struct content *c,
                struct content_redraw_data *data, const struct rect *clip,
                const struct redraw_context *ctx);
-static void amiga_dt_anim_open(struct content *c, struct browser_window *bw,
+static nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw,
                struct content *page, struct object_params *params);
-static void amiga_dt_anim_close(struct content *c);
+static nserror amiga_dt_anim_close(struct content *c);
 static nserror amiga_dt_anim_clone(const struct content *old, struct content 
**newc);
 static content_type amiga_dt_anim_content_type(void);
 
@@ -290,18 +290,18 @@ bool amiga_dt_anim_redraw(struct content *c,
  * \param  box     box containing c, or 0 if not an object
  * \param  params  object parameters, or 0 if not an object
  */
-void amiga_dt_anim_open(struct content *c, struct browser_window *bw,
+nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw,
        struct content *page, struct object_params *params)
 {
        NSLOG(netsurf, INFO, "amiga_dt_anim_open");
 
-       return;
+       return NSERROR_OK;
 }
 
-void amiga_dt_anim_close(struct content *c)
+nserror amiga_dt_anim_close(struct content *c)
 {
        NSLOG(netsurf, INFO, "amiga_dt_anim_close");
-       return;
+       return NSERROR_OK;
 }
 
 void amiga_dt_anim_reformat(struct content *c, int width, int height)
diff --git a/frontends/amiga/dt_sound.c b/frontends/amiga/dt_sound.c
index e008103..8b63d6a 100644
--- a/frontends/amiga/dt_sound.c
+++ b/frontends/amiga/dt_sound.c
@@ -58,7 +58,7 @@ static void amiga_dt_sound_destroy(struct content *c);
 static bool amiga_dt_sound_redraw(struct content *c,
                struct content_redraw_data *data, const struct rect *clip,
                const struct redraw_context *ctx);
-static void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
+static nserror amiga_dt_sound_open(struct content *c, struct browser_window 
*bw,
                struct content *page, struct object_params *params);
 static nserror amiga_dt_sound_clone(const struct content *old, struct content 
**newc);
 static content_type amiga_dt_sound_content_type(void);
@@ -221,7 +221,7 @@ bool amiga_dt_sound_redraw(struct content *c,
 }
 
 
-void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
+nserror amiga_dt_sound_open(struct content *c, struct browser_window *bw,
        struct content *page, struct object_params *params)
 {
        amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c;
@@ -248,7 +248,7 @@ void amiga_dt_sound_open(struct content *c, struct 
browser_window *bw,
        if(plugin->dto && (plugin->immediate == true))
                amiga_dt_sound_play(plugin->dto);
 
-       return;
+       return NSERROR_OK;
 }
 
 
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 673f751..36ee756 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -3596,6 +3596,135 @@ static void ami_change_tab(struct gui_window_2 *gwin, 
int direction)
        ami_switch_tab(gwin, true);
 }
 
+
+static void gui_window_set_title(struct gui_window *g, const char *restrict 
title)
+{
+       struct Node *node;
+       char *restrict utf8title;
+
+       if(!g) return;
+       if(!title) return;
+
+       utf8title = ami_utf8_easy((char *)title);
+
+       if(g->tab_node) {
+               node = g->tab_node;
+
+               if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle)))
+               {
+                       SetGadgetAttrs((struct Gadget 
*)g->shared->objects[GID_TABS],
+                                                       g->shared->win, NULL,
+                                                       CLICKTAB_Labels, ~0,
+                                                       TAG_DONE);
+
+                       if(g->tabtitle) free(g->tabtitle);
+                       g->tabtitle = strdup(utf8title);
+
+                       SetClickTabNodeAttrs(node, TNA_Text, g->tabtitle,
+                                                       TNA_HintInfo, 
g->tabtitle,
+                                                       TAG_DONE);
+
+                       RefreshSetGadgetAttrs((struct Gadget 
*)g->shared->objects[GID_TABS],
+                                                               g->shared->win, 
NULL,
+                                                               
CLICKTAB_Labels, &g->shared->tab_list,
+                                                               TAG_DONE);
+
+                       if(ClickTabBase->lib_Version < 53)
+                               RethinkLayout((struct Gadget 
*)g->shared->objects[GID_TABLAYOUT],
+                                       g->shared->win, NULL, TRUE);
+               }
+       }
+
+       if(g == g->shared->gw) {
+               if((g->shared->wintitle == NULL) || (strcmp(utf8title, 
g->shared->wintitle)))
+               {
+                       if(g->shared->wintitle) free(g->shared->wintitle);
+                       g->shared->wintitle = strdup(utf8title);
+                       SetWindowTitles(g->shared->win, g->shared->wintitle, 
ami_gui_get_screen_title());
+               }
+       }
+
+       ami_utf8_free(utf8title);
+}
+
+static void gui_window_update_extent(struct gui_window *g)
+{
+       struct IBox *bbox;
+
+       if(!g || !g->bw) return;
+       if(browser_window_has_content(g->bw) == false) return;
+
+       if(g == g->shared->gw) {
+               int width, height;
+               if(ami_gui_get_space_box((Object 
*)g->shared->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
+                       amiga_warn_user("NoMemory", "");
+                       return;
+               }
+
+               if(g->shared->objects[GID_VSCROLL]) {
+                       browser_window_get_extents(g->bw, true, &width, 
&height);
+                       RefreshSetGadgetAttrs((struct Gadget 
*)(APTR)g->shared->objects[GID_VSCROLL],g->shared->win,NULL,
+                               SCROLLER_Total, (ULONG)(height),
+                               SCROLLER_Visible, bbox->Height,
+                       TAG_DONE);
+               }
+
+               if(g->shared->objects[GID_HSCROLL])
+               {
+                       browser_window_get_extents(g->bw, true, &width, 
&height);
+                       RefreshSetGadgetAttrs((struct Gadget 
*)(APTR)g->shared->objects[GID_HSCROLL],
+                               g->shared->win, NULL,
+                               SCROLLER_Total, (ULONG)(width),
+                               SCROLLER_Visible, bbox->Width,
+                               TAG_DONE);
+               }
+
+               ami_gui_free_space_box(bbox);
+       }
+
+       ami_gui_scroller_update(g->shared);
+       g->shared->new_content = true;
+}
+
+
+/**
+ * Invalidates an area of an amiga browser window
+ *
+ * \param g gui_window
+ * \param rect area to redraw or NULL for the entire window area
+ * \return NSERROR_OK on success or appropriate error code
+ */
+static nserror amiga_window_invalidate_area(struct gui_window *g,
+                                           const struct rect *restrict rect)
+{
+       struct nsObject *nsobj;
+       struct rect *restrict deferred_rect;
+
+       if(!g) return NSERROR_BAD_PARAMETER;
+
+       if (rect == NULL) {
+               if (g != g->shared->gw) {
+                       return NSERROR_OK;
+               }
+       } else {
+               if (ami_gui_window_update_box_deferred_check(g->deferred_rects, 
rect,
+                                                           
g->deferred_rects_pool)) {
+                       deferred_rect = 
ami_memory_itempool_alloc(g->deferred_rects_pool,
+                                                                 sizeof(struct 
rect));
+                       CopyMem(rect, deferred_rect, sizeof(struct rect));
+                       nsobj = AddObject(g->deferred_rects, AMINS_RECT);
+                       nsobj->objstruct = deferred_rect;
+               } else {
+                       NSLOG(netsurf, INFO,
+                             "Ignoring duplicate or subset of queued box 
redraw");
+               }
+       }
+       ami_schedule_redraw(g->shared, false);
+
+       return NSERROR_OK;
+}
+
+
 static void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
 {
        struct Node *tabnode;
@@ -3641,7 +3770,10 @@ static void ami_switch_tab(struct gui_window_2 *gwin, 
bool redraw)
                struct rect rect;
 
                ami_plot_clear_bbox(gwin->win->RPort, bbox);
-               browser_window_update(gwin->gw->bw, false);
+               gui_window_set_title(gwin->gw,
+                                    browser_window_get_title(gwin->gw->bw));
+               gui_window_update_extent(gwin->gw);
+               amiga_window_invalidate_area(gwin->gw, NULL);
 
                rect.x0 = rect.x1 = gwin->gw->scrollx;
                rect.y0 = rect.y1 = gwin->gw->scrolly;
@@ -4148,7 +4280,12 @@ static void ami_toggletabbar(struct gui_window_2 *gwin, 
bool show)
        RethinkLayout((struct Gadget *)gwin->objects[GID_MAIN],
                        gwin->win, NULL, TRUE);
 
-       if(gwin->gw && gwin->gw->bw) browser_window_update(gwin->gw->bw, false);
+       if (gwin->gw && gwin->gw->bw) {
+               gui_window_set_title(gwin->gw,
+                                    browser_window_get_title(gwin->gw->bw));
+               gui_window_update_extent(gwin->gw);
+               amiga_window_invalidate_area(gwin->gw, NULL);
+       }
 }
 
 void ami_gui_tabs_toggle_all(void)
@@ -4406,44 +4543,6 @@ static void ami_do_redraw_limits(struct gui_window *g, 
struct browser_window *bw
 }
 
 
-/**
- * Invalidates an area of an amiga browser window
- *
- * \param g gui_window
- * \param rect area to redraw or NULL for the entire window area
- * \return NSERROR_OK on success or appropriate error code
- */
-static nserror amiga_window_invalidate_area(struct gui_window *g,
-                                           const struct rect *restrict rect)
-{
-       struct nsObject *nsobj;
-       struct rect *restrict deferred_rect;
-
-       if(!g) return NSERROR_BAD_PARAMETER;
-
-       if (rect == NULL) {
-               if (g != g->shared->gw) {
-                       return NSERROR_OK;
-               }
-       } else {
-               if (ami_gui_window_update_box_deferred_check(g->deferred_rects, 
rect,
-                                                           
g->deferred_rects_pool)) {
-                       deferred_rect = 
ami_memory_itempool_alloc(g->deferred_rects_pool,
-                                                                 sizeof(struct 
rect));
-                       CopyMem(rect, deferred_rect, sizeof(struct rect));
-                       nsobj = AddObject(g->deferred_rects, AMINS_RECT);
-                       nsobj->objstruct = deferred_rect;
-               } else {
-                       NSLOG(netsurf, INFO,
-                             "Ignoring duplicate or subset of queued box 
redraw");
-               }
-       }
-       ami_schedule_redraw(g->shared, false);
-
-       return NSERROR_OK;
-}
-
-
 static void ami_refresh_window(struct gui_window_2 *gwin)
 {
        /* simplerefresh only */
@@ -5509,55 +5608,6 @@ static void gui_window_destroy(struct gui_window *g)
        win_destroyed = true;
 }
 
-static void gui_window_set_title(struct gui_window *g, const char *restrict 
title)
-{
-       struct Node *node;
-       char *restrict utf8title;
-
-       if(!g) return;
-       if(!title) return;
-
-       utf8title = ami_utf8_easy((char *)title);
-
-       if(g->tab_node) {
-               node = g->tab_node;
-
-               if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle)))
-               {
-                       SetGadgetAttrs((struct Gadget 
*)g->shared->objects[GID_TABS],
-                                                       g->shared->win, NULL,
-                                                       CLICKTAB_Labels, ~0,
-                                                       TAG_DONE);
-
-                       if(g->tabtitle) free(g->tabtitle);
-                       g->tabtitle = strdup(utf8title);
-
-                       SetClickTabNodeAttrs(node, TNA_Text, g->tabtitle,
-                                                       TNA_HintInfo, 
g->tabtitle,
-                                                       TAG_DONE);
-
-                       RefreshSetGadgetAttrs((struct Gadget 
*)g->shared->objects[GID_TABS],
-                                                               g->shared->win, 
NULL,
-                                                               
CLICKTAB_Labels, &g->shared->tab_list,
-                                                               TAG_DONE);
-
-                       if(ClickTabBase->lib_Version < 53)
-                               RethinkLayout((struct Gadget 
*)g->shared->objects[GID_TABLAYOUT],
-                                       g->shared->win, NULL, TRUE);
-               }
-       }
-
-       if(g == g->shared->gw) {
-               if((g->shared->wintitle == NULL) || (strcmp(utf8title, 
g->shared->wintitle)))
-               {
-                       if(g->shared->wintitle) free(g->shared->wintitle);
-                       g->shared->wintitle = strdup(utf8title);
-                       SetWindowTitles(g->shared->win, g->shared->wintitle, 
ami_gui_get_screen_title());
-               }
-       }
-
-       ami_utf8_free(utf8title);
-}
 
 static void ami_redraw_callback(void *p)
 {
@@ -5868,45 +5918,6 @@ gui_window_set_scroll(struct gui_window *g, const struct 
rect *rect)
        return NSERROR_OK;
 }
 
-static void gui_window_update_extent(struct gui_window *g)
-{
-       struct IBox *bbox;
-
-       if(!g || !g->bw) return;
-       if(browser_window_has_content(g->bw) == false) return;
-
-       if(g == g->shared->gw) {
-               int width, height;
-               if(ami_gui_get_space_box((Object 
*)g->shared->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
-                       amiga_warn_user("NoMemory", "");
-                       return;
-               }
-
-               if(g->shared->objects[GID_VSCROLL]) {
-                       browser_window_get_extents(g->bw, true, &width, 
&height);
-                       RefreshSetGadgetAttrs((struct Gadget 
*)(APTR)g->shared->objects[GID_VSCROLL],g->shared->win,NULL,
-                               SCROLLER_Total, (ULONG)(height),
-                               SCROLLER_Visible, bbox->Height,
-                       TAG_DONE);
-               }
-
-               if(g->shared->objects[GID_HSCROLL])
-               {
-                       browser_window_get_extents(g->bw, true, &width, 
&height);
-                       RefreshSetGadgetAttrs((struct Gadget 
*)(APTR)g->shared->objects[GID_HSCROLL],
-                               g->shared->win, NULL,
-                               SCROLLER_Total, (ULONG)(width),
-                               SCROLLER_Visible, bbox->Width,
-                               TAG_DONE);
-               }
-
-               ami_gui_free_space_box(bbox);
-       }
-
-       ami_gui_scroller_update(g->shared);
-       g->shared->new_content = true;
-}
-
 static void gui_window_set_status(struct gui_window *g, const char *text)
 {
        char *utf8text;
diff --git a/frontends/amiga/plugin_hack.c b/frontends/amiga/plugin_hack.c
index fa75bd9..a775936 100644
--- a/frontends/amiga/plugin_hack.c
+++ b/frontends/amiga/plugin_hack.c
@@ -53,9 +53,9 @@ static void amiga_plugin_hack_destroy(struct content *c);
 static bool amiga_plugin_hack_redraw(struct content *c,
                struct content_redraw_data *data, const struct rect *clip,
                const struct redraw_context *ctx);
-static void amiga_plugin_hack_open(struct content *c, struct browser_window 
*bw,
+static nserror amiga_plugin_hack_open(struct content *c, struct browser_window 
*bw,
                struct content *page, struct object_params *params);
-static void amiga_plugin_hack_close(struct content *c);
+static nserror amiga_plugin_hack_close(struct content *c);
 static nserror amiga_plugin_hack_clone(const struct content *old, struct 
content **newc);
 static content_type amiga_plugin_hack_content_type(void);
 
@@ -186,7 +186,7 @@ bool amiga_plugin_hack_redraw(struct content *c,
  *                 object within a page
  * \param  params  object parameters, or 0 if not an object
  */
-void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
+nserror amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
        struct content *page, struct object_params *params)
 {
        NSLOG(netsurf, INFO, "amiga_plugin_hack_open %s",
@@ -199,13 +199,13 @@ void amiga_plugin_hack_open(struct content *c, struct 
browser_window *bw,
                c->height = 0;
        }
 
-       return;
+       return NSERROR_OK;
 }
 
-void amiga_plugin_hack_close(struct content *c)
+nserror amiga_plugin_hack_close(struct content *c)
 {
        NSLOG(netsurf, INFO, "amiga_plugin_hack_close");
-       return;
+       return NSERROR_OK;
 }
 
 void amiga_plugin_hack_reformat(struct content *c, int width, int height)
diff --git a/frontends/amiga/stringview/stringview.c 
b/frontends/amiga/stringview/stringview.c
index 245782b..60c694a 100755
--- a/frontends/amiga/stringview/stringview.c
+++ b/frontends/amiga/stringview/stringview.c
@@ -161,7 +161,7 @@ static uint32 myStringSearch( Class *cl, Object *obj )
        if(searchString)
        {
                searchString += 3;
-               if (bufpos >= searchString - data->SearchBuffer)
+               if (bufpos >= (uint32)(searchString - data->SearchBuffer))
                        bufpos -= searchString - data->SearchBuffer;
        }
        else
@@ -848,7 +848,7 @@ Class *MakeStringClass( void )
 
        if ( cl )
        {
-               cl->cl_Dispatcher.h_Entry = 
(uint32(*)())myStringClassDispatcher;
+               cl->cl_Dispatcher.h_Entry = 
(uint32(*)(void))myStringClassDispatcher;
        }
 
     URLHistory_Init();
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index e682eb8..e192191 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1364,8 +1364,6 @@ nsws_window_resize(struct gui_window *gw,
        }
        nsws_window_update_forward_back(gw);
 
-       browser_window_update(gw->bw, false);
-
        if (gw->toolbar != NULL) {
                SendMessage(gw->toolbar, TB_SETSTATE,
                            (WPARAM) IDM_NAV_STOP,
diff --git a/include/netsurf/browser_window.h b/include/netsurf/browser_window.h
index 73ca8e8..521340a 100644
--- a/include/netsurf/browser_window.h
+++ b/include/netsurf/browser_window.h
@@ -302,15 +302,6 @@ void browser_window_set_dimensions(struct browser_window 
*bw,
 
 
 /**
- * Redraw browser window, set extent to content, and update title.
- *
- * \param  bw            browser_window
- * \param  scroll_to_top  move view to top of page
- */
-void browser_window_update(struct browser_window *bw, bool scroll_to_top);
-
-
-/**
  * Stop all fetching activity in a browser window.
  *
  * \param bw The browser window to stop activity in.


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

Reply via email to