Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/19b3876ff27b5dfb48c9694721e528827742e654
...commit
http://git.netsurf-browser.org/netsurf.git/commit/19b3876ff27b5dfb48c9694721e528827742e654
...tree
http://git.netsurf-browser.org/netsurf.git/tree/19b3876ff27b5dfb48c9694721e528827742e654
The branch, master has been updated
via 19b3876ff27b5dfb48c9694721e528827742e654 (commit)
via d09dc4431045df534fd909ade462b9d7c6b8b135 (commit)
via 5810d131d5b28e448b8f9c707942f336f6113f5e (commit)
via 8c12ecd5cd167c298d8c8097cc2d4b7a988db499 (commit)
via 41e12953dcbc05fd69304415ba7d6357642739fe (commit)
from cc6c3a7c707878cbb0598476c1f8185d6a2557d5 (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/19b3876ff27b5dfb48c9694721e528827742e654
commit 19b3876ff27b5dfb48c9694721e528827742e654
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Fix comment.
diff --git a/render/search.c b/render/search.c
index 246c4e3..96166ed 100644
--- a/render/search.c
+++ b/render/search.c
@@ -113,7 +113,7 @@ static struct browser_window *search_get_browser_window(
/**
* create a search_context
- * \param bw the browser_window the search_context is connected to
+ * \param h the hlcache_handle the search_context is connected to
* \param callbacks the callbacks to modify appearance according to results
* \param p the pointer to send to the callbacks
* \return true for success
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/d09dc4431045df534fd909ade462b9d7c6b8b135
commit d09dc4431045df534fd909ade462b9d7c6b8b135
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Use content message broadcast to request scrolls, instead of depending on
html and text contents to keep a bw pointer.
diff --git a/render/search.c b/render/search.c
index b6f64da..246c4e3 100644
--- a/render/search.c
+++ b/render/search.c
@@ -202,7 +202,7 @@ void search_step(struct search_context *context,
search_flags_t flags,
for(i = 0; i < string_len; i++)
if (string[i] != '#' && string[i] != '*') break;
if (i >= string_len) {
- struct browser_window *bw;
+ union content_msg_data msg_data;
free_matches(context);
if (context->callbacks->status != NULL)
context->callbacks->status(true, context->p);
@@ -211,9 +211,10 @@ void search_step(struct search_context *context,
search_flags_t flags,
if (context->callbacks->forward_state != NULL)
context->callbacks->forward_state(false, context->p);
- bw = search_get_browser_window(context);
- if (bw != NULL)
- browser_window_set_scroll(bw, 0, 0);
+ msg_data.scroll.area = false;
+ msg_data.scroll.x0 = 0;
+ msg_data.scroll.y0 = 0;
+ content_broadcast(context->c, CONTENT_MSG_SCROLL, msg_data);
return;
}
search_text(string, string_len, context, flags);
@@ -259,7 +260,7 @@ void search_text(const char *string, int string_len,
{
struct rect bounds;
struct box *box = NULL;
- struct browser_window *bw;
+ union content_msg_data msg_data;
bool case_sensitive, forwards, showall;
case_sensitive = ((flags & SEARCH_FLAG_CASE_SENSITIVE) != 0) ?
@@ -374,9 +375,12 @@ void search_text(const char *string, int string_len,
context->current->end_idx, &bounds);
}
- bw = search_get_browser_window(context);
- if (bw != NULL)
- browser_window_scroll_visible(bw, &bounds);
+ msg_data.scroll.area = true;
+ msg_data.scroll.x0 = bounds.x0;
+ msg_data.scroll.y0 = bounds.y0;
+ msg_data.scroll.x1 = bounds.x1;
+ msg_data.scroll.y1 = bounds.y1;
+ content_broadcast(context->c, CONTENT_MSG_SCROLL, msg_data);
}
/**
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/5810d131d5b28e448b8f9c707942f336f6113f5e
commit 5810d131d5b28e448b8f9c707942f336f6113f5e
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Let HTML content handle object content srcoll request messages.
diff --git a/render/html.c b/render/html.c
index 3ee85b4..0099296 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1229,6 +1229,15 @@ html_object_callback(hlcache_handle *object,
/* Don't care about favicons */
break;
+ case CONTENT_MSG_SCROLL:
+ if (box->scroll_x != NULL)
+ scrollbar_set(box->scroll_x, event->data.scroll.x0,
+ false);
+ if (box->scroll_y != NULL)
+ scrollbar_set(box->scroll_y, event->data.scroll.y0,
+ false);
+ break;
+
default:
assert(0);
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/8c12ecd5cd167c298d8c8097cc2d4b7a988db499
commit 8c12ecd5cd167c298d8c8097cc2d4b7a988db499
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Let browser window handle content scroll request message.
diff --git a/desktop/browser.c b/desktop/browser.c
index 3b2fa4e..73fcc04 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1411,6 +1411,27 @@ nserror browser_window_callback(hlcache_handle *c,
}
break;
+ case CONTENT_MSG_SCROLL:
+ /* Content wants to be scrolled */
+ if (bw->current_content != c)
+ break;
+
+ if (event->data.scroll.area) {
+ struct rect rect = {
+ .x0 = event->data.scroll.x0,
+ .y0 = event->data.scroll.y0,
+ .x1 = event->data.scroll.x1,
+ .y1 = event->data.scroll.y1
+ };
+ browser_window_scroll_visible(bw, &rect);
+ } else {
+ browser_window_set_scroll(bw,
+ event->data.scroll.x0,
+ event->data.scroll.y0);
+ }
+
+ break;
+
default:
assert(0);
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/41e12953dcbc05fd69304415ba7d6357642739fe
commit 41e12953dcbc05fd69304415ba7d6357642739fe
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Add scroll request message to content message system.
diff --git a/content/content.h b/content/content.h
index 98879f8..ab569dd 100644
--- a/content/content.h
+++ b/content/content.h
@@ -74,6 +74,7 @@ typedef enum {
CONTENT_MSG_DOWNLOAD, /**< download, not for display */
CONTENT_MSG_LINK, /**< RFC5988 link */
CONTENT_MSG_GETCTX, /**< Javascript context */
+ CONTENT_MSG_SCROLL /**< Request to scroll content */
} content_msg;
/** RFC5988 metadata link */
@@ -115,6 +116,14 @@ union content_msg_data {
struct content_rfc5988_link *rfc5988_link;
/** CONTENT_MSG_GETCTX - Javascript context */
struct jscontext **jscontext;
+ /** CONTENT_MSG_SCROLL - Part of content to scroll to show */
+ struct {
+ /** if true, scroll to show area given by (x0, y0) and (x1,y1).
+ * if false, scroll point (x0, y0) to top left of viewport */
+ bool area;
+ int x0, y0;
+ int x1, y1;
+ } scroll;
};
/** parameters to content redraw */
-----------------------------------------------------------------------
Summary of changes:
content/content.h | 9 +++++++++
desktop/browser.c | 21 +++++++++++++++++++++
render/html.c | 9 +++++++++
render/search.c | 22 +++++++++++++---------
4 files changed, 52 insertions(+), 9 deletions(-)
diff --git a/content/content.h b/content/content.h
index 98879f8..ab569dd 100644
--- a/content/content.h
+++ b/content/content.h
@@ -74,6 +74,7 @@ typedef enum {
CONTENT_MSG_DOWNLOAD, /**< download, not for display */
CONTENT_MSG_LINK, /**< RFC5988 link */
CONTENT_MSG_GETCTX, /**< Javascript context */
+ CONTENT_MSG_SCROLL /**< Request to scroll content */
} content_msg;
/** RFC5988 metadata link */
@@ -115,6 +116,14 @@ union content_msg_data {
struct content_rfc5988_link *rfc5988_link;
/** CONTENT_MSG_GETCTX - Javascript context */
struct jscontext **jscontext;
+ /** CONTENT_MSG_SCROLL - Part of content to scroll to show */
+ struct {
+ /** if true, scroll to show area given by (x0, y0) and (x1,y1).
+ * if false, scroll point (x0, y0) to top left of viewport */
+ bool area;
+ int x0, y0;
+ int x1, y1;
+ } scroll;
};
/** parameters to content redraw */
diff --git a/desktop/browser.c b/desktop/browser.c
index 3b2fa4e..73fcc04 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1411,6 +1411,27 @@ nserror browser_window_callback(hlcache_handle *c,
}
break;
+ case CONTENT_MSG_SCROLL:
+ /* Content wants to be scrolled */
+ if (bw->current_content != c)
+ break;
+
+ if (event->data.scroll.area) {
+ struct rect rect = {
+ .x0 = event->data.scroll.x0,
+ .y0 = event->data.scroll.y0,
+ .x1 = event->data.scroll.x1,
+ .y1 = event->data.scroll.y1
+ };
+ browser_window_scroll_visible(bw, &rect);
+ } else {
+ browser_window_set_scroll(bw,
+ event->data.scroll.x0,
+ event->data.scroll.y0);
+ }
+
+ break;
+
default:
assert(0);
}
diff --git a/render/html.c b/render/html.c
index 3ee85b4..0099296 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1229,6 +1229,15 @@ html_object_callback(hlcache_handle *object,
/* Don't care about favicons */
break;
+ case CONTENT_MSG_SCROLL:
+ if (box->scroll_x != NULL)
+ scrollbar_set(box->scroll_x, event->data.scroll.x0,
+ false);
+ if (box->scroll_y != NULL)
+ scrollbar_set(box->scroll_y, event->data.scroll.y0,
+ false);
+ break;
+
default:
assert(0);
}
diff --git a/render/search.c b/render/search.c
index b6f64da..96166ed 100644
--- a/render/search.c
+++ b/render/search.c
@@ -113,7 +113,7 @@ static struct browser_window *search_get_browser_window(
/**
* create a search_context
- * \param bw the browser_window the search_context is connected to
+ * \param h the hlcache_handle the search_context is connected to
* \param callbacks the callbacks to modify appearance according to results
* \param p the pointer to send to the callbacks
* \return true for success
@@ -202,7 +202,7 @@ void search_step(struct search_context *context,
search_flags_t flags,
for(i = 0; i < string_len; i++)
if (string[i] != '#' && string[i] != '*') break;
if (i >= string_len) {
- struct browser_window *bw;
+ union content_msg_data msg_data;
free_matches(context);
if (context->callbacks->status != NULL)
context->callbacks->status(true, context->p);
@@ -211,9 +211,10 @@ void search_step(struct search_context *context,
search_flags_t flags,
if (context->callbacks->forward_state != NULL)
context->callbacks->forward_state(false, context->p);
- bw = search_get_browser_window(context);
- if (bw != NULL)
- browser_window_set_scroll(bw, 0, 0);
+ msg_data.scroll.area = false;
+ msg_data.scroll.x0 = 0;
+ msg_data.scroll.y0 = 0;
+ content_broadcast(context->c, CONTENT_MSG_SCROLL, msg_data);
return;
}
search_text(string, string_len, context, flags);
@@ -259,7 +260,7 @@ void search_text(const char *string, int string_len,
{
struct rect bounds;
struct box *box = NULL;
- struct browser_window *bw;
+ union content_msg_data msg_data;
bool case_sensitive, forwards, showall;
case_sensitive = ((flags & SEARCH_FLAG_CASE_SENSITIVE) != 0) ?
@@ -374,9 +375,12 @@ void search_text(const char *string, int string_len,
context->current->end_idx, &bounds);
}
- bw = search_get_browser_window(context);
- if (bw != NULL)
- browser_window_scroll_visible(bw, &bounds);
+ msg_data.scroll.area = true;
+ msg_data.scroll.x0 = bounds.x0;
+ msg_data.scroll.y0 = bounds.y0;
+ msg_data.scroll.x1 = bounds.x1;
+ msg_data.scroll.y1 = bounds.y1;
+ content_broadcast(context->c, CONTENT_MSG_SCROLL, msg_data);
}
/**
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org