Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/8de56251939951c7069c4...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/8de56251939951c7069c4a8...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/8de56251939951c7069c4a84e...
The branch, master has been updated
via 8de56251939951c7069c4a84e19673be8e5edddf (commit)
via b35b3c136412a3795684d969821f849035f7c570 (commit)
via c0205478c076a3e118b52602c41adae1658076db (commit)
via 2ad990f3d54dabbd1ea9233119d81ce8a97fa215 (commit)
via 4a014fecde6a4f38c99b820297df65da4555137c (commit)
via 7ba93407adde44c975b57811605451e39ace0183 (commit)
from cebfa6c2cc69e4fba14910b5f93c7b0e9d538197 (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=8de56251939951c7069...
commit 8de56251939951c7069c4a84e19673be8e5edddf
Author: Michael Drake <michael.drake(a)codethink.co.uk>
Commit: Michael Drake <michael.drake(a)codethink.co.uk>
HTML CSS handler: event->data.error is invalid for errorcode.
diff --git a/render/html_css.c b/render/html_css.c
index 47c2185..ad1470d 100644
--- a/render/html_css.c
+++ b/render/html_css.c
@@ -109,8 +109,8 @@ html_convert_css_callback(hlcache_handle *css,
break;
case CONTENT_MSG_ERROR:
- case CONTENT_MSG_ERRORCODE:
LOG("stylesheet %s failed: %s", nsurl_access(hlcache_handle_get_url(css)),
event->data.error);
+ case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(css);
s->sheet = NULL;
parent->base.active--;
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=b35b3c136412a379568...
commit b35b3c136412a3795684d969821f849035f7c570
Author: Michael Drake <michael.drake(a)codethink.co.uk>
Commit: Michael Drake <michael.drake(a)codethink.co.uk>
Search web: Ensure hlcache callbacks handle errorcode.
diff --git a/desktop/searchweb.c b/desktop/searchweb.c
index 29a998e..fb7ecc0 100644
--- a/desktop/searchweb.c
+++ b/desktop/searchweb.c
@@ -296,6 +296,7 @@ search_web_ico_callback(hlcache_handle *ico,
case CONTENT_MSG_ERROR:
LOG("icon %s error: %s", nsurl_access(hlcache_handle_get_url(ico)),
event->data.error);
+ case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(ico);
/* clear reference to released handle */
provider->ico_handle = NULL;
@@ -450,6 +451,7 @@ default_ico_callback(hlcache_handle *ico,
case CONTENT_MSG_ERROR:
LOG("icon %s error: %s", nsurl_access(hlcache_handle_get_url(ico)),
event->data.error);
+ case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(ico);
/* clear reference to released handle */
ctx->default_ico_handle = NULL;
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=c0205478c076a3e118b...
commit c0205478c076a3e118b52602c41adae1658076db
Author: Michael Drake <michael.drake(a)codethink.co.uk>
Commit: Michael Drake <michael.drake(a)codethink.co.uk>
HTML object hlcache callback: Ensure final fetch completion triggers reformat.
Even if the final fetch finished with ERRORCODE.
diff --git a/render/html_object.c b/render/html_object.c
index 0daf33d..c86c575 100644
--- a/render/html_object.c
+++ b/render/html_object.c
@@ -440,7 +440,8 @@ html_object_callback(hlcache_handle *object,
c->base.active == 0 &&
(event->type == CONTENT_MSG_LOADING ||
event->type == CONTENT_MSG_DONE ||
- event->type == CONTENT_MSG_ERROR)) {
+ event->type == CONTENT_MSG_ERROR ||
+ event->type == CONTENT_MSG_ERRORCODE)) {
/* all objects have arrived */
content__reformat(&c->base, false, c->base.available_width,
c->base.height);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=2ad990f3d54dabbd1ea...
commit 2ad990f3d54dabbd1ea9233119d81ce8a97fa215
Author: Michael Drake <michael.drake(a)codethink.co.uk>
Commit: Michael Drake <michael.drake(a)codethink.co.uk>
HTML object hlcache callback: Errorcode without box is OK.
diff --git a/render/html_object.c b/render/html_object.c
index f304e91..0daf33d 100644
--- a/render/html_object.c
+++ b/render/html_object.c
@@ -125,7 +125,9 @@ html_object_callback(hlcache_handle *object,
struct box *box;
box = o->box;
- if (box == NULL && event->type != CONTENT_MSG_ERROR) {
+ if (box == NULL &&
+ event->type != CONTENT_MSG_ERROR &&
+ event->type != CONTENT_MSG_ERRORCODE) {
return NSERROR_OK;
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=4a014fecde6a4f38c99...
commit 4a014fecde6a4f38c99b820297df65da4555137c
Author: Michael Drake <michael.drake(a)codethink.co.uk>
Commit: Michael Drake <michael.drake(a)codethink.co.uk>
hlcache content callback: Use designated initialiser for hlcache_event.
diff --git a/content/hlcache.c b/content/hlcache.c
index 249275e..2242b73 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -182,12 +182,11 @@ static void hlcache_content_callback(struct content *c, content_msg
msg,
const union content_msg_data *data, void *pw)
{
hlcache_handle *handle = pw;
- hlcache_event event;
nserror error = NSERROR_OK;
+ hlcache_event event = {
+ .type = msg,
+ };
- memset(&event, 0, sizeof(event));
-
- event.type = msg;
if (data != NULL) {
event.data = *data;
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=7ba93407adde44c975b...
commit 7ba93407adde44c975b57811605451e39ace0183
Author: Michael Drake <michael.drake(a)codethink.co.uk>
Commit: Michael Drake <michael.drake(a)codethink.co.uk>
Messages: Do message lookups for all errorcodes.
diff --git a/utils/messages.c b/utils/messages.c
index 5f55cb9..bca1b47 100644
--- a/utils/messages.c
+++ b/utils/messages.c
@@ -338,6 +338,10 @@ const char *messages_get_errorcode(nserror code)
/* Requested item not found */
return messages_get_ctx("NotFound", messages_hash);
+ case NSERROR_NOT_DIRECTORY:
+ /* Missing directory */
+ return messages_get_ctx("NotDirectory", messages_hash);
+
case NSERROR_SAVE_FAILED:
/* Failed to save data */
return messages_get_ctx("SaveFailed", messages_hash);
@@ -350,6 +354,26 @@ const char *messages_get_errorcode(nserror code)
/* Initialisation failed */
return messages_get_ctx("InitFailed", messages_hash);
+ case NSERROR_BMP_ERROR:
+ /* A BMP error occurred */
+ return messages_get_ctx("BMPError", messages_hash);
+
+ case NSERROR_GIF_ERROR:
+ /* A GIF error occurred */
+ return messages_get_ctx("GIFError", messages_hash);
+
+ case NSERROR_ICO_ERROR:
+ /* A ICO error occurred */
+ return messages_get_ctx("ICOError", messages_hash);
+
+ case NSERROR_PNG_ERROR:
+ /* A PNG error occurred */
+ return messages_get_ctx("PNGError", messages_hash);
+
+ case NSERROR_SVG_ERROR:
+ /* A SVG error occurred */
+ return messages_get_ctx("SVGError", messages_hash);
+
case NSERROR_BAD_ENCODING:
/* The character set is unknown */
return messages_get_ctx("BadEncoding", messages_hash);
@@ -394,13 +418,40 @@ const char *messages_get_errorcode(nserror code)
/* Bad URL */
return messages_get_ctx("BadURL", messages_hash);
- default:
+ case NSERROR_BAD_CONTENT:
+ /* Bad Content */
+ return messages_get_ctx("BadContent", messages_hash);
+
+ case NSERROR_FRAME_DEPTH:
+ /* Exceeded frame depth */
+ return messages_get_ctx("FrameDepth", messages_hash);
+
+ case NSERROR_PERMISSION:
+ /* Permission error */
+ return messages_get_ctx("PermissionError", messages_hash);
+
+ case NSERROR_BAD_SIZE:
+ /* Bad size */
+ return messages_get_ctx("BadSize", messages_hash);
+
+ case NSERROR_NOSPACE:
+ /* Insufficient space */
+ return messages_get_ctx("NoSpace", messages_hash);
+
+ case NSERROR_NOT_IMPLEMENTED:
+ /* Functionality is not implemented */
+ return messages_get_ctx("NotImplemented", messages_hash);
+
case NSERROR_UNKNOWN:
- break;
+ /* Unknown error */
+ return messages_get_ctx("Unknown", messages_hash);
}
- /* Unknown error */
- return messages_get_ctx("Unknown", messages_hash);
+ /* The switch has no default, so the compiler should tell us when we
+ * forget to add messages for new error codes. As such, we should
+ * never get here.
+ */
+ assert(0);
}
-----------------------------------------------------------------------
Summary of changes:
content/hlcache.c | 7 +++---
desktop/searchweb.c | 2 ++
render/html_css.c | 2 +-
render/html_object.c | 7 ++++--
utils/messages.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++----
5 files changed, 66 insertions(+), 11 deletions(-)
diff --git a/content/hlcache.c b/content/hlcache.c
index 249275e..2242b73 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -182,12 +182,11 @@ static void hlcache_content_callback(struct content *c, content_msg
msg,
const union content_msg_data *data, void *pw)
{
hlcache_handle *handle = pw;
- hlcache_event event;
nserror error = NSERROR_OK;
+ hlcache_event event = {
+ .type = msg,
+ };
- memset(&event, 0, sizeof(event));
-
- event.type = msg;
if (data != NULL) {
event.data = *data;
}
diff --git a/desktop/searchweb.c b/desktop/searchweb.c
index 29a998e..fb7ecc0 100644
--- a/desktop/searchweb.c
+++ b/desktop/searchweb.c
@@ -296,6 +296,7 @@ search_web_ico_callback(hlcache_handle *ico,
case CONTENT_MSG_ERROR:
LOG("icon %s error: %s", nsurl_access(hlcache_handle_get_url(ico)),
event->data.error);
+ case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(ico);
/* clear reference to released handle */
provider->ico_handle = NULL;
@@ -450,6 +451,7 @@ default_ico_callback(hlcache_handle *ico,
case CONTENT_MSG_ERROR:
LOG("icon %s error: %s", nsurl_access(hlcache_handle_get_url(ico)),
event->data.error);
+ case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(ico);
/* clear reference to released handle */
ctx->default_ico_handle = NULL;
diff --git a/render/html_css.c b/render/html_css.c
index 47c2185..ad1470d 100644
--- a/render/html_css.c
+++ b/render/html_css.c
@@ -109,8 +109,8 @@ html_convert_css_callback(hlcache_handle *css,
break;
case CONTENT_MSG_ERROR:
- case CONTENT_MSG_ERRORCODE:
LOG("stylesheet %s failed: %s", nsurl_access(hlcache_handle_get_url(css)),
event->data.error);
+ case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(css);
s->sheet = NULL;
parent->base.active--;
diff --git a/render/html_object.c b/render/html_object.c
index f304e91..c86c575 100644
--- a/render/html_object.c
+++ b/render/html_object.c
@@ -125,7 +125,9 @@ html_object_callback(hlcache_handle *object,
struct box *box;
box = o->box;
- if (box == NULL && event->type != CONTENT_MSG_ERROR) {
+ if (box == NULL &&
+ event->type != CONTENT_MSG_ERROR &&
+ event->type != CONTENT_MSG_ERRORCODE) {
return NSERROR_OK;
}
@@ -438,7 +440,8 @@ html_object_callback(hlcache_handle *object,
c->base.active == 0 &&
(event->type == CONTENT_MSG_LOADING ||
event->type == CONTENT_MSG_DONE ||
- event->type == CONTENT_MSG_ERROR)) {
+ event->type == CONTENT_MSG_ERROR ||
+ event->type == CONTENT_MSG_ERRORCODE)) {
/* all objects have arrived */
content__reformat(&c->base, false, c->base.available_width,
c->base.height);
diff --git a/utils/messages.c b/utils/messages.c
index 5f55cb9..bca1b47 100644
--- a/utils/messages.c
+++ b/utils/messages.c
@@ -338,6 +338,10 @@ const char *messages_get_errorcode(nserror code)
/* Requested item not found */
return messages_get_ctx("NotFound", messages_hash);
+ case NSERROR_NOT_DIRECTORY:
+ /* Missing directory */
+ return messages_get_ctx("NotDirectory", messages_hash);
+
case NSERROR_SAVE_FAILED:
/* Failed to save data */
return messages_get_ctx("SaveFailed", messages_hash);
@@ -350,6 +354,26 @@ const char *messages_get_errorcode(nserror code)
/* Initialisation failed */
return messages_get_ctx("InitFailed", messages_hash);
+ case NSERROR_BMP_ERROR:
+ /* A BMP error occurred */
+ return messages_get_ctx("BMPError", messages_hash);
+
+ case NSERROR_GIF_ERROR:
+ /* A GIF error occurred */
+ return messages_get_ctx("GIFError", messages_hash);
+
+ case NSERROR_ICO_ERROR:
+ /* A ICO error occurred */
+ return messages_get_ctx("ICOError", messages_hash);
+
+ case NSERROR_PNG_ERROR:
+ /* A PNG error occurred */
+ return messages_get_ctx("PNGError", messages_hash);
+
+ case NSERROR_SVG_ERROR:
+ /* A SVG error occurred */
+ return messages_get_ctx("SVGError", messages_hash);
+
case NSERROR_BAD_ENCODING:
/* The character set is unknown */
return messages_get_ctx("BadEncoding", messages_hash);
@@ -394,13 +418,40 @@ const char *messages_get_errorcode(nserror code)
/* Bad URL */
return messages_get_ctx("BadURL", messages_hash);
- default:
+ case NSERROR_BAD_CONTENT:
+ /* Bad Content */
+ return messages_get_ctx("BadContent", messages_hash);
+
+ case NSERROR_FRAME_DEPTH:
+ /* Exceeded frame depth */
+ return messages_get_ctx("FrameDepth", messages_hash);
+
+ case NSERROR_PERMISSION:
+ /* Permission error */
+ return messages_get_ctx("PermissionError", messages_hash);
+
+ case NSERROR_BAD_SIZE:
+ /* Bad size */
+ return messages_get_ctx("BadSize", messages_hash);
+
+ case NSERROR_NOSPACE:
+ /* Insufficient space */
+ return messages_get_ctx("NoSpace", messages_hash);
+
+ case NSERROR_NOT_IMPLEMENTED:
+ /* Functionality is not implemented */
+ return messages_get_ctx("NotImplemented", messages_hash);
+
case NSERROR_UNKNOWN:
- break;
+ /* Unknown error */
+ return messages_get_ctx("Unknown", messages_hash);
}
- /* Unknown error */
- return messages_get_ctx("Unknown", messages_hash);
+ /* The switch has no default, so the compiler should tell us when we
+ * forget to add messages for new error codes. As such, we should
+ * never get here.
+ */
+ assert(0);
}
--
NetSurf Browser