Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/a72771f8ebdb7ec5474dcb039c92661d97dd4678
...commit
http://git.netsurf-browser.org/netsurf.git/commit/a72771f8ebdb7ec5474dcb039c92661d97dd4678
...tree
http://git.netsurf-browser.org/netsurf.git/tree/a72771f8ebdb7ec5474dcb039c92661d97dd4678
The branch, master has been updated
via a72771f8ebdb7ec5474dcb039c92661d97dd4678 (commit)
from 3c3685eb9635cc46fe78b31d54967b62b948581e (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=a72771f8ebdb7ec5474dcb039c92661d97dd4678
commit a72771f8ebdb7ec5474dcb039c92661d97dd4678
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Browser: Don't add history entry until after reformat.
Adding a history entry causes content_redraw() for the thumbnail.
But we can't content_redraw() until after content_reformat().
Otherwise we get HTML redraw before HTML layout has happened.
diff --git a/desktop/browser.c b/desktop/browser.c
index 19cfebb..88d78ba 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1405,6 +1405,10 @@ browser_window_callback(hlcache_handle *c,
bw->current_content = c;
bw->loading_content = NULL;
+ /* Format the new content to the correct dimensions */
+ browser_window_get_dimensions(bw, &width, &height, true);
+ content_reformat(c, false, width, height);
+
/* history */
if (bw->history_add && bw->history) {
nsurl *url = hlcache_handle_get_url(c);
@@ -1437,14 +1441,14 @@ browser_window_callback(hlcache_handle *c,
* all newly visited URLs. With the history_add call
* after, we only leak the thumbnails when urldb does
* not add the URL.
+ *
+ * Also, since browser_window_history_add can create
+ * a thumbnail (content_redraw), we need to do it after
+ * content_reformat.
*/
browser_window_history_add(bw, c, bw->frag_id);
}
- /* Format the new content to the correct dimensions */
- browser_window_get_dimensions(bw, &width, &height, true);
- content_reformat(c, false, width, height);
-
browser_window_remove_caret(bw, false);
if (bw->window != NULL) {
-----------------------------------------------------------------------
Summary of changes:
desktop/browser.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/desktop/browser.c b/desktop/browser.c
index 19cfebb..88d78ba 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1405,6 +1405,10 @@ browser_window_callback(hlcache_handle *c,
bw->current_content = c;
bw->loading_content = NULL;
+ /* Format the new content to the correct dimensions */
+ browser_window_get_dimensions(bw, &width, &height, true);
+ content_reformat(c, false, width, height);
+
/* history */
if (bw->history_add && bw->history) {
nsurl *url = hlcache_handle_get_url(c);
@@ -1437,14 +1441,14 @@ browser_window_callback(hlcache_handle *c,
* all newly visited URLs. With the history_add call
* after, we only leak the thumbnails when urldb does
* not add the URL.
+ *
+ * Also, since browser_window_history_add can create
+ * a thumbnail (content_redraw), we need to do it after
+ * content_reformat.
*/
browser_window_history_add(bw, c, bw->frag_id);
}
- /* Format the new content to the correct dimensions */
- browser_window_get_dimensions(bw, &width, &height, true);
- content_reformat(c, false, width, height);
-
browser_window_remove_caret(bw, false);
if (bw->window != NULL) {
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org