Purge CONTENT_STATUS_TYPE_UNKNOWN

svn path=/trunk/netsurf/; revision=11861
This commit is contained in:
John Mark Bell 2011-02-28 20:38:23 +00:00
parent 8d13c93c89
commit 8373123b71
3 changed files with 4 additions and 10 deletions

View File

@ -254,7 +254,6 @@ const char * const content_type_name[] = {
};
const char * const content_status_name[] = {
"TYPE_UNKNOWN",
"LOADING",
"READY",
"DONE",
@ -423,9 +422,6 @@ content_type content_lookup(const char *mime_type)
*
* \param url URL of content, copied
* \return the new content structure, or 0 on memory exhaustion
*
* The type is initialised to CONTENT_UNKNOWN, and the status to
* CONTENT_STATUS_TYPE_UNKNOWN.
*/
struct content * content_create(llcache_handle *llcache,
@ -643,8 +639,7 @@ void content_update_status(struct content *c)
if (status == token)
status = token + 4;
if (c->status == CONTENT_STATUS_TYPE_UNKNOWN ||
c->status == CONTENT_STATUS_LOADING ||
if (c->status == CONTENT_STATUS_LOADING ||
c->status == CONTENT_STATUS_READY)
time = wallclock() - c->time;
else
@ -1262,7 +1257,7 @@ content_status content_get_status(hlcache_handle *h)
content_status content__get_status(struct content *c)
{
if (c == NULL)
return CONTENT_STATUS_TYPE_UNKNOWN;
return CONTENT_STATUS_ERROR;
return c->status;
}

View File

@ -44,7 +44,6 @@ struct rect;
/** Status of a content */
typedef enum {
CONTENT_STATUS_TYPE_UNKNOWN, /**< Type not yet known. */
CONTENT_STATUS_LOADING, /**< Content is being fetched or
converted and is not safe to display. */
CONTENT_STATUS_READY, /**< Some parts of content still being

View File

@ -167,8 +167,8 @@ struct content {
/** Bitmap, for various image contents. */
struct bitmap *bitmap;
unsigned int time; /**< Creation time, if TYPE_UNKNOWN,
LOADING or READY,
unsigned int time; /**< Creation time,
if LOADING or READY,
otherwise total time. */
unsigned int reformat_time; /**< Earliest time to attempt a