Merge branch 'master' of git://git.netsurf-browser.org/netsurf

This commit is contained in:
Ole Loots 2012-11-12 21:27:53 +01:00
commit 082c76d9c3
3 changed files with 29 additions and 26 deletions

View File

@ -1365,24 +1365,24 @@ void ami_handle_msg(void)
width=bbox->Width;
height=bbox->Height;
if(gwin->mouse_state & BROWSER_MOUSE_DRAG_ON &&
((gwin->bw->drag_type == DRAGGING_SELECTION) ||
ami_autoscroll == TRUE))
if(gwin->mouse_state & BROWSER_MOUSE_DRAG_ON)
{
ami_drag_icon_move();
if((gwin->win->MouseX < bbox->Left) &&
((gwin->win->MouseX - bbox->Left) > -AMI_DRAG_THRESHOLD))
drag_x_move = gwin->win->MouseX - bbox->Left;
if((gwin->win->MouseX > (bbox->Left + bbox->Width)) &&
((gwin->win->MouseX - (bbox->Left + bbox->Width)) < AMI_DRAG_THRESHOLD))
drag_x_move = gwin->win->MouseX - (bbox->Left + bbox->Width);
if((gwin->win->MouseY < bbox->Top) &&
((gwin->win->MouseY - bbox->Top) > -AMI_DRAG_THRESHOLD))
drag_y_move = gwin->win->MouseY - bbox->Top;
if((gwin->win->MouseY > (bbox->Top + bbox->Height)) &&
((gwin->win->MouseY - (bbox->Top + bbox->Height)) < AMI_DRAG_THRESHOLD))
drag_y_move = gwin->win->MouseY - (bbox->Top + bbox->Height);
if(ami_autoscroll == TRUE) {
if((gwin->win->MouseX < bbox->Left) &&
((gwin->win->MouseX - bbox->Left) > -AMI_DRAG_THRESHOLD))
drag_x_move = gwin->win->MouseX - bbox->Left;
if((gwin->win->MouseX > (bbox->Left + bbox->Width)) &&
((gwin->win->MouseX - (bbox->Left + bbox->Width)) < AMI_DRAG_THRESHOLD))
drag_x_move = gwin->win->MouseX - (bbox->Left + bbox->Width);
if((gwin->win->MouseY < bbox->Top) &&
((gwin->win->MouseY - bbox->Top) > -AMI_DRAG_THRESHOLD))
drag_y_move = gwin->win->MouseY - bbox->Top;
if((gwin->win->MouseY > (bbox->Top + bbox->Height)) &&
((gwin->win->MouseY - (bbox->Top + bbox->Height)) < AMI_DRAG_THRESHOLD))
drag_y_move = gwin->win->MouseY - (bbox->Top + bbox->Height);
}
}
if((x>=xs) && (y>=ys) && (x<width+xs) && (y<height+ys))

View File

@ -355,20 +355,20 @@ void ami_gui_opts_free(void)
{
int i;
for(i = 0; i++; i < OPTS_LAST)
if(gadlab[i]) FreeVec((APTR)gadlab[i]);
for(i = 0; i < OPTS_LAST; i++)
if(gadlab[i]) free((APTR)gadlab[i]);
for(i = 0; i++; i < OPTS_MAX_TABS)
if(tabs[i]) FreeVec((APTR)tabs[i]);
for(i = 0; i < OPTS_MAX_TABS; i++)
if(tabs[i]) free((APTR)tabs[i]);
for(i = 0; i++; i < OPTS_MAX_SCREEN)
if(screenopts[i]) FreeVec((APTR)screenopts[i]);
for(i = 0; i < OPTS_MAX_SCREEN; i++)
if(screenopts[i]) free((APTR)screenopts[i]);
for(i = 0; i++; i < OPTS_MAX_PROXY)
if(proxyopts[i]) FreeVec((APTR)proxyopts[i]);
for(i = 0; i < OPTS_MAX_PROXY; i++)
if(proxyopts[i]) free((APTR)proxyopts[i]);
for(i = 0; i++; i < OPTS_MAX_NATIVEBM)
if(nativebmopts[i]) FreeVec((APTR)nativebmopts[i]);
for(i = 0; i < OPTS_MAX_NATIVEBM; i++)
if(nativebmopts[i]) free((APTR)nativebmopts[i]);
ami_gui_opts_websearch_free(websearch_list);
}

View File

@ -138,6 +138,9 @@ static void svg_reformat(struct content *c, int width, int height)
svgtiny_parse(svg->diagram, source_data, source_size,
nsurl_access(content_get_url(c)),
width, height);
svg->current_width = width;
svg->current_height = height;
}
c->width = svg->diagram->width;
@ -335,7 +338,7 @@ static const content_handler svg_content_handler = {
.redraw = svg_redraw,
.clone = svg_clone,
.type = svg_content_type,
.no_share = false,
.no_share = true
};
static const char *svg_types[] = {