Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/5aeca580f43c5866794a6...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/5aeca580f43c5866794a630...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/5aeca580f43c5866794a630e3...
The branch, master has been updated
via 5aeca580f43c5866794a630e35fa18dbfeefaa01 (commit)
via 044ddd5d432aa94ff30851407b8c81875c655a83 (commit)
from 6e7f98787a78f2d6666b68af747a000dcd2dba9a (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=5aeca580f43c5866794...
commit 5aeca580f43c5866794a630e35fa18dbfeefaa01
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
save complete: Change de-duplication to compare URLs, rather than contents.
We seem to have more than one content for the same resource.
For example:
* save `<img src="about:logo"><img src="about:logo">`
as img-test.html
* run `rm -rf test-save && make && ./nsgtk img-test.html`
* ctrl+s
* save as "test-save" in the current netsurf dir.
* run `md5sum test-save/*`
before and after this commit. The de-duplication works with URLs,
where it wasn't working with hlcache_handles or contents.
diff --git a/desktop/save_complete.c b/desktop/save_complete.c
index d7a02ae..b54e7f3 100644
--- a/desktop/save_complete.c
+++ b/desktop/save_complete.c
@@ -370,8 +370,10 @@ save_complete_save_stylesheet(save_complete_ctx *ctx, hlcache_handle
*css)
char filename[32];
bool result;
- if (save_complete_ctx_has_content(ctx, css))
+ if (save_complete_ctx_find_content(ctx,
+ hlcache_handle_get_url(css)) != NULL) {
return true;
+ }
if (save_complete_ctx_add_content(ctx, css) == false) {
guit->misc->warning("NoMemory", 0);
@@ -473,8 +475,10 @@ save_complete_save_html_object(save_complete_ctx *ctx, hlcache_handle
*obj)
if (obj_data == NULL)
return true;
- if (save_complete_ctx_has_content(ctx, obj))
+ if (save_complete_ctx_find_content(ctx,
+ hlcache_handle_get_url(obj)) != NULL) {
return true;
+ }
if (save_complete_ctx_add_content(ctx, obj) == false) {
guit->misc->warning("NoMemory", 0);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=044ddd5d432aa94ff30...
commit 044ddd5d432aa94ff30851407b8c81875c655a83
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
save complete: ctx_find_content: compare contents, not hlcache_handles
There can be multiple hlcache_handles per sharable content.
diff --git a/desktop/save_complete.c b/desktop/save_complete.c
index 1ecb313..d7a02ae 100644
--- a/desktop/save_complete.c
+++ b/desktop/save_complete.c
@@ -147,7 +147,8 @@ save_complete_ctx_has_content(save_complete_ctx *ctx,
save_complete_entry *entry;
for (entry = ctx->list; entry != NULL; entry = entry->next) {
- if (entry->content == content)
+ if (hlcache_handle_get_content(entry->content) ==
+ hlcache_handle_get_content(content))
return true;
}
-----------------------------------------------------------------------
Summary of changes:
desktop/save_complete.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/desktop/save_complete.c b/desktop/save_complete.c
index 1ecb313..b54e7f3 100644
--- a/desktop/save_complete.c
+++ b/desktop/save_complete.c
@@ -147,7 +147,8 @@ save_complete_ctx_has_content(save_complete_ctx *ctx,
save_complete_entry *entry;
for (entry = ctx->list; entry != NULL; entry = entry->next) {
- if (entry->content == content)
+ if (hlcache_handle_get_content(entry->content) ==
+ hlcache_handle_get_content(content))
return true;
}
@@ -369,8 +370,10 @@ save_complete_save_stylesheet(save_complete_ctx *ctx, hlcache_handle
*css)
char filename[32];
bool result;
- if (save_complete_ctx_has_content(ctx, css))
+ if (save_complete_ctx_find_content(ctx,
+ hlcache_handle_get_url(css)) != NULL) {
return true;
+ }
if (save_complete_ctx_add_content(ctx, css) == false) {
guit->misc->warning("NoMemory", 0);
@@ -472,8 +475,10 @@ save_complete_save_html_object(save_complete_ctx *ctx, hlcache_handle
*obj)
if (obj_data == NULL)
return true;
- if (save_complete_ctx_has_content(ctx, obj))
+ if (save_complete_ctx_find_content(ctx,
+ hlcache_handle_get_url(obj)) != NULL) {
return true;
+ }
if (save_complete_ctx_add_content(ctx, obj) == false) {
guit->misc->warning("NoMemory", 0);
--
NetSurf Browser