Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/3e00973521c4bf641742e44cab52d33ae919a8b0
...commit
http://git.netsurf-browser.org/netsurf.git/commit/3e00973521c4bf641742e44cab52d33ae919a8b0
...tree
http://git.netsurf-browser.org/netsurf.git/tree/3e00973521c4bf641742e44cab52d33ae919a8b0
The branch, master has been updated
via 3e00973521c4bf641742e44cab52d33ae919a8b0 (commit)
via a736775bbd5dbea26e84bc5fc98d35dea412494c (commit)
via 699173331bb65505a67610b44ea9bef8ab5cfb33 (commit)
via 4872bc30b8e20a8da9e822725066cc6a5f7955e1 (commit)
from 21caff6365147b74d3941b00bfcf5edf5f1b3139 (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/commitdiff/3e00973521c4bf641742e44cab52d33ae919a8b0
commit 3e00973521c4bf641742e44cab52d33ae919a8b0
Merge: a736775 21caff6
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Merge branch 'master' of git://git.netsurf-browser.org/netsurf
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/a736775bbd5dbea26e84bc5fc98d35dea412494c
commit a736775bbd5dbea26e84bc5fc98d35dea412494c
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Avoid doing html->bw->current_content.
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 3836ac0..3b6f955 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -836,7 +836,7 @@ void html_overflow_scroll_callback(void *client_data,
switch(scrollbar_data->msg) {
case SCROLLBAR_MSG_MOVED:
- html_redraw_a_box(html->bw->current_content, box);
+ html__redraw_a_box(html, box);
break;
case SCROLLBAR_MSG_SCROLL_START:
{
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/699173331bb65505a67610b44ea9bef8ab5cfb33
commit 699173331bb65505a67610b44ea9bef8ab5cfb33
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
html__redraw_a_box takes html_content instead of struct content.
diff --git a/render/html.c b/render/html.c
index 7f3c761..22fa80f 100644
--- a/render/html.c
+++ b/render/html.c
@@ -2359,13 +2359,13 @@ void html_redraw_a_box(hlcache_handle *h, struct box
*box)
* \param box box to redraw
*/
-void html__redraw_a_box(struct content *c, struct box *box)
+void html__redraw_a_box(struct html_content *html, struct box *box)
{
int x, y;
box_coords(box, &x, &y);
- content__request_redraw(c, x, y,
+ content__request_redraw((struct content *)html, x, y,
box->padding[LEFT] + box->width + box->padding[RIGHT],
box->padding[TOP] + box->height + box->padding[BOTTOM]);
}
@@ -2786,7 +2786,7 @@ static bool html_drop_file_at_point(struct content *c,
int x, int y, char *file)
/* Redraw box. */
if (containing_content == NULL)
- html__redraw_a_box(c, file_box);
+ html__redraw_a_box(html, file_box);
else
html_redraw_a_box(containing_content, file_box);
diff --git a/render/html_internal.h b/render/html_internal.h
index b4e6d2c..ef2ea25 100644
--- a/render/html_internal.h
+++ b/render/html_internal.h
@@ -122,7 +122,7 @@ bool html_fetch_object(html_content *c, nsurl *url, struct
box *box,
void html_set_status(html_content *c, const char *extra);
-void html__redraw_a_box(struct content *c, struct box *box);
+void html__redraw_a_box(html_content *html, struct box *box);
struct browser_window *html_get_browser_window(struct content *c);
struct search_context *html_get_search(struct content *c);
diff --git a/render/textinput.c b/render/textinput.c
index 3712690..3c3eb73 100644
--- a/render/textinput.c
+++ b/render/textinput.c
@@ -967,7 +967,7 @@ bool textinput_textarea_paste_text(struct browser_window
*bw,
textinput_textarea_move_caret,
textarea, c);
- html__redraw_a_box(c, textarea);
+ html__redraw_a_box((html_content *)c, textarea);
}
return success;
@@ -1085,7 +1085,7 @@ static void textinput_input_update_display(struct content
*c, struct box *input,
input, c);
if (dx || redraw)
- html__redraw_a_box(c, input);
+ html__redraw_a_box(html, input);
}
@@ -1599,7 +1599,7 @@ bool textinput_textarea_callback(struct browser_window
*bw, uint32_t key,
textarea, c);
if (scrolled || reflow)
- html__redraw_a_box(c, textarea);
+ html__redraw_a_box(html, textarea);
return true;
}
@@ -1657,7 +1657,7 @@ void textinput_textarea_click(struct content *c,
browser_mouse_state mouse,
textarea, c);
if (scrolled)
- html__redraw_a_box(c, textarea);
+ html__redraw_a_box(html, textarea);
}
@@ -2122,7 +2122,7 @@ void textinput_input_click(struct content *c, struct box
*input,
input, c);
if (dx)
- html__redraw_a_box(c, input);
+ html__redraw_a_box(html, input);
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/4872bc30b8e20a8da9e822725066cc6a5f7955e1
commit 4872bc30b8e20a8da9e822725066cc6a5f7955e1
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Remove redundant scrollbar widget message.
diff --git a/desktop/frames.c b/desktop/frames.c
index c5934cd..72f1ba5 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -59,9 +59,6 @@ void browser_window_scroll_callback(void *client_data,
struct browser_window *bw = client_data;
switch(scrollbar_data->msg) {
- case SCROLLBAR_MSG_REDRAW:
- /* TODO: Is this needed? */
- break;
case SCROLLBAR_MSG_MOVED:
if (bw->browser_window_type == BROWSER_WINDOW_IFRAME) {
html_redraw_a_box(bw->parent->current_content, bw->box);
diff --git a/desktop/scrollbar.c b/desktop/scrollbar.c
index ac4c399..7768be2 100644
--- a/desktop/scrollbar.c
+++ b/desktop/scrollbar.c
@@ -427,16 +427,6 @@ void scrollbar_set(struct scrollbar *s, int value, bool
bar_pos)
msg.msg = SCROLLBAR_MSG_MOVED;
msg.scroll_offset = s->offset;
s->client_callback(s->client_data, &msg);
-
- msg.msg = SCROLLBAR_MSG_REDRAW;
- msg.x0 = s->horizontal ? SCROLLBAR_WIDTH - 1 : 0;
- msg.y0 = s->horizontal ? 0 : SCROLLBAR_WIDTH - 1;
- msg.x1 = (s->horizontal ? s->length - SCROLLBAR_WIDTH + 1 :
- SCROLLBAR_WIDTH);
- msg.y1 = (s->horizontal ? SCROLLBAR_WIDTH :
- s->length - SCROLLBAR_WIDTH + 1);
-
- s->client_callback(s->client_data, &msg);
}
@@ -498,16 +488,6 @@ bool scrollbar_scroll(struct scrollbar *s, int change)
msg.scroll_offset = s->offset;
s->client_callback(s->client_data, &msg);
- msg.msg = SCROLLBAR_MSG_REDRAW;
- msg.x0 = s->horizontal ? SCROLLBAR_WIDTH - 1 : 0;
- msg.y0 = s->horizontal ? 0 : SCROLLBAR_WIDTH - 1;
- msg.x1 = (s->horizontal ? s->length - SCROLLBAR_WIDTH + 1 :
- SCROLLBAR_WIDTH);
- msg.y1 = (s->horizontal ? SCROLLBAR_WIDTH :
- s->length - SCROLLBAR_WIDTH + 1);
-
- s->client_callback(s->client_data, &msg);
-
return true;
}
diff --git a/desktop/scrollbar.h b/desktop/scrollbar.h
index 4bd9a17..2ce4a15 100644
--- a/desktop/scrollbar.h
+++ b/desktop/scrollbar.h
@@ -39,7 +39,6 @@
struct scrollbar;
typedef enum {
- SCROLLBAR_MSG_REDRAW, /* the scrollbar requests a redraw */
SCROLLBAR_MSG_MOVED, /* the scroll value has changed */
SCROLLBAR_MSG_SCROLL_START, /* a scrollbar drag has started, all
* mouse events should be passed to
@@ -47,7 +46,6 @@ typedef enum {
* coordinates
*/
SCROLLBAR_MSG_SCROLL_FINISHED, /* cancel the above */
-
} scrollbar_msg;
struct scrollbar_msg_data {
diff --git a/render/form.c b/render/form.c
index c828d81..c1f097f 100644
--- a/render/form.c
+++ b/render/form.c
@@ -1272,18 +1272,10 @@ void form_select_menu_scroll_callback(void *client_data,
html_content *html = (html_content *)menu->c;
switch (scrollbar_data->msg) {
- case SCROLLBAR_MSG_REDRAW:
- menu->callback(menu->client_data,
- menu->width -
- SCROLLBAR_WIDTH + scrollbar_data->x0,
- scrollbar_data->y0,
- scrollbar_data->x1 - scrollbar_data->x0,
- scrollbar_data->y1 -
scrollbar_data->y0);
- break;
case SCROLLBAR_MSG_MOVED:
menu->callback(menu->client_data,
0, 0,
- menu->width - SCROLLBAR_WIDTH,
+ menu->width,
menu->height);
break;
case SCROLLBAR_MSG_SCROLL_START:
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 6b5cef2..3836ac0 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -833,32 +833,8 @@ void html_overflow_scroll_callback(void *client_data,
struct html_scrollbar_data *data = client_data;
html_content *html = (html_content *)data->c;
struct box *box = data->box;
- int x, y, box_x, box_y, diff_x, diff_y;
switch(scrollbar_data->msg) {
- case SCROLLBAR_MSG_REDRAW:
- diff_x = box->padding[LEFT] + box->width +
- box->padding[RIGHT] - SCROLLBAR_WIDTH;
- diff_y = box->padding[TOP] + box->height +
- box->padding[BOTTOM] - SCROLLBAR_WIDTH;
-
- box_coords(box, &box_x, &box_y);
- if (scrollbar_is_horizontal(
- scrollbar_data->scrollbar)) {
- x = box_x + scrollbar_get_offset(box->scroll_x);
- y = box_y + scrollbar_get_offset(box->scroll_y)
+
- diff_y;
- } else {
- x = box_x + scrollbar_get_offset(box->scroll_x)
+
- diff_x;
- y = box_y + scrollbar_get_offset(box->scroll_y);
- }
- content__request_redraw((struct content *)html,
- x + scrollbar_data->x0,
- y + scrollbar_data->y0,
- scrollbar_data->x1 - scrollbar_data->x0,
- scrollbar_data->y1 -
scrollbar_data->y0);
- break;
case SCROLLBAR_MSG_MOVED:
html_redraw_a_box(html->bw->current_content, box);
break;
-----------------------------------------------------------------------
Summary of changes:
desktop/frames.c | 3 ---
desktop/scrollbar.c | 20 --------------------
desktop/scrollbar.h | 2 --
render/form.c | 10 +---------
render/html.c | 6 +++---
render/html_interaction.c | 26 +-------------------------
render/html_internal.h | 2 +-
render/textinput.c | 10 +++++-----
8 files changed, 11 insertions(+), 68 deletions(-)
diff --git a/desktop/frames.c b/desktop/frames.c
index c5934cd..72f1ba5 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -59,9 +59,6 @@ void browser_window_scroll_callback(void *client_data,
struct browser_window *bw = client_data;
switch(scrollbar_data->msg) {
- case SCROLLBAR_MSG_REDRAW:
- /* TODO: Is this needed? */
- break;
case SCROLLBAR_MSG_MOVED:
if (bw->browser_window_type == BROWSER_WINDOW_IFRAME) {
html_redraw_a_box(bw->parent->current_content, bw->box);
diff --git a/desktop/scrollbar.c b/desktop/scrollbar.c
index ac4c399..7768be2 100644
--- a/desktop/scrollbar.c
+++ b/desktop/scrollbar.c
@@ -427,16 +427,6 @@ void scrollbar_set(struct scrollbar *s, int value, bool
bar_pos)
msg.msg = SCROLLBAR_MSG_MOVED;
msg.scroll_offset = s->offset;
s->client_callback(s->client_data, &msg);
-
- msg.msg = SCROLLBAR_MSG_REDRAW;
- msg.x0 = s->horizontal ? SCROLLBAR_WIDTH - 1 : 0;
- msg.y0 = s->horizontal ? 0 : SCROLLBAR_WIDTH - 1;
- msg.x1 = (s->horizontal ? s->length - SCROLLBAR_WIDTH + 1 :
- SCROLLBAR_WIDTH);
- msg.y1 = (s->horizontal ? SCROLLBAR_WIDTH :
- s->length - SCROLLBAR_WIDTH + 1);
-
- s->client_callback(s->client_data, &msg);
}
@@ -498,16 +488,6 @@ bool scrollbar_scroll(struct scrollbar *s, int change)
msg.scroll_offset = s->offset;
s->client_callback(s->client_data, &msg);
- msg.msg = SCROLLBAR_MSG_REDRAW;
- msg.x0 = s->horizontal ? SCROLLBAR_WIDTH - 1 : 0;
- msg.y0 = s->horizontal ? 0 : SCROLLBAR_WIDTH - 1;
- msg.x1 = (s->horizontal ? s->length - SCROLLBAR_WIDTH + 1 :
- SCROLLBAR_WIDTH);
- msg.y1 = (s->horizontal ? SCROLLBAR_WIDTH :
- s->length - SCROLLBAR_WIDTH + 1);
-
- s->client_callback(s->client_data, &msg);
-
return true;
}
diff --git a/desktop/scrollbar.h b/desktop/scrollbar.h
index 4bd9a17..2ce4a15 100644
--- a/desktop/scrollbar.h
+++ b/desktop/scrollbar.h
@@ -39,7 +39,6 @@
struct scrollbar;
typedef enum {
- SCROLLBAR_MSG_REDRAW, /* the scrollbar requests a redraw */
SCROLLBAR_MSG_MOVED, /* the scroll value has changed */
SCROLLBAR_MSG_SCROLL_START, /* a scrollbar drag has started, all
* mouse events should be passed to
@@ -47,7 +46,6 @@ typedef enum {
* coordinates
*/
SCROLLBAR_MSG_SCROLL_FINISHED, /* cancel the above */
-
} scrollbar_msg;
struct scrollbar_msg_data {
diff --git a/render/form.c b/render/form.c
index c828d81..c1f097f 100644
--- a/render/form.c
+++ b/render/form.c
@@ -1272,18 +1272,10 @@ void form_select_menu_scroll_callback(void *client_data,
html_content *html = (html_content *)menu->c;
switch (scrollbar_data->msg) {
- case SCROLLBAR_MSG_REDRAW:
- menu->callback(menu->client_data,
- menu->width -
- SCROLLBAR_WIDTH + scrollbar_data->x0,
- scrollbar_data->y0,
- scrollbar_data->x1 - scrollbar_data->x0,
- scrollbar_data->y1 -
scrollbar_data->y0);
- break;
case SCROLLBAR_MSG_MOVED:
menu->callback(menu->client_data,
0, 0,
- menu->width - SCROLLBAR_WIDTH,
+ menu->width,
menu->height);
break;
case SCROLLBAR_MSG_SCROLL_START:
diff --git a/render/html.c b/render/html.c
index 7f3c761..22fa80f 100644
--- a/render/html.c
+++ b/render/html.c
@@ -2359,13 +2359,13 @@ void html_redraw_a_box(hlcache_handle *h, struct box
*box)
* \param box box to redraw
*/
-void html__redraw_a_box(struct content *c, struct box *box)
+void html__redraw_a_box(struct html_content *html, struct box *box)
{
int x, y;
box_coords(box, &x, &y);
- content__request_redraw(c, x, y,
+ content__request_redraw((struct content *)html, x, y,
box->padding[LEFT] + box->width + box->padding[RIGHT],
box->padding[TOP] + box->height + box->padding[BOTTOM]);
}
@@ -2786,7 +2786,7 @@ static bool html_drop_file_at_point(struct content *c,
int x, int y, char *file)
/* Redraw box. */
if (containing_content == NULL)
- html__redraw_a_box(c, file_box);
+ html__redraw_a_box(html, file_box);
else
html_redraw_a_box(containing_content, file_box);
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 6b5cef2..3b6f955 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -833,34 +833,10 @@ void html_overflow_scroll_callback(void *client_data,
struct html_scrollbar_data *data = client_data;
html_content *html = (html_content *)data->c;
struct box *box = data->box;
- int x, y, box_x, box_y, diff_x, diff_y;
switch(scrollbar_data->msg) {
- case SCROLLBAR_MSG_REDRAW:
- diff_x = box->padding[LEFT] + box->width +
- box->padding[RIGHT] - SCROLLBAR_WIDTH;
- diff_y = box->padding[TOP] + box->height +
- box->padding[BOTTOM] - SCROLLBAR_WIDTH;
-
- box_coords(box, &box_x, &box_y);
- if (scrollbar_is_horizontal(
- scrollbar_data->scrollbar)) {
- x = box_x + scrollbar_get_offset(box->scroll_x);
- y = box_y + scrollbar_get_offset(box->scroll_y)
+
- diff_y;
- } else {
- x = box_x + scrollbar_get_offset(box->scroll_x)
+
- diff_x;
- y = box_y + scrollbar_get_offset(box->scroll_y);
- }
- content__request_redraw((struct content *)html,
- x + scrollbar_data->x0,
- y + scrollbar_data->y0,
- scrollbar_data->x1 - scrollbar_data->x0,
- scrollbar_data->y1 -
scrollbar_data->y0);
- break;
case SCROLLBAR_MSG_MOVED:
- html_redraw_a_box(html->bw->current_content, box);
+ html__redraw_a_box(html, box);
break;
case SCROLLBAR_MSG_SCROLL_START:
{
diff --git a/render/html_internal.h b/render/html_internal.h
index b4e6d2c..ef2ea25 100644
--- a/render/html_internal.h
+++ b/render/html_internal.h
@@ -122,7 +122,7 @@ bool html_fetch_object(html_content *c, nsurl *url, struct
box *box,
void html_set_status(html_content *c, const char *extra);
-void html__redraw_a_box(struct content *c, struct box *box);
+void html__redraw_a_box(html_content *html, struct box *box);
struct browser_window *html_get_browser_window(struct content *c);
struct search_context *html_get_search(struct content *c);
diff --git a/render/textinput.c b/render/textinput.c
index 3712690..3c3eb73 100644
--- a/render/textinput.c
+++ b/render/textinput.c
@@ -967,7 +967,7 @@ bool textinput_textarea_paste_text(struct browser_window
*bw,
textinput_textarea_move_caret,
textarea, c);
- html__redraw_a_box(c, textarea);
+ html__redraw_a_box((html_content *)c, textarea);
}
return success;
@@ -1085,7 +1085,7 @@ static void textinput_input_update_display(struct content
*c, struct box *input,
input, c);
if (dx || redraw)
- html__redraw_a_box(c, input);
+ html__redraw_a_box(html, input);
}
@@ -1599,7 +1599,7 @@ bool textinput_textarea_callback(struct browser_window
*bw, uint32_t key,
textarea, c);
if (scrolled || reflow)
- html__redraw_a_box(c, textarea);
+ html__redraw_a_box(html, textarea);
return true;
}
@@ -1657,7 +1657,7 @@ void textinput_textarea_click(struct content *c,
browser_mouse_state mouse,
textarea, c);
if (scrolled)
- html__redraw_a_box(c, textarea);
+ html__redraw_a_box(html, textarea);
}
@@ -2122,7 +2122,7 @@ void textinput_input_click(struct content *c, struct box
*input,
input, c);
if (dx)
- html__redraw_a_box(c, input);
+ html__redraw_a_box(html, input);
}
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org