Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/6daf6c178df8d0b61cc9d7a43a646d5dd43bbab0
...commit
http://git.netsurf-browser.org/netsurf.git/commit/6daf6c178df8d0b61cc9d7a43a646d5dd43bbab0
...tree
http://git.netsurf-browser.org/netsurf.git/tree/6daf6c178df8d0b61cc9d7a43a646d5dd43bbab0
The branch, master has been updated
via 6daf6c178df8d0b61cc9d7a43a646d5dd43bbab0 (commit)
via 195a77a4cd5a0dde92821795caf362b1fef3729b (commit)
via c1be4c9e778370bba2c66f54de048c61d9fdffe7 (commit)
via 7277ce5dfc981394047bb865ceaf3a37fc33ccd6 (commit)
via 83c8e940f80368771eb499f8fbea6abafe04cd67 (commit)
via 02d5589dfab86f13b1fc93ae32c52540d0c97f80 (commit)
from 3e00973521c4bf641742e44cab52d33ae919a8b0 (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/6daf6c178df8d0b61cc9d7a43a646d5dd43bbab0
commit 6daf6c178df8d0b61cc9d7a43a646d5dd43bbab0
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Frame drag start function can take child bw. Don't need to get root bw in
html handler. Avoids bw dereferences.
diff --git a/desktop/frames.c b/desktop/frames.c
index 591342a..836108a 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -933,5 +933,11 @@ bool browser_window_frame_resize_start(struct
browser_window *bw,
browser_mouse_state mouse, int x, int y,
gui_pointer_shape *pointer)
{
- return browser_window_resize_frames(bw, mouse, x, y, pointer);
+ struct browser_window *root = browser_window_get_root(bw);
+ int offx, offy;
+
+ browser_window_get_position(bw, true, &offx, &offy);
+
+ return browser_window_resize_frames(root, mouse,
+ x + offx, y + offy, pointer);
}
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 016e2a1..4cdff76 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -581,19 +581,13 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
bool done = false;
/* frame resizing */
- if (bw->parent) {
- struct browser_window *parent;
- for (parent = bw->parent; parent->parent;
- parent = parent->parent);
- if (browser_window_frame_resize_start(parent, mouse,
- x + bw->x, y + bw->y,
- &pointer)) {
- if (mouse & (BROWSER_MOUSE_DRAG_1 |
- BROWSER_MOUSE_DRAG_2)) {
- status = messages_get("FrameDrag");
- }
- done = true;
+ if (browser_window_frame_resize_start(bw, mouse, x, y,
+ &pointer)) {
+ if (mouse & (BROWSER_MOUSE_DRAG_1 |
+ BROWSER_MOUSE_DRAG_2)) {
+ status = messages_get("FrameDrag");
}
+ done = true;
}
/* if clicking in the main page, remove the selection from any
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/195a77a4cd5a0dde92821795caf362b1fef3729b
commit 195a77a4cd5a0dde92821795caf362b1fef3729b
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Make new function for starting a frames resize and use it.
diff --git a/desktop/frames.c b/desktop/frames.c
index 740884d..591342a 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -798,7 +798,7 @@ bool browser_window_resolve_frame_dimension(struct
browser_window *bw,
}
-bool browser_window_resize_frames(struct browser_window *bw,
+static bool browser_window_resize_frames(struct browser_window *bw,
browser_mouse_state mouse, int x, int y,
gui_pointer_shape *pointer)
{
@@ -927,3 +927,11 @@ bool browser_window_resize_frames(struct browser_window
*bw,
}
return false;
}
+
+
+bool browser_window_frame_resize_start(struct browser_window *bw,
+ browser_mouse_state mouse, int x, int y,
+ gui_pointer_shape *pointer)
+{
+ return browser_window_resize_frames(bw, mouse, x, y, pointer);
+}
diff --git a/desktop/frames.h b/desktop/frames.h
index 5175791..efbe6a8 100644
--- a/desktop/frames.h
+++ b/desktop/frames.h
@@ -33,7 +33,7 @@ void browser_window_recalculate_iframes(struct browser_window
*bw);
void browser_window_create_frameset(struct browser_window *bw,
struct content_html_frames *frameset);
void browser_window_recalculate_frameset(struct browser_window *bw);
-bool browser_window_resize_frames(struct browser_window *bw,
+bool browser_window_frame_resize_start(struct browser_window *bw,
browser_mouse_state mouse, int x, int y,
gui_pointer_shape *pointer);
void browser_window_resize_frame(struct browser_window *bw, int x, int y);
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 0575ad1..016e2a1 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -585,7 +585,7 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
struct browser_window *parent;
for (parent = bw->parent; parent->parent;
parent = parent->parent);
- if (browser_window_resize_frames(parent, mouse,
+ if (browser_window_frame_resize_start(parent, mouse,
x + bw->x, y + bw->y,
&pointer)) {
if (mouse & (BROWSER_MOUSE_DRAG_1 |
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/c1be4c9e778370bba2c66f54de048c61d9fdffe7
commit c1be4c9e778370bba2c66f54de048c61d9fdffe7
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Formatting changes.
diff --git a/desktop/frames.c b/desktop/frames.c
index 4d38440..740884d 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -288,7 +288,8 @@ void browser_window_recalculate_iframes(struct
browser_window *bw)
*/
void browser_window_create_frameset(struct browser_window *bw,
- struct content_html_frames *frameset) {
+ struct content_html_frames *frameset)
+{
int row, col, index;
struct content_html_frames *frame;
struct browser_window *window;
@@ -401,7 +402,8 @@ void browser_window_create_frameset(struct browser_window
*bw,
* \param bw The browser window to reposition framesets for
*/
-void browser_window_recalculate_frameset(struct browser_window *bw) {
+void browser_window_recalculate_frameset(struct browser_window *bw)
+{
int widths[bw->cols][bw->rows];
int heights[bw->cols][bw->rows];
int bw_width, bw_height;
@@ -636,7 +638,8 @@ void browser_window_recalculate_frameset(struct
browser_window *bw) {
* \param bw The browser window to resize
*/
-void browser_window_resize_frame(struct browser_window *bw, int x, int y) {
+void browser_window_resize_frame(struct browser_window *bw, int x, int y)
+{
struct browser_window *parent;
struct browser_window *sibling;
int col = -1, row = -1, i;
@@ -679,7 +682,8 @@ void browser_window_resize_frame(struct browser_window *bw,
int x, int y) {
bool browser_window_resolve_frame_dimension(struct browser_window *bw,
struct browser_window *sibling,
- int x, int y, bool width, bool height) {
+ int x, int y, bool width, bool height)
+{
int bw_dimension, sibling_dimension;
int bw_pixels, sibling_pixels;
struct frame_dimension *bw_d, *sibling_d;
@@ -796,7 +800,8 @@ bool browser_window_resolve_frame_dimension(struct
browser_window *bw,
bool browser_window_resize_frames(struct browser_window *bw,
browser_mouse_state mouse, int x, int y,
- gui_pointer_shape *pointer) {
+ gui_pointer_shape *pointer)
+{
struct browser_window *parent;
bool left, right, up, down;
int i, resize_margin;
@@ -847,13 +852,21 @@ bool browser_window_resize_frames(struct browser_window
*bw,
/* check the sibling frames can be resized */
if (left)
- left &= !parent->children[row * parent->cols +
(col - 1)].no_resize;
+ left &= !parent->children[row *
+ parent->cols + (col - 1)].
+ no_resize;
if (right)
- right &= !parent->children[row * parent->cols +
(col + 1)].no_resize;
+ right &= !parent->children[row *
+ parent->cols + (col + 1)].
+ no_resize;
if (up)
- up &= !parent->children[(row - 1) *
parent->cols + col].no_resize;
+ up &= !parent->children[(row - 1) *
+ parent->cols + col].
+ no_resize;
if (down)
- down &= !parent->children[(row + 1) *
parent->cols + col].no_resize;
+ down &= !parent->children[(row + 1) *
+ parent->cols + col].
+ no_resize;
/* can't have opposite directions simultaneously */
if (up)
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/7277ce5dfc981394047bb865ceaf3a37fc33ccd6
commit 7277ce5dfc981394047bb865ceaf3a37fc33ccd6
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Remove redundant "action" param.
diff --git a/desktop/frames.c b/desktop/frames.c
index da9a7dc..4d38440 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -796,8 +796,7 @@ bool browser_window_resolve_frame_dimension(struct
browser_window *bw,
bool browser_window_resize_frames(struct browser_window *bw,
browser_mouse_state mouse, int x, int y,
- gui_pointer_shape *pointer,
- bool *action) {
+ gui_pointer_shape *pointer) {
struct browser_window *parent;
bool left, right, up, down;
int i, resize_margin;
@@ -896,8 +895,6 @@ bool browser_window_resize_frames(struct browser_window *bw,
bw->drag_resize_right = right;
bw->drag_resize_up = up;
bw->drag_resize_down = down;
-
- *action = true;
}
return true;
}
@@ -906,13 +903,13 @@ bool browser_window_resize_frames(struct browser_window
*bw,
if (bw->children) {
for (i = 0; i < (bw->cols * bw->rows); i++)
if (browser_window_resize_frames(&bw->children[i],
- mouse, x, y, pointer, action))
+ mouse, x, y, pointer))
return true;
}
if (bw->iframes) {
for (i = 0; i < bw->iframe_count; i++)
if (browser_window_resize_frames(&bw->iframes[i],
- mouse, x, y, pointer, action))
+ mouse, x, y, pointer))
return true;
}
return false;
diff --git a/desktop/frames.h b/desktop/frames.h
index 68a182c..5175791 100644
--- a/desktop/frames.h
+++ b/desktop/frames.h
@@ -35,7 +35,7 @@ void browser_window_create_frameset(struct browser_window *bw,
void browser_window_recalculate_frameset(struct browser_window *bw);
bool browser_window_resize_frames(struct browser_window *bw,
browser_mouse_state mouse, int x, int y,
- gui_pointer_shape *pointer, bool *action);
+ gui_pointer_shape *pointer);
void browser_window_resize_frame(struct browser_window *bw, int x, int y);
void browser_window_scroll_callback(void *client_data,
diff --git a/render/html_interaction.c b/render/html_interaction.c
index be43ceb..0575ad1 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -587,8 +587,12 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
parent = parent->parent);
if (browser_window_resize_frames(parent, mouse,
x + bw->x, y + bw->y,
- &pointer, &done)) {
- status = messages_get("FrameDrag");
+ &pointer)) {
+ if (mouse & (BROWSER_MOUSE_DRAG_1 |
+ BROWSER_MOUSE_DRAG_2)) {
+ status = messages_get("FrameDrag");
+ }
+ done = true;
}
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/83c8e940f80368771eb499f8fbea6abafe04cd67
commit 83c8e940f80368771eb499f8fbea6abafe04cd67
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Don't pass status to frames handler.
diff --git a/desktop/frames.c b/desktop/frames.c
index 72f1ba5..da9a7dc 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -796,7 +796,7 @@ bool browser_window_resolve_frame_dimension(struct
browser_window *bw,
bool browser_window_resize_frames(struct browser_window *bw,
browser_mouse_state mouse, int x, int y,
- gui_pointer_shape *pointer, const char **status,
+ gui_pointer_shape *pointer,
bool *action) {
struct browser_window *parent;
bool left, right, up, down;
@@ -897,7 +897,6 @@ bool browser_window_resize_frames(struct browser_window *bw,
bw->drag_resize_up = up;
bw->drag_resize_down = down;
- *status = messages_get("FrameDrag");
*action = true;
}
return true;
@@ -907,13 +906,13 @@ bool browser_window_resize_frames(struct browser_window
*bw,
if (bw->children) {
for (i = 0; i < (bw->cols * bw->rows); i++)
if (browser_window_resize_frames(&bw->children[i],
- mouse, x, y, pointer, status, action))
+ mouse, x, y, pointer, action))
return true;
}
if (bw->iframes) {
for (i = 0; i < bw->iframe_count; i++)
if (browser_window_resize_frames(&bw->iframes[i],
- mouse, x, y, pointer, status, action))
+ mouse, x, y, pointer, action))
return true;
}
return false;
diff --git a/desktop/frames.h b/desktop/frames.h
index 11fbcea..68a182c 100644
--- a/desktop/frames.h
+++ b/desktop/frames.h
@@ -35,7 +35,7 @@ void browser_window_create_frameset(struct browser_window *bw,
void browser_window_recalculate_frameset(struct browser_window *bw);
bool browser_window_resize_frames(struct browser_window *bw,
browser_mouse_state mouse, int x, int y,
- gui_pointer_shape *pointer, const char **status, bool *action);
+ gui_pointer_shape *pointer, bool *action);
void browser_window_resize_frame(struct browser_window *bw, int x, int y);
void browser_window_scroll_callback(void *client_data,
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 8b56237..be43ceb 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -585,9 +585,11 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
struct browser_window *parent;
for (parent = bw->parent; parent->parent;
parent = parent->parent);
- done = browser_window_resize_frames(parent, mouse,
+ if (browser_window_resize_frames(parent, mouse,
x + bw->x, y + bw->y,
- &pointer, &status, &done);
+ &pointer, &done)) {
+ status = messages_get("FrameDrag");
+ }
}
/* if clicking in the main page, remove the selection from any
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/02d5589dfab86f13b1fc93ae32c52540d0c97f80
commit 02d5589dfab86f13b1fc93ae32c52540d0c97f80
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
When dragging frames, we're done handling mouse.
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 3b6f955..8b56237 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -585,7 +585,7 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
struct browser_window *parent;
for (parent = bw->parent; parent->parent;
parent = parent->parent);
- browser_window_resize_frames(parent, mouse,
+ done = browser_window_resize_frames(parent, mouse,
x + bw->x, y + bw->y,
&pointer, &status, &done);
}
-----------------------------------------------------------------------
Summary of changes:
desktop/frames.c | 55 +++++++++++++++++++++++++++++++-------------
desktop/frames.h | 4 +-
render/html_interaction.c | 14 +++++-----
3 files changed, 48 insertions(+), 25 deletions(-)
diff --git a/desktop/frames.c b/desktop/frames.c
index 72f1ba5..836108a 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -288,7 +288,8 @@ void browser_window_recalculate_iframes(struct
browser_window *bw)
*/
void browser_window_create_frameset(struct browser_window *bw,
- struct content_html_frames *frameset) {
+ struct content_html_frames *frameset)
+{
int row, col, index;
struct content_html_frames *frame;
struct browser_window *window;
@@ -401,7 +402,8 @@ void browser_window_create_frameset(struct browser_window
*bw,
* \param bw The browser window to reposition framesets for
*/
-void browser_window_recalculate_frameset(struct browser_window *bw) {
+void browser_window_recalculate_frameset(struct browser_window *bw)
+{
int widths[bw->cols][bw->rows];
int heights[bw->cols][bw->rows];
int bw_width, bw_height;
@@ -636,7 +638,8 @@ void browser_window_recalculate_frameset(struct
browser_window *bw) {
* \param bw The browser window to resize
*/
-void browser_window_resize_frame(struct browser_window *bw, int x, int y) {
+void browser_window_resize_frame(struct browser_window *bw, int x, int y)
+{
struct browser_window *parent;
struct browser_window *sibling;
int col = -1, row = -1, i;
@@ -679,7 +682,8 @@ void browser_window_resize_frame(struct browser_window *bw,
int x, int y) {
bool browser_window_resolve_frame_dimension(struct browser_window *bw,
struct browser_window *sibling,
- int x, int y, bool width, bool height) {
+ int x, int y, bool width, bool height)
+{
int bw_dimension, sibling_dimension;
int bw_pixels, sibling_pixels;
struct frame_dimension *bw_d, *sibling_d;
@@ -794,10 +798,10 @@ bool browser_window_resolve_frame_dimension(struct
browser_window *bw,
}
-bool browser_window_resize_frames(struct browser_window *bw,
+static bool browser_window_resize_frames(struct browser_window *bw,
browser_mouse_state mouse, int x, int y,
- gui_pointer_shape *pointer, const char **status,
- bool *action) {
+ gui_pointer_shape *pointer)
+{
struct browser_window *parent;
bool left, right, up, down;
int i, resize_margin;
@@ -848,13 +852,21 @@ bool browser_window_resize_frames(struct browser_window
*bw,
/* check the sibling frames can be resized */
if (left)
- left &= !parent->children[row * parent->cols +
(col - 1)].no_resize;
+ left &= !parent->children[row *
+ parent->cols + (col - 1)].
+ no_resize;
if (right)
- right &= !parent->children[row * parent->cols +
(col + 1)].no_resize;
+ right &= !parent->children[row *
+ parent->cols + (col + 1)].
+ no_resize;
if (up)
- up &= !parent->children[(row - 1) *
parent->cols + col].no_resize;
+ up &= !parent->children[(row - 1) *
+ parent->cols + col].
+ no_resize;
if (down)
- down &= !parent->children[(row + 1) *
parent->cols + col].no_resize;
+ down &= !parent->children[(row + 1) *
+ parent->cols + col].
+ no_resize;
/* can't have opposite directions simultaneously */
if (up)
@@ -896,9 +908,6 @@ bool browser_window_resize_frames(struct browser_window *bw,
bw->drag_resize_right = right;
bw->drag_resize_up = up;
bw->drag_resize_down = down;
-
- *status = messages_get("FrameDrag");
- *action = true;
}
return true;
}
@@ -907,14 +916,28 @@ bool browser_window_resize_frames(struct browser_window
*bw,
if (bw->children) {
for (i = 0; i < (bw->cols * bw->rows); i++)
if (browser_window_resize_frames(&bw->children[i],
- mouse, x, y, pointer, status, action))
+ mouse, x, y, pointer))
return true;
}
if (bw->iframes) {
for (i = 0; i < bw->iframe_count; i++)
if (browser_window_resize_frames(&bw->iframes[i],
- mouse, x, y, pointer, status, action))
+ mouse, x, y, pointer))
return true;
}
return false;
}
+
+
+bool browser_window_frame_resize_start(struct browser_window *bw,
+ browser_mouse_state mouse, int x, int y,
+ gui_pointer_shape *pointer)
+{
+ struct browser_window *root = browser_window_get_root(bw);
+ int offx, offy;
+
+ browser_window_get_position(bw, true, &offx, &offy);
+
+ return browser_window_resize_frames(root, mouse,
+ x + offx, y + offy, pointer);
+}
diff --git a/desktop/frames.h b/desktop/frames.h
index 11fbcea..efbe6a8 100644
--- a/desktop/frames.h
+++ b/desktop/frames.h
@@ -33,9 +33,9 @@ void browser_window_recalculate_iframes(struct browser_window
*bw);
void browser_window_create_frameset(struct browser_window *bw,
struct content_html_frames *frameset);
void browser_window_recalculate_frameset(struct browser_window *bw);
-bool browser_window_resize_frames(struct browser_window *bw,
+bool browser_window_frame_resize_start(struct browser_window *bw,
browser_mouse_state mouse, int x, int y,
- gui_pointer_shape *pointer, const char **status, bool *action);
+ gui_pointer_shape *pointer);
void browser_window_resize_frame(struct browser_window *bw, int x, int y);
void browser_window_scroll_callback(void *client_data,
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 3b6f955..4cdff76 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -581,13 +581,13 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
bool done = false;
/* frame resizing */
- if (bw->parent) {
- struct browser_window *parent;
- for (parent = bw->parent; parent->parent;
- parent = parent->parent);
- browser_window_resize_frames(parent, mouse,
- x + bw->x, y + bw->y,
- &pointer, &status, &done);
+ if (browser_window_frame_resize_start(bw, mouse, x, y,
+ &pointer)) {
+ if (mouse & (BROWSER_MOUSE_DRAG_1 |
+ BROWSER_MOUSE_DRAG_2)) {
+ status = messages_get("FrameDrag");
+ }
+ done = true;
}
/* if clicking in the main page, remove the selection from any
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org