netsurf: branch master updated. release/3.6-25-gb3042f6
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/b3042f6c1fcb708d8663f...
...commit http://git.netsurf-browser.org/netsurf.git/commit/b3042f6c1fcb708d8663f4a...
...tree http://git.netsurf-browser.org/netsurf.git/tree/b3042f6c1fcb708d8663f4ab5...
The branch, master has been updated
via b3042f6c1fcb708d8663f4ab51865fe6a1f8bec3 (commit)
via 9ff13d64c4ea9b3539f9b162bc8c70f2a30f288e (commit)
via 8828bdc7021714621ebef63e847c2998658b4863 (commit)
via 8acb224e90a03175133f8b295229b6f0e096177d (commit)
via 4bd4f3e82bc77c18ae38a8db94c0ad74747930b0 (commit)
via e8a9e3744523671228fef385ce7e1e11f93283b0 (commit)
from 3ab8032f1679c2a3526ccd458eb130c0d0f917bc (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=b3042f6c1fcb708d866...
commit b3042f6c1fcb708d8663f4ab51865fe6a1f8bec3
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
fix spelling in low level cache code
diff --git a/content/llcache.c b/content/llcache.c
index e338c1f..4bd6eb3 100644
--- a/content/llcache.c
+++ b/content/llcache.c
@@ -22,7 +22,7 @@
* Low-level resource cache implementation
*
* This is the implementation of the low level cache. This cache
- * stores source objects in memory and may use a persistant backing
+ * stores source objects in memory and may use a persistent backing
* store to extend their lifetime.
*
* \todo fix writeout conditions and ordering.
@@ -201,8 +201,8 @@ struct llcache_object {
llcache_header *headers; /**< Fetch headers */
size_t num_headers; /**< Number of fetch headers */
- /* Instrumentation. These elemnts are strictly for information
- * to improve the cache performance and to provide performace
+ /* Instrumentation. These elements are strictly for information
+ * to improve the cache performance and to provide performance
* metrics. The values are non-authorative and must not be used to
* determine object lifetime etc.
*/
@@ -268,7 +268,7 @@ struct llcache_s {
uint64_t total_written;
/**
- * Total nuber of miliseconds taken to write to backing store.
+ * Total number of milliseconds taken to write to backing store.
*/
uint64_t total_elapsed;
@@ -804,7 +804,7 @@ static nserror llcache_fetch_process_header(llcache_object *object,
*
* sets up headers and attempts to start an actual fetch from the
* fetchers system updating the llcache object with the new fetch on
- * sucessful start.
+ * successful start.
*
* \pre The fetch parameters in object->fetch must be populated
*
@@ -876,7 +876,7 @@ static nserror llcache_object_refetch(llcache_object *object)
/* Reset fetch state */
object->fetch.state = LLCACHE_FETCH_INIT;
- LLCACHE_LOG("Refetching %p", object);
+ LLCACHE_LOG("Re-fetching %p", object);
/* Kick off fetch */
res = fetch_start(object->url,
@@ -1173,27 +1173,27 @@ llcache_object_remove_from_list(llcache_object *object, llcache_object **list)
}
/**
- * Retrieve source data for an object from persistant store if necessary.
+ * Retrieve source data for an object from persistent store if necessary.
*
- * If an objects source data has been placed in the persistant store
- * and the in memory copy released this will attempt to retrive the
+ * If an objects source data has been placed in the persistent store
+ * and the in memory copy released this will attempt to retrieve the
* source data.
*
* \param object the object to operate on.
- * \return apropriate error code.
+ * \return appropriate error code.
*/
static nserror llcache_persist_retrieve(llcache_object *object)
{
/* ensure the source data is present if necessary */
if ((object->source_data != NULL) ||
(object->store_state != LLCACHE_STATE_DISC)) {
- /* source data does not require retriving from
- * persistant store.
+ /* source data does not require retrieving from
+ * persistent store.
*/
return NSERROR_OK;
}
- /* Source data for the object may be in the persiatant store */
+ /* Source data for the object may be in the persistent store */
return guit->llcache->fetch(object->url,
BACKING_STORE_NONE,
&object->source_data,
@@ -1205,7 +1205,7 @@ static nserror llcache_persist_retrieve(llcache_object *object)
*
* The metadata includes object headers.
*
- * \param object The cache object to serialise teh metadata of.
+ * \param object The cache object to serialise the metadata of.
* \param data_out Where the serialised buffer will be placed.
* \param datasize_out The size of the serialised data.
* \return NSERROR_OK on success with \a data_out and \a datasize_out
@@ -1347,15 +1347,15 @@ operror:
/**
* Deserialisation of an objects metadata.
*
- * Attempt to retrive and deserialise the metadata for an object from
+ * Attempt to retrieve and deserialise the metadata for an object from
* the backing store.
*
- * This must only update object if it is sucessful otherwise difficult
+ * This must only update object if it is successful otherwise difficult
* to debug crashes happen later by using bad leftover object state.
*
* \param object The object to retrieve the metadata for.
- * \return NSERROR_OK if the metatdata was retrived and deserialised
- * or error code if url is not in persistant storage or in
+ * \return NSERROR_OK if the metatdata was retrieved and deserialised
+ * or error code if URL is not in persistent storage or in
* event of deserialisation error.
*/
static nserror
@@ -1376,7 +1376,7 @@ llcache_process_metadata(llcache_object *object)
size_t num_headers;
size_t hloop;
- LOG("Retriving metadata");
+ LOG("Retrieving metadata");
/* attempt to retrieve object metadata from the backing store */
res = guit->llcache->fetch(object->url,
@@ -1387,7 +1387,7 @@ llcache_process_metadata(llcache_object *object)
return res;
}
- LOG("Processing retrived data");
+ LOG("Processing retrieved data");
/* metadata line 1 is the url the metadata referrs to */
line = 1;
@@ -1405,7 +1405,7 @@ llcache_process_metadata(llcache_object *object)
if (nsurl_compare(object->url, metadataurl, NSURL_COMPLETE) != true) {
/* backing store returned the wrong object for the
- * request. This may occour if the backing store had
+ * request. This may occur if the backing store had
* a collision in its storage method. We cope with this
* by simply skipping caching of this object.
*/
@@ -1511,14 +1511,14 @@ format_error:
}
/**
- * Attempt to retrieve an object from persistant storage.
+ * Attempt to retrieve an object from persistent storage.
*
- * \param object The object to populate from persistant store.
+ * \param object The object to populate from persistent store.
* \param flags Fetch flags.
* \param referer The referring url.
* \param post Post data for fetch.
* \param redirect_count how many times this fetch has been redirected.
- * \return NSERROR_OK if the object was sucessfully retrived from the
+ * \return NSERROR_OK if the object was successfully retrieved from the
* cache else appropriate error code.
*/
static nserror
@@ -1572,7 +1572,7 @@ llcache_object_fetch_persistant(llcache_object *object,
* \param referer Referring URL, or NULL if none
* \param post POST data, or NULL for a GET request
* \param redirect_count Number of redirects followed so far
- * \param result Pointer to location to recieve retrieved object
+ * \param result Pointer to location to receive retrieved object
* \return NSERROR_OK on success, appropriate error otherwise
*/
static nserror
@@ -1602,7 +1602,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
}
/* No viable object found in cache create one and attempt to
- * pull from persistant store.
+ * pull from persistent store.
*/
if (newest == NULL) {
LLCACHE_LOG("No viable object found in llcache");
@@ -1611,12 +1611,12 @@ llcache_object_retrieve_from_cache(nsurl *url,
if (error != NSERROR_OK)
return error;
- /* attempt to retrieve object from persistant store */
+ /* attempt to retrieve object from persistent store */
error = llcache_object_fetch_persistant(obj, flags, referer, post, redirect_count);
if (error == NSERROR_OK) {
- LLCACHE_LOG("retrived object from persistant store");
+ LLCACHE_LOG("retrieved object from persistent store");
- /* set newest object from persistant store which
+ /* set newest object from persistent store which
* will cause the normal object handling to be used.
*/
newest = obj;
@@ -1625,7 +1625,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
llcache_object_add_to_list(obj, &llcache->cached_objects);
}
- /* else no object found and unretrivable from cache,
+ /* else no object found and irretrievable from cache,
* fall through with newest unset to start fetch
*/
}
@@ -1641,19 +1641,19 @@ llcache_object_retrieve_from_cache(nsurl *url,
/* ensure the source data is present */
error = llcache_persist_retrieve(newest);
if (error == NSERROR_OK) {
- /* source data was sucessfully retrived from
- * persistant store
+ /* source data was successfully retrieved from
+ * persistent store
*/
*result = newest;
return NSERROR_OK;
}
- /* retrival of source data from persistant store
+ /* retrieval of source data from persistent store
* failed, destroy cache object and fall though to
* cache miss to re-fetch
*/
- LLCACHE_LOG("Persistant retrival failed for %p", newest);
+ LLCACHE_LOG("Persistent retrieval failed for %p", newest);
llcache_object_remove_from_list(newest, &llcache->cached_objects);
llcache_object_destroy(newest);
@@ -1704,9 +1704,9 @@ llcache_object_retrieve_from_cache(nsurl *url,
return NSERROR_OK;
}
- LLCACHE_LOG("Persistant retrival failed for %p", newest);
+ LLCACHE_LOG("Persistent retrieval failed for %p", newest);
- /* retrival of source data from persistant store
+ /* retrieval of source data from persistent store
* failed, destroy cache object and fall though to
* cache miss to re-retch
*/
@@ -1743,7 +1743,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
* \param referer Referring URL, or NULL if none
* \param post POST data, or NULL for a GET request
* \param redirect_count Number of redirects followed so far
- * \param result Pointer to location to recieve retrieved object
+ * \param result Pointer to location to receive retrieved object
* \return NSERROR_OK on success, appropriate error otherwise
*/
static nserror
@@ -2372,7 +2372,7 @@ build_candidate_list(struct llcache_object ***lst_out, int *lst_len_out)
/* cacehable objects with no pending fetches, not
* already on disc and with sufficient lifetime to
- * make disc cache worthwile
+ * make disc cache worthwhile
*/
if ((object->candidate_count == 0) &&
(object->fetch.fetch == NULL) &&
@@ -2526,20 +2526,20 @@ static void llcache_persist(void *p)
ret = build_candidate_list(&lst, &lst_count);
if (ret != NSERROR_OK) {
- LLCACHE_LOG("Unable to construct candidate list for persisatnt writeout");
+ LLCACHE_LOG("Unable to construct candidate list for persistent writeout");
return;
}
write_limit = (llcache->maximum_bandwidth * llcache->time_quantum) / 1000;
- /* obtained a candidate list, make each object persistant in turn */
+ /* obtained a candidate list, make each object persistent in turn */
for (idx = 0; idx < lst_count; idx++) {
ret = write_backing_store(lst[idx], &written, &elapsed);
if (ret != NSERROR_OK) {
continue;
}
- /* sucessfully wrote object to backing store */
+ /* successfully wrote object to backing store */
total_written += written;
total_elapsed += elapsed;
total_bandwidth = (total_written * 1000) / total_elapsed;
@@ -3138,7 +3138,7 @@ llcache_object_snapshot(llcache_object *object, llcache_object **snapshot)
/**
* total ram usage of object
*
- * \param object The object to caclulate the total RAM usage of.
+ * \param object The object to calculate the total RAM usage of.
* \return The total RAM usage in bytes.
*/
static inline uint32_t
@@ -3253,7 +3253,7 @@ void llcache_clean(bool purge)
}
/* if the cache limit is exceeded try to make some objects
- * persistant so their RAM can be reclaimed in the next
+ * persistent so their RAM can be reclaimed in the next
* step
*/
if (limit < llcache_size) {
@@ -3261,7 +3261,7 @@ void llcache_clean(bool purge)
}
/* Source data of fresh cacheable objects with no users, no
- * pending fetches and pushed to persistant store while the
+ * pending fetches and pushed to persistent store while the
* cache exceeds the configured size.
*/
for (object = llcache->cached_objects;
@@ -3286,8 +3286,8 @@ void llcache_clean(bool purge)
}
/* Fresh cacheable objects with no users, no pending fetches
- * and pushed to persistant store while the cache exceeds
- * the configured size. Efectively just the llcache object metadata.
+ * and pushed to persistent store while the cache exceeds
+ * the configured size. Effectively just the llcache object metadata.
*/
for (object = llcache->cached_objects;
((limit < llcache_size) && (object != NULL));
@@ -3317,7 +3317,7 @@ void llcache_clean(bool purge)
/* Fresh cacheable objects with no users or pending fetches
* while the cache exceeds the configured size. These are the
- * most valuble objects as replacing them is a full network
+ * most valuable objects as replacing them is a full network
* fetch
*/
for (object = llcache->cached_objects;
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=9ff13d64c4ea9b3539f...
commit 9ff13d64c4ea9b3539f9b162bc8c70f2a30f288e
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
fix spelling mistakes in hlcache code
diff --git a/content/hlcache.c b/content/hlcache.c
index 042e189..95edd21 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -16,8 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * High-level resource cache (implementation)
+/**
+ * \file
+ * High-level resource cache implementation.
*/
#include <assert.h>
@@ -86,7 +87,7 @@ struct hlcache_s {
/** Ring of retrieval contexts */
hlcache_retrieval_ctx *retrieval_ctx_ring;
- /* statsistics */
+ /* statistics */
unsigned int hit_count;
unsigned int miss_count;
};
@@ -665,12 +666,12 @@ nserror hlcache_handle_retrieve(nsurl *url, uint32_t flags,
hlcache_llcache_callback, ctx,
&ctx->llcache);
if (error != NSERROR_OK) {
- /* error retriving handle so free context and return error */
+ /* error retrieving handle so free context and return error */
free((char *) ctx->child.charset);
free(ctx->handle);
free(ctx);
} else {
- /* successfuly started fetch so add new context to list */
+ /* successfully started fetch so add new context to list */
RING_INSERT(hlcache->retrieval_ctx_ring, ctx);
*result = ctx->handle;
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=8828bdc7021714621eb...
commit 8828bdc7021714621ebef63e847c2998658b4863
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
fix comedy spelling in fs backing store code
diff --git a/content/fs_backing_store.c b/content/fs_backing_store.c
index 7d8ac4b..635f917 100644
--- a/content/fs_backing_store.c
+++ b/content/fs_backing_store.c
@@ -27,9 +27,9 @@
*
* \todo Implement mmap retrieval where supported.
*
- * \todo Implement static retrival for metadata objects as their heap
+ * \todo Implement static retrieval for metadata objects as their heap
* lifetime is typically very short, though this may be obsoleted
- * by a small object storage stratagy.
+ * by a small object storage strategy.
*
*/
@@ -63,7 +63,7 @@
/** Backing store file format version */
#define CONTROL_VERSION 130
-/** Number of milliseconds after a update before control data maintinance is performed */
+/** Number of milliseconds after a update before control data maintenance is performed */
#define CONTROL_MAINT_TIME 10000
/** Get address from ident */
@@ -100,7 +100,7 @@
#define BLOCK_USE_MAP_SIZE (1 << (BLOCK_ENTRY_COUNT - 3))
/**
- * The type used to store index values refering to store entries. Care
+ * The type used to store index values referring to store entries. Care
* must be taken with this type as it is used to build address to
* entry mapping so changing the size will have large impacts on
* memory usage.
@@ -109,7 +109,7 @@ typedef uint16_t entry_index_t;
/**
* The type used as a binary identifier for each entry derived from
- * the url. A larger identifier will have fewer collisions but
+ * the URL. A larger identifier will have fewer collisions but
* requires proportionately more storage.
*/
typedef uint32_t entry_ident_t;
@@ -184,7 +184,7 @@ struct store_entry_element {
* @note Order is important to avoid excessive structure packing overhead.
*/
struct store_entry {
- int64_t last_used; /**< unix time the entry was last used */
+ int64_t last_used; /**< UNIX time the entry was last used */
entry_ident_t ident; /**< entry identifier */
uint16_t use_count; /**< number of times this entry has been accessed */
uint8_t flags; /**< entry flags */
@@ -227,7 +227,7 @@ struct store_state {
unsigned int entry_bits; /**< log2 number of bits in entry index. */
unsigned int last_entry; /**< index of last usable entry. */
- /** flag indicating if the entries have been made persistant
+ /** flag indicating if the entries have been made persistent
* since they were last changed.
*/
bool entries_dirty;
@@ -235,9 +235,9 @@ struct store_state {
/**
* URL identifier to entry index mapping.
*
- * This is an open coded index on the entries url field and
- * provides a computationaly inexpensive way to go from the
- * url to an entry.
+ * This is an open coded index on the entries URL field and
+ * provides a computationally inexpensive way to go from the
+ * URL to an entry.
*/
entry_index_t *addrmap;
@@ -246,12 +246,12 @@ struct store_state {
struct block_file blocks[ENTRY_ELEM_COUNT][BLOCK_FILE_COUNT];
/** flag indicating if the block file use maps have been made
- * persistant since they were last changed.
+ * persistent since they were last changed.
*/
bool blocks_dirty;
/** flag indicating if a block file has been opened for update
- * since maintinance was previously done.
+ * since maintenance was previously done.
*/
bool blocks_opened;
@@ -283,8 +283,8 @@ struct store_state *storestate;
*
* @param[in] state The store state to use.
* @param[in, out] bse Pointer to the entry to be removed.
- * @return NSERROR_OK and \a bse updated on succes or NSERROR_NOT_FOUND
- * if no entry coresponds to the url.
+ * @return NSERROR_OK and \a bse updated on success or NSERROR_NOT_FOUND
+ * if no entry corresponds to the URL.
*/
static nserror
remove_store_entry(struct store_state *state, struct store_entry **bse)
@@ -460,7 +460,7 @@ store_fname(struct store_state *state,
* @param state The store state to use.
* @param bse The entry to invalidate.
* @param elem_idx The element index to invalidate.
- * @return NSERROR_OK on sucess or error code on failure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
invalidate_element(struct store_state *state,
@@ -500,7 +500,7 @@ invalidate_element(struct store_state *state,
*
* @param state The store state to use.
* @param bse The entry to invalidate.
- * @return NSERROR_OK on sucess or error code on failure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
invalidate_entry(struct store_state *state, struct store_entry *bse)
@@ -554,7 +554,7 @@ static int compar(const void *va, const void *vb)
const struct store_entry *b = &BS_ENTRY(*(entry_ident_t *)vb, storestate);
/* consider the allocation flags - if an entry has an
- * allocation it is considered more valuble as it cannot be
+ * allocation it is considered more valuable as it cannot be
* freed.
*/
if ((a->elem[ENTRY_ELEM_DATA].flags == ENTRY_ELEM_FLAG_NONE) &&
@@ -670,7 +670,7 @@ static nserror store_evict(struct store_state *state)
* Serialise entry index out to storage.
*
* @param state The backing store state to serialise.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror write_entries(struct store_state *state)
{
@@ -735,7 +735,7 @@ static nserror write_entries(struct store_state *state)
* Serialise block file use map out to storage.
*
* \param state The backing store state to serialise.
- * \return NSERROR_OK on sucess or error code on faliure.
+ * \return NSERROR_OK on success or error code on failure.
*/
static nserror write_blocks(struct store_state *state)
{
@@ -812,11 +812,11 @@ wr_err:
* Ensures block files are of the correct extent
*
* block files have their extent set to their maximum size to ensure
- * subsequent reads and writes do not need to extend teh file and are
+ * subsequent reads and writes do not need to extend the file and are
* therefore faster.
*
* \param state The backing store state to set block extent for.
- * \return NSERROR_OK on sucess or error code on faliure.
+ * \return NSERROR_OK on success or error code on failure.
*/
static nserror set_block_extents(struct store_state *state)
{
@@ -849,7 +849,7 @@ static nserror set_block_extents(struct store_state *state)
}
/**
- * maintinance of control structures.
+ * maintenance of control structures.
*
* callback scheduled when control data has been update. Currently
* this is for when the entries table is dirty and requires
@@ -959,7 +959,7 @@ static block_index_t alloc_block(struct store_state *state, int elem_idx)
* @param datalen The length of data in \a data
* @param bse Pointer used to return value.
* @return NSERROR_OK and \a bse updated on success or NSERROR_NOT_FOUND
- * if no entry coresponds to the url.
+ * if no entry corresponds to the url.
*/
static nserror
set_store_entry(struct store_state *state,
@@ -1045,12 +1045,12 @@ set_store_entry(struct store_state *state,
elem->size = datalen;
state->total_alloc += elem->size;
- /* if the elemnt will fit in a small block attempt to allocate one */
+ /* if the element will fit in a small block attempt to allocate one */
if (elem->size <= (1U << log2_block_size[elem_idx])) {
elem->block = alloc_block(state, elem_idx);
}
- /* ensure control maintinance scheduled. */
+ /* ensure control maintenance scheduled. */
state->entries_dirty = true;
guit->misc->schedule(CONTROL_MAINT_TIME, control_maintinance, state);
@@ -1118,7 +1118,7 @@ store_open(struct store_state *state,
* we also compute the total storage in use.
*
* @param state The backing store global state.
- * @return NSERROR_OK on sucess or NSERROR_NOMEM if the map storage
+ * @return NSERROR_OK on success or NSERROR_NOMEM if the map storage
* could not be allocated.
*/
static nserror
@@ -1163,7 +1163,7 @@ build_entrymap(struct store_state *state)
* Unlink entries file
*
* @param state The backing store state.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
unlink_entries(struct store_state *state)
@@ -1186,7 +1186,7 @@ unlink_entries(struct store_state *state)
* Read description entries into memory.
*
* @param state The backing store state to put the loaded entries in.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on faliure.
*/
static nserror
read_entries(struct store_state *state)
@@ -1236,7 +1236,7 @@ read_entries(struct store_state *state)
* Read block file usage bitmaps.
*
* @param state The backing store state to put the loaded entries in.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
read_blocks(struct store_state *state)
@@ -1275,7 +1275,7 @@ read_blocks(struct store_state *state)
} else {
LOG("Initialising block use map to defaults");
- /* ensure block 0 (invalid sentinal) is skipped */
+ /* ensure block 0 (invalid sentinel) is skipped */
state->blocks[ENTRY_ELEM_DATA][0].use_map[0] = 1;
state->blocks[ENTRY_ELEM_META][0].use_map[0] = 1;
}
@@ -1293,7 +1293,7 @@ read_blocks(struct store_state *state)
* Write the cache tag file.
*
* @param state The cache state.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
write_cache_tag(struct store_state *state)
@@ -1330,7 +1330,7 @@ write_cache_tag(struct store_state *state)
* Write the control file for the current state.
*
* @param state The state to write to the control file.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
write_control(struct store_state *state)
@@ -1375,7 +1375,7 @@ write_control(struct store_state *state)
* Read and parse the control file.
*
* @param state The state to read from the control file.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
read_control(struct store_state *state)
@@ -1461,7 +1461,7 @@ control_error: /* problem with the control file */
* Initialise the backing store.
*
* @param parameters to configure backing store.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
initialise(const struct llcache_store_parameters *parameters)
@@ -1732,7 +1732,7 @@ static nserror store_write_file(struct store_state *state,
* @param bsflags The flags to control how the object is stored.
* @param data The objects source data.
* @param datalen The length of the \a data.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
store(nsurl *url,
@@ -1893,13 +1893,13 @@ static nserror store_read_file(struct store_state *state,
}
/**
- * Retrive an object from the backing store.
+ * Retrieve an object from the backing store.
*
* @param[in] url The url is used as the unique primary key for the data.
* @param[in] bsflags The flags to control how the object is retrieved.
* @param[out] data_out The objects data.
* @param[out] datalen_out The length of the \a data retrieved.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
fetch(nsurl *url,
@@ -1926,7 +1926,7 @@ fetch(nsurl *url,
}
storestate->hit_count++;
- LOG("retriving cache data for url:%s", nsurl_access(url));
+ LOG("retrieving cache data for url:%s", nsurl_access(url));
/* calculate the entry element index */
if ((bsflags & BACKING_STORE_META) != 0) {
@@ -1984,7 +1984,7 @@ fetch(nsurl *url,
*
* @param[in] url The url is used as the unique primary key to invalidate.
* @param[in] bsflags The flags to control how the object data is released.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror release(nsurl *url, enum backing_store_flags bsflags)
{
@@ -2032,7 +2032,7 @@ static nserror release(nsurl *url, enum backing_store_flags bsflags)
* be returned as a result to the fetch or meta operations.
*
* @param url The url is used as the unique primary key to invalidate.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
invalidate(nsurl *url)
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=8acb224e90a03175133...
commit 8acb224e90a03175133f8b295229b6f0e096177d
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
fix spelling in backing store documentation
diff --git a/Docs/source-object-backing-store b/Docs/source-object-backing-store
index 5d4d304..0fb3614 100644
--- a/Docs/source-object-backing-store
+++ b/Docs/source-object-backing-store
@@ -5,30 +5,30 @@ Introduction
------------
The source object cache provides a system to extend the life of source
-objects (html files, images etc.) after they are no longer immediately
+objects (HTML files, images etc.) after they are no longer immediately
being used.
Only fetch types where we have well defined rules on caching are
considered, in practice this limits us to HTTP(S). The section in
RFC2616 [1] on caching specifies these rules.
-To futher extend the objects lifetime they can be pushed into a
+To further extend the objects lifetime they can be pushed into a
backing store where the objects are available for reuse less quickly
-than from RAM but faster than retriving from the network again.
+than from RAM but faster than retrieving from the network again.
The backing store implementation provides a key:value infrastructure
-with a simple store, retrive and invalidate interface.
+with a simple store, retrieve and invalidate interface.
Generic filesystem backing store
--------------------------------
Although the backing store interface is fully pluggable a generic
implementation based on storing objects on the filesystem in a
-heirachy of directories.
+hierarchy of directories.
-The option to alter the backing store format exists and is controled
+The option to alter the backing store format exists and is controlled
by a version field. It is implementation defined what happens if a
-version mis-match occours.
+version mis-match occurs.
As the backing store only holds cache data one should not expect a
great deal of effort to be expended converting formats (i.e. the cache
@@ -37,23 +37,23 @@ may simply be discarded).
Layout version 1.1
------------------
-An object has an identifier value generated from the url (NetSurf
-backing stores uses the url as the unique key). The value used is
+An object has an identifier value generated from the URL (NetSurf
+backing stores uses the URL as the unique key). The value used is
obtained using nsurl_hash() which is currently a 32 bit FNV so is
directly usable.
This identifier is adequate to ensure the collision rate for the
-hashed url values (a collision for every 2^16 urls added) is
+hashed URL values (a collision for every 2^16 URLs added) is
sufficiently low the overhead of returning the wrong object (which
-backing stores are permitted to do) is not significat.
+backing stores are permitted to do) is not significant.
An entry list is maintained which contains all the metadata about a
given identifier. This list is limited in length to constrain the
-resources necessary to maintain it. It is made persistant to avoid the
+resources necessary to maintain it. It is made persistent to avoid the
overhead of reconstructing it at initialisation and to keep the data
used to improve the eviction decisions.
-Each object is stored and retrived directly into the filesystem using
+Each object is stored and retrieved directly into the filesystem using
a filename generated from a RFC4648 base32 encoding of an address
value. The objects address is derived from the identifier by cropping
it to a shorter length.
@@ -63,7 +63,7 @@ uses storage directly proportional to the size of the address length.
The cropping length is stored in the control file with the default
values set at compile time. This allows existing backing stores to
-continue operating with existing data independantly of new default
+continue operating with existing data independently of new default
setting. This setting gives some ability to tune the default cache
index size to values suitable for a specific host operating system.
@@ -88,7 +88,7 @@ Version 1.0
The version 1 layout was identical to the 1.1 except base64url
encoding was used, this proved problematic as some systems filesystems
-were case insensitive so upper and lower case letetrs collided.
+were case insensitive so upper and lower case letters collided.
There is no upgrade provision from the previous version simply delete
the cache directory.
@@ -112,7 +112,7 @@ Each control file table entry is 28 bytes and consists of
- signed 64 bit value for last use time
- 32bit full url hash allowing for index reconstruction and
- addiitonal collision detection. Also the possibility of increasing
+ additional collision detection. Also the possibility of increasing
the ADDRESS_LENGTH although this would require renaming all the
existing files in the cache and is not currently implemented.
@@ -134,8 +134,8 @@ Address to entry index
An entry index is held in RAM that allows looking up the address to
map to an entry in the control file.
-The index is the only data structure whose size is directly depndant
-on the length of the hash specificaly:
+The index is the only data structure whose size is directly dependant
+on the length of the hash specifically:
(2 ^ (ADDRESS_BITS - 3)) * ENTRY_BITS) in bytes
@@ -152,9 +152,9 @@ list is limited to 448kilobytes.
The typical values for RISC OS would set ADDRESS_BITS to 18. This
spreads the entries over 262144 hash values which uses 512 kilobytes
for the index. Limiting the hash space like this reduces the
-efectiveness of the cache.
+effectiveness of the cache.
-A small ADDRESS_LENGTH causes a collision (two urls with the same
+A small ADDRESS_LENGTH causes a collision (two URLs with the same
address) to happen roughly for every 2 ^ (ADDRESS_BITS / 2) = 2 ^ 9 =
512 objects stored. This roughly translates to a cache miss due to
collision every ten pages navigated to.
@@ -164,7 +164,7 @@ Larger systems
In general ENTRY_BITS set to 16 as this limits the store to 65536
objects which given the average size of an object at 8 kilobytes
-yeilds half a gigabyte of disc used which is judged to be sufficient.
+yields half a gigabyte of disc used which is judged to be sufficient.
For larger systems e.g. those using GTK frontend we would most likely
select ADDRESS_BITS as 22 resulting in a collision every 2048 objects
@@ -176,11 +176,11 @@ Typical values
Example 1
~~~~~~~~~
-For a store with 1034 objects genrated from a random navigation of
+For a store with 1034 objects generated from a random navigation of
pages linked from the about:welcome page.
Metadata total size is 593608 bytes an average of 574 bytes. The
-majority of the storage is used to hold the urls and headers.
+majority of the storage is used to hold the URLs and headers.
Data total size is 9180475 bytes a mean of 8879 bytes 1648726 in the
largest 10 entries which if excluded gives 7355 bytes average size
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=4bd4f3e82bc77c18ae3...
commit 4bd4f3e82bc77c18ae38a8db94c0ad74747930b0
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
local pages should not have a favicon
diff --git a/!NetSurf/Resources/nl/welcome.html,faf b/!NetSurf/Resources/nl/welcome.html,faf
index f35260b..aec47e7 100644
--- a/!NetSurf/Resources/nl/welcome.html,faf
+++ b/!NetSurf/Resources/nl/welcome.html,faf
@@ -3,7 +3,6 @@
<head>
<title>Welkom bij NetSurf</title>
<style type="text/css">html,body{margin:0;padding:0;}body{color:#000;background:#fff;font-family:sans-serif;margin:0 auto;}a:link{text-decoration:underline;color:#00f;}a:visited{text-decoration:underline;color:#60a;}a:hover{text-decoration:none;}a:active{text-decoration:underline;color:#f00;}.banner{margin:0;padding:0;background:#94adff;text-align:left;}.banner img{border:none;color:#000;height:86px;width:308px;display:block;}.onlycontent{margin:0 1em;}.nslinks{display:table;width:100%;margin:0;border-spacing:0;padding:0;background:#ccd8ff;font-size:88%;}.nslinks li{display:table-cell;text-align:center;padding:0.2em 0.3em 0.3em;vertical-align:middle;}.nslinks li+li{border-left:2px solid #b1c3ff;}.version{padding:0;margin:1.2em auto 0;width:90%;color:#444;font-size:160%;}.intro{width: 90%;margin:1em auto;color:#666;}.websearch{margin:1.5em auto;padding:1.2em 0.3em;background:#d8e2ff;border:2px solid #c5d3ff;width:80%;text-align:center;}input[type=text]{border:2px solid #b6c7ff;background:#f9faff;color:#000;margin:2px;}input[type=submit]{border:2px outset #cedaff;color:#000;background:#cedaff;margin:2px;}.links{display:table;width:80%;margin:0 auto 3em;font-size:94%;}.links p{display:table-cell;}.links ul{padding-left:0.8em;margin-top:-1em;}.links ul+ul{padding-left:1em;}.footer{font-style:italic;color:#666;text-align:right;}.footer p{margin-top:1.5em;padding-top:0.4em;border-top:2px solid #94adff;}</style>
-<link rel="icon" type="image/png" href="http://www.netsurf-browser.org/webimages/favicon.png">
</head>
<body>
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=e8a9e3744523671228f...
commit e8a9e3744523671228fef385ce7e1e11f93283b0
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
fix openSSL 1.1.0 X509 certificate handling
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index 66970ef..7ddf512 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -128,6 +128,26 @@ static char fetch_error_buffer[CURL_ERROR_SIZE];
static char fetch_proxy_userpwd[100];
+/* OpenSSL 1.0.x to 1.1.0 certificate reference counting changed */
+#if (OPENSSL_VERSION_NUMBER < 0x1010000fL)
+static int ns_X509_up_ref(X509 *cert)
+{
+ cert->references++;
+ return 1;
+}
+
+static void ns_X509_free(X509 *cert)
+{
+ cert->references--;
+ if (cert->references == 0) {
+ X509_free(cert);
+ }
+}
+#else
+#define ns_X509_up_ref X509_up_ref
+#define ns_X509_free X509_free
+#endif
+
/**
* Initialise a cURL fetcher.
*/
@@ -438,7 +458,7 @@ fetch_curl_verify_callback(int verify_ok, X509_STORE_CTX *x509_ctx)
*/
if (!fetch->cert_data[depth].cert) {
fetch->cert_data[depth].cert = X509_STORE_CTX_get_current_cert(x509_ctx);
- fetch->cert_data[depth].cert->references++;
+ ns_X509_up_ref(fetch->cert_data[depth].cert);
fetch->cert_data[depth].err = X509_STORE_CTX_get_error(x509_ctx);
}
@@ -815,10 +835,7 @@ static void fetch_curl_free(void *vf)
}
for (i = 0; i < MAX_CERTS && f->cert_data[i].cert; i++) {
- f->cert_data[i].cert->references--;
- if (f->cert_data[i].cert->references == 0) {
- X509_free(f->cert_data[i].cert);
- }
+ ns_X509_free(f->cert_data[i].cert);
}
free(f);
@@ -986,10 +1003,7 @@ curl_start_cert_validate(struct curl_fetch_info *f,
X509_get_pubkey(certs[depth].cert));
/* and clean up */
- certs[depth].cert->references--;
- if (certs[depth].cert->references == 0) {
- X509_free(certs[depth].cert);
- }
+ ns_X509_free(certs[depth].cert);
}
msg.type = FETCH_CERT_ERR;
-----------------------------------------------------------------------
Summary of changes:
!NetSurf/Resources/nl/welcome.html,faf | 1 -
Docs/source-object-backing-store | 46 ++++++++--------
content/fetchers/curl.c | 32 ++++++++---
content/fs_backing_store.c | 80 +++++++++++++--------------
content/hlcache.c | 11 ++--
content/llcache.c | 94 ++++++++++++++++----------------
6 files changed, 139 insertions(+), 125 deletions(-)
diff --git a/!NetSurf/Resources/nl/welcome.html,faf b/!NetSurf/Resources/nl/welcome.html,faf
index f35260b..aec47e7 100644
--- a/!NetSurf/Resources/nl/welcome.html,faf
+++ b/!NetSurf/Resources/nl/welcome.html,faf
@@ -3,7 +3,6 @@
<head>
<title>Welkom bij NetSurf</title>
<style type="text/css">html,body{margin:0;padding:0;}body{color:#000;background:#fff;font-family:sans-serif;margin:0 auto;}a:link{text-decoration:underline;color:#00f;}a:visited{text-decoration:underline;color:#60a;}a:hover{text-decoration:none;}a:active{text-decoration:underline;color:#f00;}.banner{margin:0;padding:0;background:#94adff;text-align:left;}.banner img{border:none;color:#000;height:86px;width:308px;display:block;}.onlycontent{margin:0 1em;}.nslinks{display:table;width:100%;margin:0;border-spacing:0;padding:0;background:#ccd8ff;font-size:88%;}.nslinks li{display:table-cell;text-align:center;padding:0.2em 0.3em 0.3em;vertical-align:middle;}.nslinks li+li{border-left:2px solid #b1c3ff;}.version{padding:0;margin:1.2em auto 0;width:90%;color:#444;font-size:160%;}.intro{width: 90%;margin:1em auto;color:#666;}.websearch{margin:1.5em auto;padding:1.2em 0.3em;background:#d8e2ff;border:2px solid #c5d3ff;width:80%;text-align:center;}input[type=text]{border:2px solid #b6c7ff;background:#f9faff;color:#000;margin:2px;}input[type=submit]{border:2px outset #cedaff;color:#000;background:#cedaff;margin:2px;}.links{display:table;width:80%;margin:0 auto 3em;font-size:94%;}.links p{display:table-cell;}.links ul{padding-left:0.8em;margin-top:-1em;}.links ul+ul{padding-left:1em;}.footer{font-style:italic;color:#666;text-align:right;}.footer p{margin-top:1.5em;padding-top:0.4em;border-top:2px solid #94adff;}</style>
-<link rel="icon" type="image/png" href="http://www.netsurf-browser.org/webimages/favicon.png">
</head>
<body>
diff --git a/Docs/source-object-backing-store b/Docs/source-object-backing-store
index 5d4d304..0fb3614 100644
--- a/Docs/source-object-backing-store
+++ b/Docs/source-object-backing-store
@@ -5,30 +5,30 @@ Introduction
------------
The source object cache provides a system to extend the life of source
-objects (html files, images etc.) after they are no longer immediately
+objects (HTML files, images etc.) after they are no longer immediately
being used.
Only fetch types where we have well defined rules on caching are
considered, in practice this limits us to HTTP(S). The section in
RFC2616 [1] on caching specifies these rules.
-To futher extend the objects lifetime they can be pushed into a
+To further extend the objects lifetime they can be pushed into a
backing store where the objects are available for reuse less quickly
-than from RAM but faster than retriving from the network again.
+than from RAM but faster than retrieving from the network again.
The backing store implementation provides a key:value infrastructure
-with a simple store, retrive and invalidate interface.
+with a simple store, retrieve and invalidate interface.
Generic filesystem backing store
--------------------------------
Although the backing store interface is fully pluggable a generic
implementation based on storing objects on the filesystem in a
-heirachy of directories.
+hierarchy of directories.
-The option to alter the backing store format exists and is controled
+The option to alter the backing store format exists and is controlled
by a version field. It is implementation defined what happens if a
-version mis-match occours.
+version mis-match occurs.
As the backing store only holds cache data one should not expect a
great deal of effort to be expended converting formats (i.e. the cache
@@ -37,23 +37,23 @@ may simply be discarded).
Layout version 1.1
------------------
-An object has an identifier value generated from the url (NetSurf
-backing stores uses the url as the unique key). The value used is
+An object has an identifier value generated from the URL (NetSurf
+backing stores uses the URL as the unique key). The value used is
obtained using nsurl_hash() which is currently a 32 bit FNV so is
directly usable.
This identifier is adequate to ensure the collision rate for the
-hashed url values (a collision for every 2^16 urls added) is
+hashed URL values (a collision for every 2^16 URLs added) is
sufficiently low the overhead of returning the wrong object (which
-backing stores are permitted to do) is not significat.
+backing stores are permitted to do) is not significant.
An entry list is maintained which contains all the metadata about a
given identifier. This list is limited in length to constrain the
-resources necessary to maintain it. It is made persistant to avoid the
+resources necessary to maintain it. It is made persistent to avoid the
overhead of reconstructing it at initialisation and to keep the data
used to improve the eviction decisions.
-Each object is stored and retrived directly into the filesystem using
+Each object is stored and retrieved directly into the filesystem using
a filename generated from a RFC4648 base32 encoding of an address
value. The objects address is derived from the identifier by cropping
it to a shorter length.
@@ -63,7 +63,7 @@ uses storage directly proportional to the size of the address length.
The cropping length is stored in the control file with the default
values set at compile time. This allows existing backing stores to
-continue operating with existing data independantly of new default
+continue operating with existing data independently of new default
setting. This setting gives some ability to tune the default cache
index size to values suitable for a specific host operating system.
@@ -88,7 +88,7 @@ Version 1.0
The version 1 layout was identical to the 1.1 except base64url
encoding was used, this proved problematic as some systems filesystems
-were case insensitive so upper and lower case letetrs collided.
+were case insensitive so upper and lower case letters collided.
There is no upgrade provision from the previous version simply delete
the cache directory.
@@ -112,7 +112,7 @@ Each control file table entry is 28 bytes and consists of
- signed 64 bit value for last use time
- 32bit full url hash allowing for index reconstruction and
- addiitonal collision detection. Also the possibility of increasing
+ additional collision detection. Also the possibility of increasing
the ADDRESS_LENGTH although this would require renaming all the
existing files in the cache and is not currently implemented.
@@ -134,8 +134,8 @@ Address to entry index
An entry index is held in RAM that allows looking up the address to
map to an entry in the control file.
-The index is the only data structure whose size is directly depndant
-on the length of the hash specificaly:
+The index is the only data structure whose size is directly dependant
+on the length of the hash specifically:
(2 ^ (ADDRESS_BITS - 3)) * ENTRY_BITS) in bytes
@@ -152,9 +152,9 @@ list is limited to 448kilobytes.
The typical values for RISC OS would set ADDRESS_BITS to 18. This
spreads the entries over 262144 hash values which uses 512 kilobytes
for the index. Limiting the hash space like this reduces the
-efectiveness of the cache.
+effectiveness of the cache.
-A small ADDRESS_LENGTH causes a collision (two urls with the same
+A small ADDRESS_LENGTH causes a collision (two URLs with the same
address) to happen roughly for every 2 ^ (ADDRESS_BITS / 2) = 2 ^ 9 =
512 objects stored. This roughly translates to a cache miss due to
collision every ten pages navigated to.
@@ -164,7 +164,7 @@ Larger systems
In general ENTRY_BITS set to 16 as this limits the store to 65536
objects which given the average size of an object at 8 kilobytes
-yeilds half a gigabyte of disc used which is judged to be sufficient.
+yields half a gigabyte of disc used which is judged to be sufficient.
For larger systems e.g. those using GTK frontend we would most likely
select ADDRESS_BITS as 22 resulting in a collision every 2048 objects
@@ -176,11 +176,11 @@ Typical values
Example 1
~~~~~~~~~
-For a store with 1034 objects genrated from a random navigation of
+For a store with 1034 objects generated from a random navigation of
pages linked from the about:welcome page.
Metadata total size is 593608 bytes an average of 574 bytes. The
-majority of the storage is used to hold the urls and headers.
+majority of the storage is used to hold the URLs and headers.
Data total size is 9180475 bytes a mean of 8879 bytes 1648726 in the
largest 10 entries which if excluded gives 7355 bytes average size
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index 66970ef..7ddf512 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -128,6 +128,26 @@ static char fetch_error_buffer[CURL_ERROR_SIZE];
static char fetch_proxy_userpwd[100];
+/* OpenSSL 1.0.x to 1.1.0 certificate reference counting changed */
+#if (OPENSSL_VERSION_NUMBER < 0x1010000fL)
+static int ns_X509_up_ref(X509 *cert)
+{
+ cert->references++;
+ return 1;
+}
+
+static void ns_X509_free(X509 *cert)
+{
+ cert->references--;
+ if (cert->references == 0) {
+ X509_free(cert);
+ }
+}
+#else
+#define ns_X509_up_ref X509_up_ref
+#define ns_X509_free X509_free
+#endif
+
/**
* Initialise a cURL fetcher.
*/
@@ -438,7 +458,7 @@ fetch_curl_verify_callback(int verify_ok, X509_STORE_CTX *x509_ctx)
*/
if (!fetch->cert_data[depth].cert) {
fetch->cert_data[depth].cert = X509_STORE_CTX_get_current_cert(x509_ctx);
- fetch->cert_data[depth].cert->references++;
+ ns_X509_up_ref(fetch->cert_data[depth].cert);
fetch->cert_data[depth].err = X509_STORE_CTX_get_error(x509_ctx);
}
@@ -815,10 +835,7 @@ static void fetch_curl_free(void *vf)
}
for (i = 0; i < MAX_CERTS && f->cert_data[i].cert; i++) {
- f->cert_data[i].cert->references--;
- if (f->cert_data[i].cert->references == 0) {
- X509_free(f->cert_data[i].cert);
- }
+ ns_X509_free(f->cert_data[i].cert);
}
free(f);
@@ -986,10 +1003,7 @@ curl_start_cert_validate(struct curl_fetch_info *f,
X509_get_pubkey(certs[depth].cert));
/* and clean up */
- certs[depth].cert->references--;
- if (certs[depth].cert->references == 0) {
- X509_free(certs[depth].cert);
- }
+ ns_X509_free(certs[depth].cert);
}
msg.type = FETCH_CERT_ERR;
diff --git a/content/fs_backing_store.c b/content/fs_backing_store.c
index 7d8ac4b..635f917 100644
--- a/content/fs_backing_store.c
+++ b/content/fs_backing_store.c
@@ -27,9 +27,9 @@
*
* \todo Implement mmap retrieval where supported.
*
- * \todo Implement static retrival for metadata objects as their heap
+ * \todo Implement static retrieval for metadata objects as their heap
* lifetime is typically very short, though this may be obsoleted
- * by a small object storage stratagy.
+ * by a small object storage strategy.
*
*/
@@ -63,7 +63,7 @@
/** Backing store file format version */
#define CONTROL_VERSION 130
-/** Number of milliseconds after a update before control data maintinance is performed */
+/** Number of milliseconds after a update before control data maintenance is performed */
#define CONTROL_MAINT_TIME 10000
/** Get address from ident */
@@ -100,7 +100,7 @@
#define BLOCK_USE_MAP_SIZE (1 << (BLOCK_ENTRY_COUNT - 3))
/**
- * The type used to store index values refering to store entries. Care
+ * The type used to store index values referring to store entries. Care
* must be taken with this type as it is used to build address to
* entry mapping so changing the size will have large impacts on
* memory usage.
@@ -109,7 +109,7 @@ typedef uint16_t entry_index_t;
/**
* The type used as a binary identifier for each entry derived from
- * the url. A larger identifier will have fewer collisions but
+ * the URL. A larger identifier will have fewer collisions but
* requires proportionately more storage.
*/
typedef uint32_t entry_ident_t;
@@ -184,7 +184,7 @@ struct store_entry_element {
* @note Order is important to avoid excessive structure packing overhead.
*/
struct store_entry {
- int64_t last_used; /**< unix time the entry was last used */
+ int64_t last_used; /**< UNIX time the entry was last used */
entry_ident_t ident; /**< entry identifier */
uint16_t use_count; /**< number of times this entry has been accessed */
uint8_t flags; /**< entry flags */
@@ -227,7 +227,7 @@ struct store_state {
unsigned int entry_bits; /**< log2 number of bits in entry index. */
unsigned int last_entry; /**< index of last usable entry. */
- /** flag indicating if the entries have been made persistant
+ /** flag indicating if the entries have been made persistent
* since they were last changed.
*/
bool entries_dirty;
@@ -235,9 +235,9 @@ struct store_state {
/**
* URL identifier to entry index mapping.
*
- * This is an open coded index on the entries url field and
- * provides a computationaly inexpensive way to go from the
- * url to an entry.
+ * This is an open coded index on the entries URL field and
+ * provides a computationally inexpensive way to go from the
+ * URL to an entry.
*/
entry_index_t *addrmap;
@@ -246,12 +246,12 @@ struct store_state {
struct block_file blocks[ENTRY_ELEM_COUNT][BLOCK_FILE_COUNT];
/** flag indicating if the block file use maps have been made
- * persistant since they were last changed.
+ * persistent since they were last changed.
*/
bool blocks_dirty;
/** flag indicating if a block file has been opened for update
- * since maintinance was previously done.
+ * since maintenance was previously done.
*/
bool blocks_opened;
@@ -283,8 +283,8 @@ struct store_state *storestate;
*
* @param[in] state The store state to use.
* @param[in, out] bse Pointer to the entry to be removed.
- * @return NSERROR_OK and \a bse updated on succes or NSERROR_NOT_FOUND
- * if no entry coresponds to the url.
+ * @return NSERROR_OK and \a bse updated on success or NSERROR_NOT_FOUND
+ * if no entry corresponds to the URL.
*/
static nserror
remove_store_entry(struct store_state *state, struct store_entry **bse)
@@ -460,7 +460,7 @@ store_fname(struct store_state *state,
* @param state The store state to use.
* @param bse The entry to invalidate.
* @param elem_idx The element index to invalidate.
- * @return NSERROR_OK on sucess or error code on failure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
invalidate_element(struct store_state *state,
@@ -500,7 +500,7 @@ invalidate_element(struct store_state *state,
*
* @param state The store state to use.
* @param bse The entry to invalidate.
- * @return NSERROR_OK on sucess or error code on failure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
invalidate_entry(struct store_state *state, struct store_entry *bse)
@@ -554,7 +554,7 @@ static int compar(const void *va, const void *vb)
const struct store_entry *b = &BS_ENTRY(*(entry_ident_t *)vb, storestate);
/* consider the allocation flags - if an entry has an
- * allocation it is considered more valuble as it cannot be
+ * allocation it is considered more valuable as it cannot be
* freed.
*/
if ((a->elem[ENTRY_ELEM_DATA].flags == ENTRY_ELEM_FLAG_NONE) &&
@@ -670,7 +670,7 @@ static nserror store_evict(struct store_state *state)
* Serialise entry index out to storage.
*
* @param state The backing store state to serialise.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror write_entries(struct store_state *state)
{
@@ -735,7 +735,7 @@ static nserror write_entries(struct store_state *state)
* Serialise block file use map out to storage.
*
* \param state The backing store state to serialise.
- * \return NSERROR_OK on sucess or error code on faliure.
+ * \return NSERROR_OK on success or error code on failure.
*/
static nserror write_blocks(struct store_state *state)
{
@@ -812,11 +812,11 @@ wr_err:
* Ensures block files are of the correct extent
*
* block files have their extent set to their maximum size to ensure
- * subsequent reads and writes do not need to extend teh file and are
+ * subsequent reads and writes do not need to extend the file and are
* therefore faster.
*
* \param state The backing store state to set block extent for.
- * \return NSERROR_OK on sucess or error code on faliure.
+ * \return NSERROR_OK on success or error code on failure.
*/
static nserror set_block_extents(struct store_state *state)
{
@@ -849,7 +849,7 @@ static nserror set_block_extents(struct store_state *state)
}
/**
- * maintinance of control structures.
+ * maintenance of control structures.
*
* callback scheduled when control data has been update. Currently
* this is for when the entries table is dirty and requires
@@ -959,7 +959,7 @@ static block_index_t alloc_block(struct store_state *state, int elem_idx)
* @param datalen The length of data in \a data
* @param bse Pointer used to return value.
* @return NSERROR_OK and \a bse updated on success or NSERROR_NOT_FOUND
- * if no entry coresponds to the url.
+ * if no entry corresponds to the url.
*/
static nserror
set_store_entry(struct store_state *state,
@@ -1045,12 +1045,12 @@ set_store_entry(struct store_state *state,
elem->size = datalen;
state->total_alloc += elem->size;
- /* if the elemnt will fit in a small block attempt to allocate one */
+ /* if the element will fit in a small block attempt to allocate one */
if (elem->size <= (1U << log2_block_size[elem_idx])) {
elem->block = alloc_block(state, elem_idx);
}
- /* ensure control maintinance scheduled. */
+ /* ensure control maintenance scheduled. */
state->entries_dirty = true;
guit->misc->schedule(CONTROL_MAINT_TIME, control_maintinance, state);
@@ -1118,7 +1118,7 @@ store_open(struct store_state *state,
* we also compute the total storage in use.
*
* @param state The backing store global state.
- * @return NSERROR_OK on sucess or NSERROR_NOMEM if the map storage
+ * @return NSERROR_OK on success or NSERROR_NOMEM if the map storage
* could not be allocated.
*/
static nserror
@@ -1163,7 +1163,7 @@ build_entrymap(struct store_state *state)
* Unlink entries file
*
* @param state The backing store state.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
unlink_entries(struct store_state *state)
@@ -1186,7 +1186,7 @@ unlink_entries(struct store_state *state)
* Read description entries into memory.
*
* @param state The backing store state to put the loaded entries in.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on faliure.
*/
static nserror
read_entries(struct store_state *state)
@@ -1236,7 +1236,7 @@ read_entries(struct store_state *state)
* Read block file usage bitmaps.
*
* @param state The backing store state to put the loaded entries in.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
read_blocks(struct store_state *state)
@@ -1275,7 +1275,7 @@ read_blocks(struct store_state *state)
} else {
LOG("Initialising block use map to defaults");
- /* ensure block 0 (invalid sentinal) is skipped */
+ /* ensure block 0 (invalid sentinel) is skipped */
state->blocks[ENTRY_ELEM_DATA][0].use_map[0] = 1;
state->blocks[ENTRY_ELEM_META][0].use_map[0] = 1;
}
@@ -1293,7 +1293,7 @@ read_blocks(struct store_state *state)
* Write the cache tag file.
*
* @param state The cache state.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
write_cache_tag(struct store_state *state)
@@ -1330,7 +1330,7 @@ write_cache_tag(struct store_state *state)
* Write the control file for the current state.
*
* @param state The state to write to the control file.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
write_control(struct store_state *state)
@@ -1375,7 +1375,7 @@ write_control(struct store_state *state)
* Read and parse the control file.
*
* @param state The state to read from the control file.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
read_control(struct store_state *state)
@@ -1461,7 +1461,7 @@ control_error: /* problem with the control file */
* Initialise the backing store.
*
* @param parameters to configure backing store.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
initialise(const struct llcache_store_parameters *parameters)
@@ -1732,7 +1732,7 @@ static nserror store_write_file(struct store_state *state,
* @param bsflags The flags to control how the object is stored.
* @param data The objects source data.
* @param datalen The length of the \a data.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
store(nsurl *url,
@@ -1893,13 +1893,13 @@ static nserror store_read_file(struct store_state *state,
}
/**
- * Retrive an object from the backing store.
+ * Retrieve an object from the backing store.
*
* @param[in] url The url is used as the unique primary key for the data.
* @param[in] bsflags The flags to control how the object is retrieved.
* @param[out] data_out The objects data.
* @param[out] datalen_out The length of the \a data retrieved.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
fetch(nsurl *url,
@@ -1926,7 +1926,7 @@ fetch(nsurl *url,
}
storestate->hit_count++;
- LOG("retriving cache data for url:%s", nsurl_access(url));
+ LOG("retrieving cache data for url:%s", nsurl_access(url));
/* calculate the entry element index */
if ((bsflags & BACKING_STORE_META) != 0) {
@@ -1984,7 +1984,7 @@ fetch(nsurl *url,
*
* @param[in] url The url is used as the unique primary key to invalidate.
* @param[in] bsflags The flags to control how the object data is released.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror release(nsurl *url, enum backing_store_flags bsflags)
{
@@ -2032,7 +2032,7 @@ static nserror release(nsurl *url, enum backing_store_flags bsflags)
* be returned as a result to the fetch or meta operations.
*
* @param url The url is used as the unique primary key to invalidate.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
*/
static nserror
invalidate(nsurl *url)
diff --git a/content/hlcache.c b/content/hlcache.c
index 042e189..95edd21 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -16,8 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * High-level resource cache (implementation)
+/**
+ * \file
+ * High-level resource cache implementation.
*/
#include <assert.h>
@@ -86,7 +87,7 @@ struct hlcache_s {
/** Ring of retrieval contexts */
hlcache_retrieval_ctx *retrieval_ctx_ring;
- /* statsistics */
+ /* statistics */
unsigned int hit_count;
unsigned int miss_count;
};
@@ -665,12 +666,12 @@ nserror hlcache_handle_retrieve(nsurl *url, uint32_t flags,
hlcache_llcache_callback, ctx,
&ctx->llcache);
if (error != NSERROR_OK) {
- /* error retriving handle so free context and return error */
+ /* error retrieving handle so free context and return error */
free((char *) ctx->child.charset);
free(ctx->handle);
free(ctx);
} else {
- /* successfuly started fetch so add new context to list */
+ /* successfully started fetch so add new context to list */
RING_INSERT(hlcache->retrieval_ctx_ring, ctx);
*result = ctx->handle;
diff --git a/content/llcache.c b/content/llcache.c
index e338c1f..4bd6eb3 100644
--- a/content/llcache.c
+++ b/content/llcache.c
@@ -22,7 +22,7 @@
* Low-level resource cache implementation
*
* This is the implementation of the low level cache. This cache
- * stores source objects in memory and may use a persistant backing
+ * stores source objects in memory and may use a persistent backing
* store to extend their lifetime.
*
* \todo fix writeout conditions and ordering.
@@ -201,8 +201,8 @@ struct llcache_object {
llcache_header *headers; /**< Fetch headers */
size_t num_headers; /**< Number of fetch headers */
- /* Instrumentation. These elemnts are strictly for information
- * to improve the cache performance and to provide performace
+ /* Instrumentation. These elements are strictly for information
+ * to improve the cache performance and to provide performance
* metrics. The values are non-authorative and must not be used to
* determine object lifetime etc.
*/
@@ -268,7 +268,7 @@ struct llcache_s {
uint64_t total_written;
/**
- * Total nuber of miliseconds taken to write to backing store.
+ * Total number of milliseconds taken to write to backing store.
*/
uint64_t total_elapsed;
@@ -804,7 +804,7 @@ static nserror llcache_fetch_process_header(llcache_object *object,
*
* sets up headers and attempts to start an actual fetch from the
* fetchers system updating the llcache object with the new fetch on
- * sucessful start.
+ * successful start.
*
* \pre The fetch parameters in object->fetch must be populated
*
@@ -876,7 +876,7 @@ static nserror llcache_object_refetch(llcache_object *object)
/* Reset fetch state */
object->fetch.state = LLCACHE_FETCH_INIT;
- LLCACHE_LOG("Refetching %p", object);
+ LLCACHE_LOG("Re-fetching %p", object);
/* Kick off fetch */
res = fetch_start(object->url,
@@ -1173,27 +1173,27 @@ llcache_object_remove_from_list(llcache_object *object, llcache_object **list)
}
/**
- * Retrieve source data for an object from persistant store if necessary.
+ * Retrieve source data for an object from persistent store if necessary.
*
- * If an objects source data has been placed in the persistant store
- * and the in memory copy released this will attempt to retrive the
+ * If an objects source data has been placed in the persistent store
+ * and the in memory copy released this will attempt to retrieve the
* source data.
*
* \param object the object to operate on.
- * \return apropriate error code.
+ * \return appropriate error code.
*/
static nserror llcache_persist_retrieve(llcache_object *object)
{
/* ensure the source data is present if necessary */
if ((object->source_data != NULL) ||
(object->store_state != LLCACHE_STATE_DISC)) {
- /* source data does not require retriving from
- * persistant store.
+ /* source data does not require retrieving from
+ * persistent store.
*/
return NSERROR_OK;
}
- /* Source data for the object may be in the persiatant store */
+ /* Source data for the object may be in the persistent store */
return guit->llcache->fetch(object->url,
BACKING_STORE_NONE,
&object->source_data,
@@ -1205,7 +1205,7 @@ static nserror llcache_persist_retrieve(llcache_object *object)
*
* The metadata includes object headers.
*
- * \param object The cache object to serialise teh metadata of.
+ * \param object The cache object to serialise the metadata of.
* \param data_out Where the serialised buffer will be placed.
* \param datasize_out The size of the serialised data.
* \return NSERROR_OK on success with \a data_out and \a datasize_out
@@ -1347,15 +1347,15 @@ operror:
/**
* Deserialisation of an objects metadata.
*
- * Attempt to retrive and deserialise the metadata for an object from
+ * Attempt to retrieve and deserialise the metadata for an object from
* the backing store.
*
- * This must only update object if it is sucessful otherwise difficult
+ * This must only update object if it is successful otherwise difficult
* to debug crashes happen later by using bad leftover object state.
*
* \param object The object to retrieve the metadata for.
- * \return NSERROR_OK if the metatdata was retrived and deserialised
- * or error code if url is not in persistant storage or in
+ * \return NSERROR_OK if the metatdata was retrieved and deserialised
+ * or error code if URL is not in persistent storage or in
* event of deserialisation error.
*/
static nserror
@@ -1376,7 +1376,7 @@ llcache_process_metadata(llcache_object *object)
size_t num_headers;
size_t hloop;
- LOG("Retriving metadata");
+ LOG("Retrieving metadata");
/* attempt to retrieve object metadata from the backing store */
res = guit->llcache->fetch(object->url,
@@ -1387,7 +1387,7 @@ llcache_process_metadata(llcache_object *object)
return res;
}
- LOG("Processing retrived data");
+ LOG("Processing retrieved data");
/* metadata line 1 is the url the metadata referrs to */
line = 1;
@@ -1405,7 +1405,7 @@ llcache_process_metadata(llcache_object *object)
if (nsurl_compare(object->url, metadataurl, NSURL_COMPLETE) != true) {
/* backing store returned the wrong object for the
- * request. This may occour if the backing store had
+ * request. This may occur if the backing store had
* a collision in its storage method. We cope with this
* by simply skipping caching of this object.
*/
@@ -1511,14 +1511,14 @@ format_error:
}
/**
- * Attempt to retrieve an object from persistant storage.
+ * Attempt to retrieve an object from persistent storage.
*
- * \param object The object to populate from persistant store.
+ * \param object The object to populate from persistent store.
* \param flags Fetch flags.
* \param referer The referring url.
* \param post Post data for fetch.
* \param redirect_count how many times this fetch has been redirected.
- * \return NSERROR_OK if the object was sucessfully retrived from the
+ * \return NSERROR_OK if the object was successfully retrieved from the
* cache else appropriate error code.
*/
static nserror
@@ -1572,7 +1572,7 @@ llcache_object_fetch_persistant(llcache_object *object,
* \param referer Referring URL, or NULL if none
* \param post POST data, or NULL for a GET request
* \param redirect_count Number of redirects followed so far
- * \param result Pointer to location to recieve retrieved object
+ * \param result Pointer to location to receive retrieved object
* \return NSERROR_OK on success, appropriate error otherwise
*/
static nserror
@@ -1602,7 +1602,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
}
/* No viable object found in cache create one and attempt to
- * pull from persistant store.
+ * pull from persistent store.
*/
if (newest == NULL) {
LLCACHE_LOG("No viable object found in llcache");
@@ -1611,12 +1611,12 @@ llcache_object_retrieve_from_cache(nsurl *url,
if (error != NSERROR_OK)
return error;
- /* attempt to retrieve object from persistant store */
+ /* attempt to retrieve object from persistent store */
error = llcache_object_fetch_persistant(obj, flags, referer, post, redirect_count);
if (error == NSERROR_OK) {
- LLCACHE_LOG("retrived object from persistant store");
+ LLCACHE_LOG("retrieved object from persistent store");
- /* set newest object from persistant store which
+ /* set newest object from persistent store which
* will cause the normal object handling to be used.
*/
newest = obj;
@@ -1625,7 +1625,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
llcache_object_add_to_list(obj, &llcache->cached_objects);
}
- /* else no object found and unretrivable from cache,
+ /* else no object found and irretrievable from cache,
* fall through with newest unset to start fetch
*/
}
@@ -1641,19 +1641,19 @@ llcache_object_retrieve_from_cache(nsurl *url,
/* ensure the source data is present */
error = llcache_persist_retrieve(newest);
if (error == NSERROR_OK) {
- /* source data was sucessfully retrived from
- * persistant store
+ /* source data was successfully retrieved from
+ * persistent store
*/
*result = newest;
return NSERROR_OK;
}
- /* retrival of source data from persistant store
+ /* retrieval of source data from persistent store
* failed, destroy cache object and fall though to
* cache miss to re-fetch
*/
- LLCACHE_LOG("Persistant retrival failed for %p", newest);
+ LLCACHE_LOG("Persistent retrieval failed for %p", newest);
llcache_object_remove_from_list(newest, &llcache->cached_objects);
llcache_object_destroy(newest);
@@ -1704,9 +1704,9 @@ llcache_object_retrieve_from_cache(nsurl *url,
return NSERROR_OK;
}
- LLCACHE_LOG("Persistant retrival failed for %p", newest);
+ LLCACHE_LOG("Persistent retrieval failed for %p", newest);
- /* retrival of source data from persistant store
+ /* retrieval of source data from persistent store
* failed, destroy cache object and fall though to
* cache miss to re-retch
*/
@@ -1743,7 +1743,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
* \param referer Referring URL, or NULL if none
* \param post POST data, or NULL for a GET request
* \param redirect_count Number of redirects followed so far
- * \param result Pointer to location to recieve retrieved object
+ * \param result Pointer to location to receive retrieved object
* \return NSERROR_OK on success, appropriate error otherwise
*/
static nserror
@@ -2372,7 +2372,7 @@ build_candidate_list(struct llcache_object ***lst_out, int *lst_len_out)
/* cacehable objects with no pending fetches, not
* already on disc and with sufficient lifetime to
- * make disc cache worthwile
+ * make disc cache worthwhile
*/
if ((object->candidate_count == 0) &&
(object->fetch.fetch == NULL) &&
@@ -2526,20 +2526,20 @@ static void llcache_persist(void *p)
ret = build_candidate_list(&lst, &lst_count);
if (ret != NSERROR_OK) {
- LLCACHE_LOG("Unable to construct candidate list for persisatnt writeout");
+ LLCACHE_LOG("Unable to construct candidate list for persistent writeout");
return;
}
write_limit = (llcache->maximum_bandwidth * llcache->time_quantum) / 1000;
- /* obtained a candidate list, make each object persistant in turn */
+ /* obtained a candidate list, make each object persistent in turn */
for (idx = 0; idx < lst_count; idx++) {
ret = write_backing_store(lst[idx], &written, &elapsed);
if (ret != NSERROR_OK) {
continue;
}
- /* sucessfully wrote object to backing store */
+ /* successfully wrote object to backing store */
total_written += written;
total_elapsed += elapsed;
total_bandwidth = (total_written * 1000) / total_elapsed;
@@ -3138,7 +3138,7 @@ llcache_object_snapshot(llcache_object *object, llcache_object **snapshot)
/**
* total ram usage of object
*
- * \param object The object to caclulate the total RAM usage of.
+ * \param object The object to calculate the total RAM usage of.
* \return The total RAM usage in bytes.
*/
static inline uint32_t
@@ -3253,7 +3253,7 @@ void llcache_clean(bool purge)
}
/* if the cache limit is exceeded try to make some objects
- * persistant so their RAM can be reclaimed in the next
+ * persistent so their RAM can be reclaimed in the next
* step
*/
if (limit < llcache_size) {
@@ -3261,7 +3261,7 @@ void llcache_clean(bool purge)
}
/* Source data of fresh cacheable objects with no users, no
- * pending fetches and pushed to persistant store while the
+ * pending fetches and pushed to persistent store while the
* cache exceeds the configured size.
*/
for (object = llcache->cached_objects;
@@ -3286,8 +3286,8 @@ void llcache_clean(bool purge)
}
/* Fresh cacheable objects with no users, no pending fetches
- * and pushed to persistant store while the cache exceeds
- * the configured size. Efectively just the llcache object metadata.
+ * and pushed to persistent store while the cache exceeds
+ * the configured size. Effectively just the llcache object metadata.
*/
for (object = llcache->cached_objects;
((limit < llcache_size) && (object != NULL));
@@ -3317,7 +3317,7 @@ void llcache_clean(bool purge)
/* Fresh cacheable objects with no users or pending fetches
* while the cache exceeds the configured size. These are the
- * most valuble objects as replacing them is a full network
+ * most valuable objects as replacing them is a full network
* fetch
*/
for (object = llcache->cached_objects;
--
NetSurf Browser
6 years, 2 months
toolchains: branch master updated. a6dfe581e487e9443813703e37c96633817176f9
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/toolchains.git/shortlog/a6dfe581e487e94438...
...commit http://git.netsurf-browser.org/toolchains.git/commit/a6dfe581e487e9443813...
...tree http://git.netsurf-browser.org/toolchains.git/tree/a6dfe581e487e944381370...
The branch, master has been updated
via a6dfe581e487e9443813703e37c96633817176f9 (commit)
from d171f413b92004d5c349036306e15ecc79a8e73b (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/toolchains.git/commit/?id=a6dfe581e487e944...
commit a6dfe581e487e9443813703e37c96633817176f9
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Update clib2 to 1.208
Allows us to get slab allocator stats
diff --git a/m68k-unknown-amigaos/Makefile b/m68k-unknown-amigaos/Makefile
index 5b16afa..7ba2e19 100644
--- a/m68k-unknown-amigaos/Makefile
+++ b/m68k-unknown-amigaos/Makefile
@@ -20,7 +20,7 @@ UPSTREAM_MPC_VERSION := 0.8.2
UPSTREAM_MPC_TARBALL := mpc-$(UPSTREAM_MPC_VERSION).tar.gz
UPSTREAM_MPC_URI := http://www.multiprecision.org/mpc/download/$(UPSTREAM_MPC_TARBALL)
-UPSTREAM_CLIB2_VERSION := 1_207
+UPSTREAM_CLIB2_VERSION := 1_208
UPSTREAM_CLIB2_TARBALL := V$(UPSTREAM_CLIB2_VERSION).tar.gz
UPSTREAM_CLIB2_URI := https://github.com/adtools/clib2/archive/$(UPSTREAM_CLIB2_TARBALL)
diff --git a/m68k-unknown-amigaos/recipes/patches/clib2/clib2.GNUmakefile.68k.p b/m68k-unknown-amigaos/recipes/patches/clib2/clib2.GNUmakefile.68k.p
index 88bfe42..09bd9d8 100644
--- a/m68k-unknown-amigaos/recipes/patches/clib2/clib2.GNUmakefile.68k.p
+++ b/m68k-unknown-amigaos/recipes/patches/clib2/clib2.GNUmakefile.68k.p
@@ -13,14 +13,6 @@
COPY = cp
DELETE = rm -rf
MAKEDIR = mkdir -p
-@@ -326,7 +326,6 @@ C_LIB = \
- stdlib_dosbase.o \
- stdlib_exit.o \
- stdlib_free.o \
-- stdlib_free_unused_slabs.o \
- stdlib_getdefstacksize.o \
- stdlib_getenv.o \
- stdlib_getmemstats.o \
@@ -533,6 +532,7 @@ UNIX_LIB = \
stdlib_realloc.o \
stdlib_resetmemstats.o \
@@ -44,12 +36,3 @@
##############################################################################
-@@ -1132,8 +1132,6 @@ $(LIBC_OBJS)/stdlib_malloc.o : stdlib_ma
-
- $(LIBC_OBJS)/stdlib_slab.o : stdlib_slab.c stdlib_memory.h
-
--$(LIBC_OBJS)/stdlib_free_unused_slabs.o : stdlib_free_unused_slabs.c stdlib_memory.h
--
- $(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_memory.h
-
- $(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h
-----------------------------------------------------------------------
Summary of changes:
m68k-unknown-amigaos/Makefile | 2 +-
.../recipes/patches/clib2/clib2.GNUmakefile.68k.p | 17 -----------------
2 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/m68k-unknown-amigaos/Makefile b/m68k-unknown-amigaos/Makefile
index 5b16afa..7ba2e19 100644
--- a/m68k-unknown-amigaos/Makefile
+++ b/m68k-unknown-amigaos/Makefile
@@ -20,7 +20,7 @@ UPSTREAM_MPC_VERSION := 0.8.2
UPSTREAM_MPC_TARBALL := mpc-$(UPSTREAM_MPC_VERSION).tar.gz
UPSTREAM_MPC_URI := http://www.multiprecision.org/mpc/download/$(UPSTREAM_MPC_TARBALL)
-UPSTREAM_CLIB2_VERSION := 1_207
+UPSTREAM_CLIB2_VERSION := 1_208
UPSTREAM_CLIB2_TARBALL := V$(UPSTREAM_CLIB2_VERSION).tar.gz
UPSTREAM_CLIB2_URI := https://github.com/adtools/clib2/archive/$(UPSTREAM_CLIB2_TARBALL)
diff --git a/m68k-unknown-amigaos/recipes/patches/clib2/clib2.GNUmakefile.68k.p b/m68k-unknown-amigaos/recipes/patches/clib2/clib2.GNUmakefile.68k.p
index 88bfe42..09bd9d8 100644
--- a/m68k-unknown-amigaos/recipes/patches/clib2/clib2.GNUmakefile.68k.p
+++ b/m68k-unknown-amigaos/recipes/patches/clib2/clib2.GNUmakefile.68k.p
@@ -13,14 +13,6 @@
COPY = cp
DELETE = rm -rf
MAKEDIR = mkdir -p
-@@ -326,7 +326,6 @@ C_LIB = \
- stdlib_dosbase.o \
- stdlib_exit.o \
- stdlib_free.o \
-- stdlib_free_unused_slabs.o \
- stdlib_getdefstacksize.o \
- stdlib_getenv.o \
- stdlib_getmemstats.o \
@@ -533,6 +532,7 @@ UNIX_LIB = \
stdlib_realloc.o \
stdlib_resetmemstats.o \
@@ -44,12 +36,3 @@
##############################################################################
-@@ -1132,8 +1132,6 @@ $(LIBC_OBJS)/stdlib_malloc.o : stdlib_ma
-
- $(LIBC_OBJS)/stdlib_slab.o : stdlib_slab.c stdlib_memory.h
-
--$(LIBC_OBJS)/stdlib_free_unused_slabs.o : stdlib_free_unused_slabs.c stdlib_memory.h
--
- $(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_memory.h
-
- $(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h
--
Cross-compilation toolchains and environments
6 years, 2 months
toolchains: branch chris/clib2-debug created. 70ca3eb8751bb2d96323bf1528e9c6ce80b0b307
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/toolchains.git/shortlog/70ca3eb8751bb2d963...
...commit http://git.netsurf-browser.org/toolchains.git/commit/70ca3eb8751bb2d96323...
...tree http://git.netsurf-browser.org/toolchains.git/tree/70ca3eb8751bb2d96323bf...
The branch, chris/clib2-debug has been created
at 70ca3eb8751bb2d96323bf1528e9c6ce80b0b307 (commit)
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/toolchains.git/commit/?id=70ca3eb8751bb2d9...
commit 70ca3eb8751bb2d96323bf1528e9c6ce80b0b307
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Enable clib2 memory debug mode
diff --git a/m68k-unknown-amigaos/recipes/patches/clib2/clib2.stdlib_memory.h.p b/m68k-unknown-amigaos/recipes/patches/clib2/clib2.stdlib_memory.h.p
new file mode 100644
index 0000000..1f61659
--- /dev/null
+++ b/m68k-unknown-amigaos/recipes/patches/clib2/clib2.stdlib_memory.h.p
@@ -0,0 +1,29 @@
+--- /home/chris/netsurf/toolchains/m68k-unknown-amigaos/builddir/clib2/stdlib_memory.h 2016-11-18 16:22:21.000000000 +0000
++++ stdlib_memory.h 2016-11-20 14:56:44.477019674 +0000
+@@ -40,7 +40,7 @@
+ * Uncomment this to build a library which has the memory debugging features
+ * enabled.
+ */
+-/*#define __MEM_DEBUG*/
++#define __MEM_DEBUG
+
+ /****************************************************************************/
+
+@@ -48,7 +48,7 @@
+ * Uncomment this to see reports of where and how much memory is allocated
+ * or released.
+ */
+-/*#define __MEM_DEBUG_LOG*/
++#define __MEM_DEBUG_LOG
+
+ /****************************************************************************/
+
+@@ -56,7 +56,7 @@
+ * Uncomment this to speed up memory data maintenance operations when
+ * the memory debugging mode is enabled.
+ */
+-/*#define __USE_MEM_TREES*/
++#define __USE_MEM_TREES
+
+ /****************************************************************************/
+
-----------------------------------------------------------------------
--
Cross-compilation toolchains and environments
6 years, 2 months
netsurf: branch dsilvers/eventtarget updated. release/3.6-7-g6b9a2e3
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/6b9a2e3aba35ea8906043...
...commit http://git.netsurf-browser.org/netsurf.git/commit/6b9a2e3aba35ea890604356...
...tree http://git.netsurf-browser.org/netsurf.git/tree/6b9a2e3aba35ea890604356fc...
The branch, dsilvers/eventtarget has been updated
via 6b9a2e3aba35ea890604356fcf888268667ab9c5 (commit)
from c0aadc56162e73509a1557e2cd69e2fd6125cf8f (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=6b9a2e3aba35ea89060...
commit 6b9a2e3aba35ea890604356fcf888268667ab9c5
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Oops ' ' -> _
diff --git a/content/handlers/javascript/duktape/EventTarget.bnd b/content/handlers/javascript/duktape/EventTarget.bnd
index 9f7c91a..fb20883 100644
--- a/content/handlers/javascript/duktape/EventTarget.bnd
+++ b/content/handlers/javascript/duktape/EventTarget.bnd
@@ -43,8 +43,8 @@ static void event_target_push_listeners(duk_context *ctx) {
/* ... listeners type ??? */
duk_pop(ctx);
duk_push_object(ctx);
- duk dup(ctx, -2);
- duk dup(ctx, -2);
+ duk_dup(ctx, -2);
+ duk_dup(ctx, -2);
/* ... listeners type sublisteners type sublisteners */
duk_put_prop(ctx, -5);
/* ... listeners type sublisteners */
-----------------------------------------------------------------------
Summary of changes:
content/handlers/javascript/duktape/EventTarget.bnd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/content/handlers/javascript/duktape/EventTarget.bnd b/content/handlers/javascript/duktape/EventTarget.bnd
index 9f7c91a..fb20883 100644
--- a/content/handlers/javascript/duktape/EventTarget.bnd
+++ b/content/handlers/javascript/duktape/EventTarget.bnd
@@ -43,8 +43,8 @@ static void event_target_push_listeners(duk_context *ctx) {
/* ... listeners type ??? */
duk_pop(ctx);
duk_push_object(ctx);
- duk dup(ctx, -2);
- duk dup(ctx, -2);
+ duk_dup(ctx, -2);
+ duk_dup(ctx, -2);
/* ... listeners type sublisteners type sublisteners */
duk_put_prop(ctx, -5);
/* ... listeners type sublisteners */
--
NetSurf Browser
6 years, 2 months
netsurf: branch dsilvers/eventtarget updated. release/3.6-6-gc0aadc5
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/c0aadc56162e73509a155...
...commit http://git.netsurf-browser.org/netsurf.git/commit/c0aadc56162e73509a1557e...
...tree http://git.netsurf-browser.org/netsurf.git/tree/c0aadc56162e73509a1557e2c...
The branch, dsilvers/eventtarget has been updated
via c0aadc56162e73509a1557e2cd69e2fd6125cf8f (commit)
from bf80b18929da2dc3beb36aa96a6cea645e4088ef (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=c0aadc56162e73509a1...
commit c0aadc56162e73509a1557e2cd69e2fd6125cf8f
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
More useful utilities for event listeners
diff --git a/content/handlers/javascript/duktape/EventTarget.bnd b/content/handlers/javascript/duktape/EventTarget.bnd
index a53e71d..9f7c91a 100644
--- a/content/handlers/javascript/duktape/EventTarget.bnd
+++ b/content/handlers/javascript/duktape/EventTarget.bnd
@@ -17,24 +17,69 @@ prologue EventTarget()
#define EVENT_LISTENER_JS_MAGIC MAGIC(EVENT_LISTENER_JS_MAP)
static void event_target_push_listeners(duk_context *ctx) {
- /* ... (this=EventTarget) */
+ /* ... type (this=EventTarget) */
duk_push_this(ctx);
- /* ... this */
+ /* ... type this */
duk_get_prop_string(ctx, -1, EVENT_LISTENER_JS_MAGIC);
if (duk_is_null(ctx, -1)) {
- /* ... this null */
+ /* ... type this null */
duk_pop(ctx);
duk_push_object(ctx);
duk_dup(ctx, -1);
- /* ... this listeners listeners */
+ /* ... type this listeners listeners */
duk_put_prop_string(ctx, -3, EVENT_LISTENER_JS_MAGIC);
- /* ... this listeners */
+ /* ... type this listeners */
}
- /* ... this listeners */
- duk_insert(ctx, -2);
- /* ... listeners this */
+ /* ... type this listeners */
+ duk_insert(ctx, -3);
+ /* ... listeners type this */
duk_pop(ctx);
- /* ... listeners */
+ /* ... listeners type */
+ duk_dup(ctx, -1);
+ /* ... listeners type type */
+ duk_get_prop(ctx, -3);
+ /* ... listeners type ??? */
+ if (duk_is_null(ctx, -1)) {
+ /* ... listeners type ??? */
+ duk_pop(ctx);
+ duk_push_object(ctx);
+ duk dup(ctx, -2);
+ duk dup(ctx, -2);
+ /* ... listeners type sublisteners type sublisteners */
+ duk_put_prop(ctx, -5);
+ /* ... listeners type sublisteners */
+ }
+ duk_insert(ctx, -3);
+ /* ... sublisteners listeners type */
+ duk_pop_2(ctx);
+ /* ... sublisteners */
+}
+
+typedef enum {
+ ELF_CAPTURE = 1 << 0,
+ ELF_PASSIVE = 1 << 1,
+ ELF_ONCE = 1 << 2,
+ ELF_NONE = 0
+} event_listener_flags;
+
+static event_listener_flags event_listener_pop_options(duk_context *ctx)
+{
+ event_listener_flags ret = ELF_NONE;
+ /* ... options */
+ duk_get_prop_string(ctx, -1, "capture");
+ if (duk_to_boolean(ctx, -1))
+ ret |= ELF_CAPTURE;
+ duk_pop(ctx);
+ duk_get_prop_string(ctx, -1, "passive");
+ if (duk_to_boolean(ctx, -1))
+ ret |= ELF_PASSIVE;
+ duk_pop(ctx);
+ duk_get_prop_string(ctx, -1, "once");
+ if (duk_to_boolean(ctx, -1))
+ ret |= ELF_CAPTURE;
+ duk_pop_2(ctx);
+ /* ... */
+ return ret;
}
%}
@@ -47,6 +92,7 @@ init EventTarget()
method EventTarget::addEventListener()
%{
dom_exception exc;
+ event_listener_flags flags = ELF_NONE;
/* Incoming stack is: type callback [options] */
if (duk_get_top(ctx) < 2) return 0; /* Bad arguments */
if (duk_get_top(ctx) > 3) return 0; /* Bad arguments */
@@ -64,8 +110,13 @@ method EventTarget::addEventListener()
/* ... options */
}
/* type callback options */
+ flags = event_listener_pop_options(ctx);
+ /* type callback */
+ duk_dup(ctx, -2);
+ /* type callback type */
event_target_push_listeners(ctx);
- /* type callback options listeners */
+ /* type callback typelisteners */
+
return 0;
%}
-----------------------------------------------------------------------
Summary of changes:
.../handlers/javascript/duktape/EventTarget.bnd | 71 +++++++++++++++++---
1 file changed, 61 insertions(+), 10 deletions(-)
diff --git a/content/handlers/javascript/duktape/EventTarget.bnd b/content/handlers/javascript/duktape/EventTarget.bnd
index a53e71d..9f7c91a 100644
--- a/content/handlers/javascript/duktape/EventTarget.bnd
+++ b/content/handlers/javascript/duktape/EventTarget.bnd
@@ -17,24 +17,69 @@ prologue EventTarget()
#define EVENT_LISTENER_JS_MAGIC MAGIC(EVENT_LISTENER_JS_MAP)
static void event_target_push_listeners(duk_context *ctx) {
- /* ... (this=EventTarget) */
+ /* ... type (this=EventTarget) */
duk_push_this(ctx);
- /* ... this */
+ /* ... type this */
duk_get_prop_string(ctx, -1, EVENT_LISTENER_JS_MAGIC);
if (duk_is_null(ctx, -1)) {
- /* ... this null */
+ /* ... type this null */
duk_pop(ctx);
duk_push_object(ctx);
duk_dup(ctx, -1);
- /* ... this listeners listeners */
+ /* ... type this listeners listeners */
duk_put_prop_string(ctx, -3, EVENT_LISTENER_JS_MAGIC);
- /* ... this listeners */
+ /* ... type this listeners */
}
- /* ... this listeners */
- duk_insert(ctx, -2);
- /* ... listeners this */
+ /* ... type this listeners */
+ duk_insert(ctx, -3);
+ /* ... listeners type this */
duk_pop(ctx);
- /* ... listeners */
+ /* ... listeners type */
+ duk_dup(ctx, -1);
+ /* ... listeners type type */
+ duk_get_prop(ctx, -3);
+ /* ... listeners type ??? */
+ if (duk_is_null(ctx, -1)) {
+ /* ... listeners type ??? */
+ duk_pop(ctx);
+ duk_push_object(ctx);
+ duk dup(ctx, -2);
+ duk dup(ctx, -2);
+ /* ... listeners type sublisteners type sublisteners */
+ duk_put_prop(ctx, -5);
+ /* ... listeners type sublisteners */
+ }
+ duk_insert(ctx, -3);
+ /* ... sublisteners listeners type */
+ duk_pop_2(ctx);
+ /* ... sublisteners */
+}
+
+typedef enum {
+ ELF_CAPTURE = 1 << 0,
+ ELF_PASSIVE = 1 << 1,
+ ELF_ONCE = 1 << 2,
+ ELF_NONE = 0
+} event_listener_flags;
+
+static event_listener_flags event_listener_pop_options(duk_context *ctx)
+{
+ event_listener_flags ret = ELF_NONE;
+ /* ... options */
+ duk_get_prop_string(ctx, -1, "capture");
+ if (duk_to_boolean(ctx, -1))
+ ret |= ELF_CAPTURE;
+ duk_pop(ctx);
+ duk_get_prop_string(ctx, -1, "passive");
+ if (duk_to_boolean(ctx, -1))
+ ret |= ELF_PASSIVE;
+ duk_pop(ctx);
+ duk_get_prop_string(ctx, -1, "once");
+ if (duk_to_boolean(ctx, -1))
+ ret |= ELF_CAPTURE;
+ duk_pop_2(ctx);
+ /* ... */
+ return ret;
}
%}
@@ -47,6 +92,7 @@ init EventTarget()
method EventTarget::addEventListener()
%{
dom_exception exc;
+ event_listener_flags flags = ELF_NONE;
/* Incoming stack is: type callback [options] */
if (duk_get_top(ctx) < 2) return 0; /* Bad arguments */
if (duk_get_top(ctx) > 3) return 0; /* Bad arguments */
@@ -64,8 +110,13 @@ method EventTarget::addEventListener()
/* ... options */
}
/* type callback options */
+ flags = event_listener_pop_options(ctx);
+ /* type callback */
+ duk_dup(ctx, -2);
+ /* type callback type */
event_target_push_listeners(ctx);
- /* type callback options listeners */
+ /* type callback typelisteners */
+
return 0;
%}
--
NetSurf Browser
6 years, 2 months
libcss: branch master updated. release/0.6.1-25-g8e7e041
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libcss.git/shortlog/8e7e0412adc25060e70aa8...
...commit http://git.netsurf-browser.org/libcss.git/commit/8e7e0412adc25060e70aa84e...
...tree http://git.netsurf-browser.org/libcss.git/tree/8e7e0412adc25060e70aa84ebb...
The branch, master has been updated
via 8e7e0412adc25060e70aa84ebbd43b37c9cc710b (commit)
from d986c1c356aba25bdf0b977133b387fbdad5aa90 (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/libcss.git/commit/?id=8e7e0412adc25060e70a...
commit 8e7e0412adc25060e70aa84ebbd43b37c9cc710b
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Selection: Try all previous sibling nodes for sharable styles.
Previously we would only consider the first candidate.
diff --git a/src/select/select.c b/src/select/select.c
index e46134c..8488b74 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -964,14 +964,15 @@ printf(" \t%s\tno share: node id (%s)\n", lwc_string_data(state->element.na
type, sharable_node_data);
if (error != CSS_OK) {
return error;
- } else {
- if (sharable_node_data == NULL) {
- /* Can't share with this; look for another */
- continue;
- } else {
- break;
- }
}
+
+ if (*sharable_node_data != NULL) {
+ /* Found style date we can share */
+ break;
+ }
+
+ /* Can't share with this; look for another */
+ node = share_candidate_node;
}
return CSS_OK;
-----------------------------------------------------------------------
Summary of changes:
src/select/select.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/select/select.c b/src/select/select.c
index e46134c..8488b74 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -964,14 +964,15 @@ printf(" \t%s\tno share: node id (%s)\n", lwc_string_data(state->element.na
type, sharable_node_data);
if (error != CSS_OK) {
return error;
- } else {
- if (sharable_node_data == NULL) {
- /* Can't share with this; look for another */
- continue;
- } else {
- break;
- }
}
+
+ if (*sharable_node_data != NULL) {
+ /* Found style date we can share */
+ break;
+ }
+
+ /* Can't share with this; look for another */
+ node = share_candidate_node;
}
return CSS_OK;
--
Cascading Style Sheets library
6 years, 2 months
libcss: branch jmb/mq created. release/0.6.1-25-g3634123
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libcss.git/shortlog/3634123921fdff383e1ed6...
...commit http://git.netsurf-browser.org/libcss.git/commit/3634123921fdff383e1ed62f...
...tree http://git.netsurf-browser.org/libcss.git/tree/3634123921fdff383e1ed62f62...
The branch, jmb/mq has been created
at 3634123921fdff383e1ed62f62f1aaf1e71134f5 (commit)
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=3634123921fdff383e1e...
commit 3634123921fdff383e1ed62f62f1aaf1e71134f5
Author: John-Mark Bell <jmb(a)netsurf-browser.org>
Commit: John-Mark Bell <jmb(a)netsurf-browser.org>
Media Queries: datastructures and plumbing.
No parse implementation as yet.
Selection hasn't been updated, either. One item of note
in that area is that a client currently provides the
media for top-level sheets being added to a selection
context. This probably needs to change to providing a
lwc_string containing the verbatim media query from
the containing document's import mechanism. That way,
the internal representation of media queries can remain
opaque to clients.
diff --git a/include/libcss/stylesheet.h b/include/libcss/stylesheet.h
index f92d870..f7032da 100644
--- a/include/libcss/stylesheet.h
+++ b/include/libcss/stylesheet.h
@@ -36,7 +36,6 @@ typedef css_error (*css_url_resolution_fn)(void *pw,
* \param pw Client data
* \param parent Stylesheet requesting the import
* \param url URL of the imported sheet
- * \param media Applicable media for the imported sheet
* \return CSS_OK on success, appropriate error otherwise
*
* \note This function will be invoked for notification purposes
@@ -46,7 +45,7 @@ typedef css_error (*css_url_resolution_fn)(void *pw,
* registration API.
*/
typedef css_error (*css_import_notification_fn)(void *pw,
- css_stylesheet *parent, lwc_string *url, uint64_t media);
+ css_stylesheet *parent, lwc_string *url);
/**
* Callback use to resolve system colour names to RGB values
@@ -145,7 +144,7 @@ css_error css_stylesheet_append_data(css_stylesheet *sheet,
css_error css_stylesheet_data_done(css_stylesheet *sheet);
css_error css_stylesheet_next_pending_import(css_stylesheet *parent,
- lwc_string **url, uint64_t *media);
+ lwc_string **url);
css_error css_stylesheet_register_import(css_stylesheet *parent,
css_stylesheet *child);
diff --git a/src/parse/Makefile b/src/parse/Makefile
index 99f55d0..6d11096 100644
--- a/src/parse/Makefile
+++ b/src/parse/Makefile
@@ -1,4 +1,4 @@
# Sources
-DIR_SOURCES := parse.c language.c important.c propstrings.c font_face.c
+DIR_SOURCES := parse.c language.c important.c propstrings.c font_face.c mq.c
include $(NSBUILD)/Makefile.subdir
diff --git a/src/parse/language.c b/src/parse/language.c
index 11e2b2f..68055e1 100644
--- a/src/parse/language.c
+++ b/src/parse/language.c
@@ -15,6 +15,7 @@
#include "parse/font_face.h"
#include "parse/important.h"
#include "parse/language.h"
+#include "parse/mq.h"
#include "parse/parse.h"
#include "parse/propstrings.h"
#include "parse/properties/properties.h"
@@ -53,9 +54,6 @@ static css_error handleDeclaration(css_language *c,
const parserutils_vector *vector);
/* At-rule parsing */
-static css_error parseMediaList(css_language *c,
- const parserutils_vector *vector, int *ctx,
- uint64_t *media);
static css_error addNamespace(css_language *c,
lwc_string *prefix, lwc_string *uri);
static css_error lookupNamespace(css_language *c,
@@ -416,10 +414,10 @@ css_error handleStartAtRule(css_language *c, const parserutils_vector *vector)
match) {
if (c->state <= IMPORT_PERMITTED) {
lwc_string *url;
- uint64_t media = 0;
+ css_mq_query *media = NULL;
/* any0 = (STRING | URI) ws
- * (IDENT ws (',' ws IDENT ws)* )? */
+ * (media query)? */
const css_token *uri =
parserutils_vector_iterate(vector, &ctx);
if (uri == NULL || (uri->type != CSS_TOKEN_STRING &&
@@ -429,21 +427,24 @@ css_error handleStartAtRule(css_language *c, const parserutils_vector *vector)
consumeWhitespace(vector, &ctx);
/* Parse media list */
- error = parseMediaList(c, vector, &ctx, &media);
+ error = css__mq_parse_media_list(c, vector, &ctx, &media);
if (error != CSS_OK)
return error;
/* Create rule */
error = css__stylesheet_rule_create(c->sheet,
CSS_RULE_IMPORT, &rule);
- if (error != CSS_OK)
+ if (error != CSS_OK) {
+ css__mq_query_unref(media);
return error;
+ }
/* Resolve import URI */
error = c->sheet->resolve(c->sheet->resolve_pw,
c->sheet->url,
uri->idata, &url);
if (error != CSS_OK) {
+ css__mq_query_unref(media);
css__stylesheet_rule_destroy(c->sheet, rule);
return error;
}
@@ -453,6 +454,7 @@ css_error handleStartAtRule(css_language *c, const parserutils_vector *vector)
rule, url, media);
if (error != CSS_OK) {
lwc_string_unref(url);
+ css__mq_query_unref(media);
css__stylesheet_rule_destroy(c->sheet, rule);
return error;
}
@@ -460,17 +462,19 @@ css_error handleStartAtRule(css_language *c, const parserutils_vector *vector)
/* Inform client of need for import */
if (c->sheet->import != NULL) {
error = c->sheet->import(c->sheet->import_pw,
- c->sheet, url, media);
+ c->sheet, url);
if (error != CSS_OK) {
lwc_string_unref(url);
+ css__mq_query_unref(media);
css__stylesheet_rule_destroy(c->sheet,
rule);
return error;
}
}
- /* No longer care about url */
+ /* No longer care about url or media */
lwc_string_unref(url);
+ css__mq_query_unref(media);
/* Add rule to sheet */
error = css__stylesheet_add_rule(c->sheet, rule, NULL);
@@ -527,31 +531,37 @@ css_error handleStartAtRule(css_language *c, const parserutils_vector *vector)
}
} else if (lwc_string_caseless_isequal(atkeyword->idata, c->strings[MEDIA],
&match) == lwc_error_ok && match) {
- uint64_t media = 0;
+ css_mq_query *media = NULL;
- /* any0 = IDENT ws (',' ws IDENT ws)* */
+ /* any0 = media query */
- error = parseMediaList(c, vector, &ctx, &media);
+ error = css__mq_parse_media_list(c, vector, &ctx, &media);
if (error != CSS_OK)
return error;
error = css__stylesheet_rule_create(c->sheet,
CSS_RULE_MEDIA, &rule);
- if (error != CSS_OK)
+ if (error != CSS_OK) {
+ css__mq_query_unref(media);
return error;
+ }
error = css__stylesheet_rule_set_media(c->sheet, rule, media);
if (error != CSS_OK) {
css__stylesheet_rule_destroy(c->sheet, rule);
+ css__mq_query_unref(media);
return error;
}
error = css__stylesheet_add_rule(c->sheet, rule, NULL);
if (error != CSS_OK) {
css__stylesheet_rule_destroy(c->sheet, rule);
+ css__mq_query_unref(media);
return error;
}
+ css__mq_query_unref(media);
+
/* Rule is now owned by the sheet,
* so no need to destroy it */
@@ -795,85 +805,6 @@ css_error handleDeclaration(css_language *c, const parserutils_vector *vector)
* At-rule parsing functions *
******************************************************************************/
-css_error parseMediaList(css_language *c,
- const parserutils_vector *vector, int *ctx,
- uint64_t *media)
-{
- uint64_t ret = 0;
- bool match = false;
- const css_token *token;
-
- token = parserutils_vector_iterate(vector, ctx);
-
- while (token != NULL) {
- if (token->type != CSS_TOKEN_IDENT)
- return CSS_INVALID;
-
- if (lwc_string_caseless_isequal(token->idata, c->strings[AURAL],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_AURAL;
- } else if (lwc_string_caseless_isequal(
- token->idata, c->strings[BRAILLE],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_BRAILLE;
- } else if (lwc_string_caseless_isequal(
- token->idata, c->strings[EMBOSSED],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_EMBOSSED;
- } else if (lwc_string_caseless_isequal(
- token->idata, c->strings[HANDHELD],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_HANDHELD;
- } else if (lwc_string_caseless_isequal(
- token->idata, c->strings[PRINT],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_PRINT;
- } else if (lwc_string_caseless_isequal(
- token->idata, c->strings[PROJECTION],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_PROJECTION;
- } else if (lwc_string_caseless_isequal(
- token->idata, c->strings[SCREEN],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_SCREEN;
- } else if (lwc_string_caseless_isequal(
- token->idata, c->strings[SPEECH],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_SPEECH;
- } else if (lwc_string_caseless_isequal(
- token->idata, c->strings[TTY],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_TTY;
- } else if (lwc_string_caseless_isequal(
- token->idata, c->strings[TV],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_TV;
- } else if (lwc_string_caseless_isequal(
- token->idata, c->strings[ALL],
- &match) == lwc_error_ok && match) {
- ret |= CSS_MEDIA_ALL;
- } else
- return CSS_INVALID;
-
- consumeWhitespace(vector, ctx);
-
- token = parserutils_vector_iterate(vector, ctx);
- if (token != NULL && tokenIsChar(token, ',') == false)
- return CSS_INVALID;
-
- consumeWhitespace(vector, ctx);
- }
-
- /* If, after parsing the media list, we still have no media,
- * then it must be ALL. */
- if (ret == 0)
- ret = CSS_MEDIA_ALL;
-
- *media = ret;
-
- return CSS_OK;
-}
-
/**
* Add a namespace mapping
*
diff --git a/src/parse/mq.c b/src/parse/mq.c
new file mode 100644
index 0000000..5c9c7fa
--- /dev/null
+++ b/src/parse/mq.c
@@ -0,0 +1,96 @@
+/*
+ * This file is part of LibCSS.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2016 John-Mark Bell <jmb(a)netsurf-browser.org>
+ */
+
+/* https://drafts.csswg.org/mediaqueries/ */
+
+#include "parse/mq.h"
+
+css_error css__mq_parse_media_list(css_language *c,
+ const parserutils_vector *vector, int *ctx,
+ css_mq_query **media)
+{
+ css_mq_query *ret = NULL;
+ const css_token *token;
+
+ /* (IDENT ws (',' ws IDENT ws)* )? */
+
+ UNUSED(c);
+
+ token = parserutils_vector_iterate(vector, ctx);
+
+ while (token != NULL) {
+ if (token->type != CSS_TOKEN_IDENT)
+ return CSS_INVALID;
+
+#if 0
+ if (lwc_string_caseless_isequal(token->idata, c->strings[AURAL],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_AURAL;
+ } else if (lwc_string_caseless_isequal(
+ token->idata, c->strings[BRAILLE],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_BRAILLE;
+ } else if (lwc_string_caseless_isequal(
+ token->idata, c->strings[EMBOSSED],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_EMBOSSED;
+ } else if (lwc_string_caseless_isequal(
+ token->idata, c->strings[HANDHELD],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_HANDHELD;
+ } else if (lwc_string_caseless_isequal(
+ token->idata, c->strings[PRINT],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_PRINT;
+ } else if (lwc_string_caseless_isequal(
+ token->idata, c->strings[PROJECTION],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_PROJECTION;
+ } else if (lwc_string_caseless_isequal(
+ token->idata, c->strings[SCREEN],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_SCREEN;
+ } else if (lwc_string_caseless_isequal(
+ token->idata, c->strings[SPEECH],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_SPEECH;
+ } else if (lwc_string_caseless_isequal(
+ token->idata, c->strings[TTY],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_TTY;
+ } else if (lwc_string_caseless_isequal(
+ token->idata, c->strings[TV],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_TV;
+ } else if (lwc_string_caseless_isequal(
+ token->idata, c->strings[ALL],
+ &match) == lwc_error_ok && match) {
+ ret |= CSS_MEDIA_ALL;
+ } else
+ return CSS_INVALID;
+#endif
+ consumeWhitespace(vector, ctx);
+
+ token = parserutils_vector_iterate(vector, ctx);
+ if (token != NULL && tokenIsChar(token, ',') == false)
+ return CSS_INVALID;
+
+ consumeWhitespace(vector, ctx);
+ }
+
+#if 0
+ /* If, after parsing the media list, we still have no media,
+ * then it must be ALL. */
+ if (ret == 0)
+ ret = CSS_MEDIA_ALL;
+#endif
+
+ *media = ret;
+
+ return CSS_OK;
+}
+
diff --git a/src/parse/mq.h b/src/parse/mq.h
new file mode 100644
index 0000000..eeb55da
--- /dev/null
+++ b/src/parse/mq.h
@@ -0,0 +1,100 @@
+/*
+ * This file is part of LibCSS.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2016 John-Mark Bell <jmb(a)netsurf-browser.org>
+ */
+
+#ifndef css_parse_mq_h_
+#define css_parse_mq_h_
+
+#include <parserutils/utils/vector.h>
+#include "parse/language.h"
+
+typedef struct {
+ enum {
+ CSS_MQ_VALUE_TYPE_NUM,
+ CSS_MQ_VALUE_TYPE_DIM,
+ CSS_MQ_VALUE_TYPE_IDENT,
+ CSS_MQ_VALUE_TYPE_RATIO
+ } type;
+ union {
+ css_fixed num_or_ratio; /* Where ratio is the result of a/b */
+ struct {
+ css_fixed len;
+ css_unit unit;
+ } dim;
+ lwc_string *ident;
+ } data;
+} css_mq_value;
+
+/*
+ * "name : value" is encoded as "name = value"
+ * "name" is encoded by setting the operator to "bool"
+ * "name op value" is encoded verbatim (with op2 set to "unused")
+ * "value op name" inverts the operator to encode (i.e < becomes >=) (and sets op2 to "unused")
+ * "value op name op value" is encoded using op2 and value2
+ */
+typedef enum {
+ CSS_MQ_FEATURE_OP_BOOL, /* op only */
+ CSS_MQ_FEATURE_OP_UNUSED = CSS_MQ_FEATURE_OP_BOOL, /* op2 only */
+
+ CSS_MQ_FEATURE_OP_LT,
+ CSS_MQ_FEATURE_OP_LTE,
+ CSS_MQ_FEATURE_OP_EQ, /* op only */
+ CSS_MQ_FEATURE_OP_GTE,
+ CSS_MQ_FEATURE_OP_GT
+} css_mq_feature_op;
+
+typedef struct {
+ lwc_string *name;
+ css_mq_feature_op op;
+ css_mq_feature_op op2;
+ css_mq_value value;
+ css_mq_value value2;
+} css_mq_feature;
+
+typedef struct css_mq_cond_or_feature css_mq_cond_or_feature;
+
+typedef struct {
+ uint32_t nparts;
+ css_mq_cond_or_feature **parts;
+} css_mq_cond_parts;
+
+typedef struct {
+ uint32_t negate : 1, /* set if "not" */
+ op : 1; /* clear if "and", set if "or" */
+ css_mq_cond_parts *parts;
+} css_mq_cond;
+
+struct css_mq_cond_or_feature {
+ enum {
+ CSS_MQ_FEATURE,
+ CSS_MQ_COND
+ } type;
+ union {
+ css_mq_cond cond;
+ css_mq_feature feat;
+ } data;
+};
+
+typedef struct css_mq_query {
+ struct css_mq_query *next;
+
+ uint32_t negate_type : 1, /* set if "not type" */
+ cond_op : 1; /* clear if "and", set if "or" */
+ lwc_string *type; /* or NULL */
+
+ uint32_t nconds;
+ css_mq_cond **conds;
+} css_mq_query;
+
+css_error css__mq_parse_media_list(css_language *c,
+ const parserutils_vector *vector, int *ctx,
+ css_mq_query **media);
+
+/** \todo is this necessary? */
+css_mq_query *css__mq_query_ref(css_mq_query *media);
+css_mq_query *css__mq_query_unref(css_mq_query *media);
+
+#endif
diff --git a/src/stylesheet.c b/src/stylesheet.c
index 0a281e7..63f958b 100644
--- a/src/stylesheet.c
+++ b/src/stylesheet.c
@@ -377,8 +377,6 @@ css_error css_stylesheet_data_done(css_stylesheet *sheet)
* \param parent Parent stylesheet
* \param url Pointer to object to be populated with details of URL of
* imported stylesheet (potentially relative)
- * \param media Pointer to location to receive applicable media types for
- * imported sheet,
* \return CSS_OK on success,
* CSS_INVALID if there are no pending imports remaining
*
@@ -396,11 +394,11 @@ css_error css_stylesheet_data_done(css_stylesheet *sheet)
* register an empty stylesheet with the parent in its place.
*/
css_error css_stylesheet_next_pending_import(css_stylesheet *parent,
- lwc_string **url, uint64_t *media)
+ lwc_string **url)
{
const css_rule *r;
- if (parent == NULL || url == NULL || media == NULL)
+ if (parent == NULL || url == NULL)
return CSS_BADPARM;
for (r = parent->rule_list; r != NULL; r = r->next) {
@@ -413,7 +411,6 @@ css_error css_stylesheet_next_pending_import(css_stylesheet *parent,
if (r->type == CSS_RULE_IMPORT && i->sheet == NULL) {
*url = lwc_string_ref(i->url);
- *media = i->media;
return CSS_OK;
}
@@ -1326,7 +1323,7 @@ css_error css__stylesheet_rule_set_charset(css_stylesheet *sheet,
*/
css_error css__stylesheet_rule_set_nascent_import(css_stylesheet *sheet,
css_rule *rule, lwc_string *url,
- uint64_t media)
+ css_mq_query *media)
{
css_rule_import *r = (css_rule_import *) rule;
@@ -1338,7 +1335,7 @@ css_error css__stylesheet_rule_set_nascent_import(css_stylesheet *sheet,
/* Set the rule's sheet field */
r->url = lwc_string_ref(url);
- r->media = media;
+ r->media = css__mq_query_ref(media);
return CSS_OK;
}
@@ -1352,7 +1349,7 @@ css_error css__stylesheet_rule_set_nascent_import(css_stylesheet *sheet,
* \return CSS_OK on success, appropriate error otherwise
*/
css_error css__stylesheet_rule_set_media(css_stylesheet *sheet,
- css_rule *rule, uint64_t media)
+ css_rule *rule, css_mq_query *media)
{
css_rule_media *r = (css_rule_media *) rule;
@@ -1363,7 +1360,7 @@ css_error css__stylesheet_rule_set_media(css_stylesheet *sheet,
assert(rule->type == CSS_RULE_MEDIA);
/* Set the rule's media */
- r->media = media;
+ r->media = css__mq_query_ref(media);
return CSS_OK;
}
diff --git a/src/stylesheet.h b/src/stylesheet.h
index a2b3fd5..838b228 100644
--- a/src/stylesheet.h
+++ b/src/stylesheet.h
@@ -20,6 +20,7 @@
#include "bytecode/bytecode.h"
#include "parse/parse.h"
+#include "parse/mq.h"
#include "select/hash.h"
typedef struct css_rule css_rule;
@@ -132,7 +133,7 @@ typedef struct css_rule_selector {
typedef struct css_rule_media {
css_rule base;
- uint64_t media;
+ css_mq_query *media;
css_rule *first_child;
css_rule *last_child;
@@ -155,7 +156,7 @@ typedef struct css_rule_import {
css_rule base;
lwc_string *url;
- uint64_t media;
+ css_mq_query *media;
css_stylesheet *sheet;
} css_rule_import;
@@ -268,10 +269,10 @@ css_error css__stylesheet_rule_set_charset(css_stylesheet *sheet,
css_rule *rule, lwc_string *charset);
css_error css__stylesheet_rule_set_nascent_import(css_stylesheet *sheet,
- css_rule *rule, lwc_string *url, uint64_t media);
+ css_rule *rule, lwc_string *url, css_mq_query *media);
css_error css__stylesheet_rule_set_media(css_stylesheet *sheet,
- css_rule *rule, uint64_t media);
+ css_rule *rule, css_mq_query *media);
css_error css__stylesheet_rule_set_page_selector(css_stylesheet *sheet,
css_rule *rule, css_selector *sel);
-----------------------------------------------------------------------
--
Cascading Style Sheets library
6 years, 2 months
netsurf: branch dsilvers/eventtarget created. release/3.6-5-gbf80b18
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/bf80b18929da2dc3beb36...
...commit http://git.netsurf-browser.org/netsurf.git/commit/bf80b18929da2dc3beb36aa...
...tree http://git.netsurf-browser.org/netsurf.git/tree/bf80b18929da2dc3beb36aa96...
The branch, dsilvers/eventtarget has been created
at bf80b18929da2dc3beb36aa96a6cea645e4088ef (commit)
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=bf80b18929da2dc3beb...
commit bf80b18929da2dc3beb36aa96a6cea645e4088ef
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Early bits for event targets, nowhere near ready yet
diff --git a/content/handlers/javascript/duktape/EventTarget.bnd b/content/handlers/javascript/duktape/EventTarget.bnd
new file mode 100644
index 0000000..a53e71d
--- /dev/null
+++ b/content/handlers/javascript/duktape/EventTarget.bnd
@@ -0,0 +1,123 @@
+/* Event Target binding for browser using duktape and libdom
+ *
+ * Copyright 2016 Daniel Silverstone <dsilvers(a)digital-scurf.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * Released under the terms of the MIT License,
+ * http://www.opensource.org/licenses/mit-license
+ */
+
+class EventTarget {
+ private bool is_node;
+};
+
+prologue EventTarget()
+%{
+#define EVENT_LISTENER_JS_MAGIC MAGIC(EVENT_LISTENER_JS_MAP)
+
+static void event_target_push_listeners(duk_context *ctx) {
+ /* ... (this=EventTarget) */
+ duk_push_this(ctx);
+ /* ... this */
+ duk_get_prop_string(ctx, -1, EVENT_LISTENER_JS_MAGIC);
+ if (duk_is_null(ctx, -1)) {
+ /* ... this null */
+ duk_pop(ctx);
+ duk_push_object(ctx);
+ duk_dup(ctx, -1);
+ /* ... this listeners listeners */
+ duk_put_prop_string(ctx, -3, EVENT_LISTENER_JS_MAGIC);
+ /* ... this listeners */
+ }
+ /* ... this listeners */
+ duk_insert(ctx, -2);
+ /* ... listeners this */
+ duk_pop(ctx);
+ /* ... listeners */
+}
+
+%}
+
+init EventTarget()
+%{
+ priv->is_node = false;
+%}
+
+method EventTarget::addEventListener()
+%{
+ dom_exception exc;
+ /* Incoming stack is: type callback [options] */
+ if (duk_get_top(ctx) < 2) return 0; /* Bad arguments */
+ if (duk_get_top(ctx) > 3) return 0; /* Bad arguments */
+ if (duk_get_top(ctx) == 2) {
+ duk_push_object(ctx);
+ /* type callback options */
+ }
+ if (duk_get_type(ctx, -1) != DUK_TYPE_OBJECT) {
+ /* legacy support, if not object, it's the capture value */
+ duk_push_object(ctx);
+ /* ... capture options */
+ duk_insert(ctx, -2);
+ /* ... options capture */
+ duk_put_prop_string(ctx, -2, "capture");
+ /* ... options */
+ }
+ /* type callback options */
+ event_target_push_listeners(ctx);
+ /* type callback options listeners */
+ return 0;
+%}
+
+method EventTarget::removeEventListener()
+%{
+ dom_exception exc;
+ return 0;
+%}
+
+
+
+method EventTarget::dispatchEvent()
+%{
+ dom_exception exc;
+ if (!dukky_instanceof(ctx, 0, PROTO_NAME(EVENT))) return 0;
+
+ duk_get_prop_string(ctx, 0, PRIVATE_MAGIC);
+ event_private_t *evpriv = duk_get_pointer(ctx, -1);
+ duk_pop(ctx);
+
+ dom_event *evt = evpriv->evt;
+
+ /* Dispatch event logic, see:
+ * https://dom.spec.whatwg.org/#dom-eventtarget-dispatchevent
+ */
+ bool in_dispatch;
+ if (dom_event_in_dispatch(evt, &in_dispatch) != DOM_NO_ERR) return 0;
+ if (in_dispatch) {
+ /** \todo Raise InvalidStateException */
+ return 0;
+ }
+
+ bool is_initialised;
+ if (dom_event_is_initialised(evt, &is_initialised) != DOM_NO_ERR) return 0;
+ if (is_initialised == false) {
+ /** \todo Raise InvalidStateException */
+ return 0;
+ }
+
+ if (dom_event_set_is_trusted(evt, false) != DOM_NO_ERR) return 0;
+
+ /** \todo work out how to dispatch against non-node things */
+ if (priv->is_node == false) return 0;
+
+ bool success;
+ /* Event prepared, dispatch against ourselves */
+ exc = dom_event_target_dispatch_event(
+ ((node_private_t *)priv)->node,
+ evt,
+ &success);
+ if (exc != DOM_NO_ERR) return 0; /**< \todo raise correct exception */
+
+ duk_push_boolean(ctx, success);
+ return 1;
+%}
diff --git a/content/handlers/javascript/duktape/Node.bnd b/content/handlers/javascript/duktape/Node.bnd
index f237c87..f14cfc1 100644
--- a/content/handlers/javascript/duktape/Node.bnd
+++ b/content/handlers/javascript/duktape/Node.bnd
@@ -16,6 +16,7 @@ init Node(struct dom_node *node)
%{
priv->node = node;
dom_node_ref(node);
+ priv->parent.is_node = true;
%}
fini Node()
diff --git a/content/handlers/javascript/duktape/netsurf.bnd b/content/handlers/javascript/duktape/netsurf.bnd
index 4aca475..2a56ccc 100644
--- a/content/handlers/javascript/duktape/netsurf.bnd
+++ b/content/handlers/javascript/duktape/netsurf.bnd
@@ -54,6 +54,7 @@ struct dom_html_br_element;
};
+#include "EventTarget.bnd"
#include "Console.bnd"
#include "Window.bnd"
#include "Document.bnd"
-----------------------------------------------------------------------
--
NetSurf Browser
6 years, 2 months
netsurf-website: branch master updated. 1dd69a3729b6f3dcf00f589ca9aa33d7ec95ea3f
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-website.git/shortlog/1dd69a3729b6f...
...commit http://git.netsurf-browser.org/netsurf-website.git/commit/1dd69a3729b6f3d...
...tree http://git.netsurf-browser.org/netsurf-website.git/tree/1dd69a3729b6f3dcf...
The branch, master has been updated
via 1dd69a3729b6f3dcf00f589ca9aa33d7ec95ea3f (commit)
from ca8f324d9455ea37d2ced0f67aaa9e39fb2dac18 (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-website.git/commit/?id=1dd69a3729b...
commit 1dd69a3729b6f3dcf00f589ca9aa33d7ec95ea3f
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Update for NetSurf 3.6 release.
diff --git a/about/index.html b/about/index.html
index 411d4c1..664334e 100644
--- a/about/index.html
+++ b/about/index.html
@@ -139,6 +139,7 @@
<tr><th>Aug 2015</th><td>Changed JavaScript engine to Duktape</td></tr>
<tr><th>Feb 2016</th><td>NetSurf 3.4 released</td></tr>
<tr><th>Apr 2016</th><td>NetSurf 3.5 released</td></tr>
+<tr><th>Nov 2016</th><td>NetSurf 3.6 released</td></tr>
</table>
<div class="frontscreen"><p class="frontscreen"><a href="screenshots/images/riscos-wikipedia.png"><img src="screenshots/images/riscosthumb-wikipedia.png" alt="GTK NetSurf screenshot."></a> <span>A more recent NetSurf showing <em>Wikipedia</em>.</span></p></div>
diff --git a/about/news.html b/about/news.html
index 01fbf01..80a0900 100644
--- a/about/news.html
+++ b/about/news.html
@@ -58,6 +58,8 @@
<h1>News</h1>
<dl class="news">
+<dt><a href="/downloads/">NetSurf 3.6 released</a> <span>20 Nov 2016</span></dt>
+<dd>NetSurf 3.6 is primarily a bugfix release. It contains several fixes and clean-ups to front end code, as well as supercookie blocking, and certificate chain handling improvements. We recommend all users upgrade to NetSurf 3.6.</dd>
<dt><a href="/downloads/">NetSurf 3.5 released</a> <span>14 Apr 2016</span></dt>
<dd>NetSurf 3.5 is primarily a bugfix release. It contains several fixes and clean-ups to front end code, as well as an improvement to URL parsing. We recommend all users upgrade to NetSurf 3.5.</dd>
<dt><a href="/downloads/">NetSurf 3.4 released</a> <span>17 Feb 2016</span></dt>
diff --git a/downloads/amiga/index.html b/downloads/amiga/index.html
index 8808185..41426bf 100644
--- a/downloads/amiga/index.html
+++ b/downloads/amiga/index.html
@@ -63,7 +63,7 @@
<div class="downloadlatestouter">
<div class="downloadlatest">
<div class="downloadlatestbox">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/amiga/nets..."><span>NetSurf 3.5 for AmigaOS</span> <span>(6.2MB)</span> <span class="downloaddate">14 Apr 2016</span></a></p>
+<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/amiga/nets..."><span>NetSurf 3.6 for AmigaOS</span> <span>(6.2MB)</span> <span class="downloaddate">19 Nov 2016</span></a></p>
<!--<p class="downloadinstructions"><a href="/documentation/roinfo#GettingStartedInstallation">Installation instructions</a></p>-->
<p class="preul">Requires:</p>
<ul>
@@ -72,7 +72,7 @@
</div>
<div class="downloadlatestbox downloadlast">
-<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.5-s..."><span>NetSurf 3.5 source code</span> <span>(3.9MB)</span> <span class="downloaddate">14 Apr 2016</span></a></p>
+<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.6-s..."><span>NetSurf 3.6 source code</span> <span>(3.9MB)</span> <span class="downloaddate">19 Nov 2016</span></a></p>
<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
<p class="preul">Build NetSurf for:</p>
<ul>
@@ -90,11 +90,18 @@
<h2>Previous releases</h2>
<dl>
+<dt>NetSurf 3.5</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/amiga/nets...">NetSurf 3.5 browser for AmigaOS 4</a> (14 Apr 2016)</li>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.5-s...">NetSurf 3.5 source code</a> (14 Apr 2016)</li>
+</ul>
+</dd>
<dt>NetSurf 3.3</dt>
<dd>
<ul>
-<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/amiga/nets...">NetSurf 3.3 browser for AmigaOS 4</a> (16 Feb 2016)</li>
-<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.3-s...">NetSurf 3.3 source code</a> (16 Feb 2016)</li>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/amiga/nets...">NetSurf 3.3 browser for AmigaOS 4</a> (26 Jun 2015)</li>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.3-s...">NetSurf 3.3 source code</a> (26 Jun 2015)</li>
</ul>
</dd>
<dt>NetSurf 3.2</dt>
diff --git a/downloads/gtk/index.html b/downloads/gtk/index.html
index 2aa5ebe..f3e7698 100644
--- a/downloads/gtk/index.html
+++ b/downloads/gtk/index.html
@@ -65,7 +65,7 @@
<div class="downloadlatestouter">
<div class="downloadlatest">
<div class="downloadlatestbox downloadlast">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.5 source code</span> <span>(3.9MB)</span> <span class="downloaddate">14 Apr 2016</span></a></p>
+<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.6 source code</span> <span>(3.9MB)</span> <span class="downloaddate">19 Nov 2016</span></a></p>
<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
<p class="preul">Build NetSurf for:</p>
<ul>
@@ -124,7 +124,13 @@
<h2>Previous releases</h2>
<dl>
-<dt>NetSurf 3.3</dt>
+<dt>NetSurf 3.5</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.5-s...">NetSurf 3.5 source code</a> (14 Apr 2016)</li>
+</ul>
+</dd>
+<dt>NetSurf 3.4</dt>
<dd>
<ul>
<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.4-s...">NetSurf 3.4 source code</a> (16 Feb 2016)</li>
diff --git a/downloads/riscos/index.html b/downloads/riscos/index.html
index 0f3f0dc..89d0cdf 100644
--- a/downloads/riscos/index.html
+++ b/downloads/riscos/index.html
@@ -63,7 +63,7 @@
<div class="downloadlatestouter">
<div class="downloadlatest">
<div class="downloadlatestbox">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/riscos/net..."><span>NetSurf 3.5 for RISC OS</span> <span>(3.7MB)</span> <span class="downloaddate">14 Apr 2016</span></a></p>
+<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/riscos/net..."><span>NetSurf 3.6 for RISC OS</span> <span>(3.7MB)</span> <span class="downloaddate">19 Nov 2016</span></a></p>
<p class="downloadinstructions"><a href="/documentation/roinfo#GettingStartedInstallation">Installation instructions</a></p>
<p class="preul">Binary download includes:</p>
<ul>
@@ -81,7 +81,7 @@
</div>
<div class="downloadlatestbox downloadlast">
-<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.5-s..."><span>NetSurf 3.5 source code</span> <span>(3.9MB)</span> <span class="downloaddate">14 Apr 2016</span></a></p>
+<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.6-s..."><span>NetSurf 3.6 source code</span> <span>(3.9MB)</span> <span class="downloaddate">19 Nov 2016</span></a></p>
<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
<p class="preul">Build NetSurf for:</p>
<ul>
@@ -100,6 +100,13 @@
<h2>Previous releases</h2>
<dl>
+<dt>NetSurf 3.5</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/riscos/net...">NetSurf 3.5 browser for RISC OS</a> (14 Apr 2016)</li>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.5-s...">NetSurf 3.5 source code</a> (14 Apr 2016)</li>
+</ul>
+</dd>
<dt>NetSurf 3.4</dt>
<dd>
<ul>
diff --git a/downloads/source/index.html b/downloads/source/index.html
index ad99634..c9ced74 100644
--- a/downloads/source/index.html
+++ b/downloads/source/index.html
@@ -56,6 +56,7 @@
<p>The source code for each release version of NetSurf is available.</p>
<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-...">NetSurf 3.6 source code</a> (19 Nov 2016)</li>
<li><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-...">NetSurf 3.5 source code</a> (14 Apr 2016)</li>
<li><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-...">NetSurf 3.4 source code</a> (16 Feb 2016)</li>
<li><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-...">NetSurf 3.3 source code</a> (15 Mar 2015)</li>
diff --git a/index.html b/index.html
index 20881f1..8c514cd 100644
--- a/index.html
+++ b/index.html
@@ -128,7 +128,7 @@
<div class="downloadbox">
<div class="downloadcontainer">
<div class="downloadcontent">
-<h2 id="downloadrelease"><a href="/downloads/">Download NetSurf 3.5</a></h2>
+<h2 id="downloadrelease"><a href="/downloads/">Download NetSurf 3.6</a></h2>
<ul>
<li><a href="/downloads/riscos/">For RISC OS</a></li>
<li><a href="/downloads/gtk/">For Linux</a></li>
@@ -147,18 +147,18 @@
<h2 id="news">Latest news</h2>
<dl class="frontnews">
+<dt><a href="/downloads/">NetSurf 3.6 released</a> <span>19 Nov 2016</span></dt>
+<dd>NetSurf 3.6 is primarily a bugfix release. It contains several fixes and clean-ups to front end code, as well as supercookie blocking, and certificate chain handling improvements. We recommend all users upgrade to NetSurf 3.6.</dd>
<dt><a href="/downloads/">NetSurf 3.5 released</a> <span>14 Apr 2016</span></dt>
<dd>NetSurf 3.5 is primarily a bugfix release. It contains several fixes and clean-ups to front end code, as well as an improvement to URL parsing. We recommend all users upgrade to NetSurf 3.5.</dd>
<dt><a href="/downloads/">NetSurf 3.4 released</a> <span>17 Feb 2016</span></dt>
<dd>NetSurf 3.4 features many optimisations to improve performance over previous releases. It also contains many bug fixes, including improvements to page layout. This is also the first release to contain the <a href="http://duktape.org/">Duktape</a> JavaScript engine. While our JavaScript bindings have seen a lot of development for this release, JavaScript remains disabled by default as the support is incomplete. We recommend all users upgrade to NetSurf 3.4.</dd>
-<dt><a href="https://listmaster.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.o...">Codethink sponsored development</a> <span>12 Feb 2016</span></dt>
-<dd>Over the last couple of weeks Michael has been able to work full time on NetSurf, and more particularly, its LibDOM and LibCSS components. At <a href="http://www.codethink.co.uk/">Codethink</a> there is an arrangement whereby engineers may fill time between projects by making contributions to certain open source projects. A <a href="https://listmaster.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.o...">write-up of the work done</a> has been posted to our mailing list. Thanks Codethink!</dd>
</dl>
<p class="more"><a href="/about/news" class="seemore">See more news</a></p>
-<h2 id="features">NetSurf 3.5 features</h2>
+<h2 id="features">NetSurf 3.6 features</h2>
-<p>NetSurf 3.5 is available for: RISC OS; Linux and other UNIX-like systems; AmigaOS 4; and more.</p>
+<p>NetSurf 3.6 is available for: RISC OS; Linux and other UNIX-like systems; AmigaOS 4; and more.</p>
<dl>
<dt>General</dt>
-----------------------------------------------------------------------
Summary of changes:
about/index.html | 1 +
about/news.html | 2 ++
downloads/amiga/index.html | 15 +++++++++++----
downloads/gtk/index.html | 10 ++++++++--
downloads/riscos/index.html | 11 +++++++++--
downloads/source/index.html | 1 +
index.html | 10 +++++-----
7 files changed, 37 insertions(+), 13 deletions(-)
diff --git a/about/index.html b/about/index.html
index 411d4c1..664334e 100644
--- a/about/index.html
+++ b/about/index.html
@@ -139,6 +139,7 @@
<tr><th>Aug 2015</th><td>Changed JavaScript engine to Duktape</td></tr>
<tr><th>Feb 2016</th><td>NetSurf 3.4 released</td></tr>
<tr><th>Apr 2016</th><td>NetSurf 3.5 released</td></tr>
+<tr><th>Nov 2016</th><td>NetSurf 3.6 released</td></tr>
</table>
<div class="frontscreen"><p class="frontscreen"><a href="screenshots/images/riscos-wikipedia.png"><img src="screenshots/images/riscosthumb-wikipedia.png" alt="GTK NetSurf screenshot."></a> <span>A more recent NetSurf showing <em>Wikipedia</em>.</span></p></div>
diff --git a/about/news.html b/about/news.html
index 01fbf01..80a0900 100644
--- a/about/news.html
+++ b/about/news.html
@@ -58,6 +58,8 @@
<h1>News</h1>
<dl class="news">
+<dt><a href="/downloads/">NetSurf 3.6 released</a> <span>20 Nov 2016</span></dt>
+<dd>NetSurf 3.6 is primarily a bugfix release. It contains several fixes and clean-ups to front end code, as well as supercookie blocking, and certificate chain handling improvements. We recommend all users upgrade to NetSurf 3.6.</dd>
<dt><a href="/downloads/">NetSurf 3.5 released</a> <span>14 Apr 2016</span></dt>
<dd>NetSurf 3.5 is primarily a bugfix release. It contains several fixes and clean-ups to front end code, as well as an improvement to URL parsing. We recommend all users upgrade to NetSurf 3.5.</dd>
<dt><a href="/downloads/">NetSurf 3.4 released</a> <span>17 Feb 2016</span></dt>
diff --git a/downloads/amiga/index.html b/downloads/amiga/index.html
index 8808185..41426bf 100644
--- a/downloads/amiga/index.html
+++ b/downloads/amiga/index.html
@@ -63,7 +63,7 @@
<div class="downloadlatestouter">
<div class="downloadlatest">
<div class="downloadlatestbox">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/amiga/nets..."><span>NetSurf 3.5 for AmigaOS</span> <span>(6.2MB)</span> <span class="downloaddate">14 Apr 2016</span></a></p>
+<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/amiga/nets..."><span>NetSurf 3.6 for AmigaOS</span> <span>(6.2MB)</span> <span class="downloaddate">19 Nov 2016</span></a></p>
<!--<p class="downloadinstructions"><a href="/documentation/roinfo#GettingStartedInstallation">Installation instructions</a></p>-->
<p class="preul">Requires:</p>
<ul>
@@ -72,7 +72,7 @@
</div>
<div class="downloadlatestbox downloadlast">
-<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.5-s..."><span>NetSurf 3.5 source code</span> <span>(3.9MB)</span> <span class="downloaddate">14 Apr 2016</span></a></p>
+<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.6-s..."><span>NetSurf 3.6 source code</span> <span>(3.9MB)</span> <span class="downloaddate">19 Nov 2016</span></a></p>
<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
<p class="preul">Build NetSurf for:</p>
<ul>
@@ -90,11 +90,18 @@
<h2>Previous releases</h2>
<dl>
+<dt>NetSurf 3.5</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/amiga/nets...">NetSurf 3.5 browser for AmigaOS 4</a> (14 Apr 2016)</li>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.5-s...">NetSurf 3.5 source code</a> (14 Apr 2016)</li>
+</ul>
+</dd>
<dt>NetSurf 3.3</dt>
<dd>
<ul>
-<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/amiga/nets...">NetSurf 3.3 browser for AmigaOS 4</a> (16 Feb 2016)</li>
-<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.3-s...">NetSurf 3.3 source code</a> (16 Feb 2016)</li>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/amiga/nets...">NetSurf 3.3 browser for AmigaOS 4</a> (26 Jun 2015)</li>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.3-s...">NetSurf 3.3 source code</a> (26 Jun 2015)</li>
</ul>
</dd>
<dt>NetSurf 3.2</dt>
diff --git a/downloads/gtk/index.html b/downloads/gtk/index.html
index 2aa5ebe..f3e7698 100644
--- a/downloads/gtk/index.html
+++ b/downloads/gtk/index.html
@@ -65,7 +65,7 @@
<div class="downloadlatestouter">
<div class="downloadlatest">
<div class="downloadlatestbox downloadlast">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.5 source code</span> <span>(3.9MB)</span> <span class="downloaddate">14 Apr 2016</span></a></p>
+<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-..."><span>NetSurf 3.6 source code</span> <span>(3.9MB)</span> <span class="downloaddate">19 Nov 2016</span></a></p>
<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
<p class="preul">Build NetSurf for:</p>
<ul>
@@ -124,7 +124,13 @@
<h2>Previous releases</h2>
<dl>
-<dt>NetSurf 3.3</dt>
+<dt>NetSurf 3.5</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.5-s...">NetSurf 3.5 source code</a> (14 Apr 2016)</li>
+</ul>
+</dd>
+<dt>NetSurf 3.4</dt>
<dd>
<ul>
<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.4-s...">NetSurf 3.4 source code</a> (16 Feb 2016)</li>
diff --git a/downloads/riscos/index.html b/downloads/riscos/index.html
index 0f3f0dc..89d0cdf 100644
--- a/downloads/riscos/index.html
+++ b/downloads/riscos/index.html
@@ -63,7 +63,7 @@
<div class="downloadlatestouter">
<div class="downloadlatest">
<div class="downloadlatestbox">
-<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/riscos/net..."><span>NetSurf 3.5 for RISC OS</span> <span>(3.7MB)</span> <span class="downloaddate">14 Apr 2016</span></a></p>
+<p class="downloadmain downloadfirst"><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/riscos/net..."><span>NetSurf 3.6 for RISC OS</span> <span>(3.7MB)</span> <span class="downloaddate">19 Nov 2016</span></a></p>
<p class="downloadinstructions"><a href="/documentation/roinfo#GettingStartedInstallation">Installation instructions</a></p>
<p class="preul">Binary download includes:</p>
<ul>
@@ -81,7 +81,7 @@
</div>
<div class="downloadlatestbox downloadlast">
-<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.5-s..."><span>NetSurf 3.5 source code</span> <span>(3.9MB)</span> <span class="downloaddate">14 Apr 2016</span></a></p>
+<p class="downloadmain"><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.6-s..."><span>NetSurf 3.6 source code</span> <span>(3.9MB)</span> <span class="downloaddate">19 Nov 2016</span></a></p>
<p class="downloadinstructions"><a href="/downloads/source/#BuildInstructions">Build instructions</a></p>
<p class="preul">Build NetSurf for:</p>
<ul>
@@ -100,6 +100,13 @@
<h2>Previous releases</h2>
<dl>
+<dt>NetSurf 3.5</dt>
+<dd>
+<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/pre-built/riscos/net...">NetSurf 3.5 browser for RISC OS</a> (14 Apr 2016)</li>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-3.5-s...">NetSurf 3.5 source code</a> (14 Apr 2016)</li>
+</ul>
+</dd>
<dt>NetSurf 3.4</dt>
<dd>
<ul>
diff --git a/downloads/source/index.html b/downloads/source/index.html
index ad99634..c9ced74 100644
--- a/downloads/source/index.html
+++ b/downloads/source/index.html
@@ -56,6 +56,7 @@
<p>The source code for each release version of NetSurf is available.</p>
<ul>
+<li><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-...">NetSurf 3.6 source code</a> (19 Nov 2016)</li>
<li><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-...">NetSurf 3.5 source code</a> (14 Apr 2016)</li>
<li><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-...">NetSurf 3.4 source code</a> (16 Feb 2016)</li>
<li><a href="http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-...">NetSurf 3.3 source code</a> (15 Mar 2015)</li>
diff --git a/index.html b/index.html
index 20881f1..8c514cd 100644
--- a/index.html
+++ b/index.html
@@ -128,7 +128,7 @@
<div class="downloadbox">
<div class="downloadcontainer">
<div class="downloadcontent">
-<h2 id="downloadrelease"><a href="/downloads/">Download NetSurf 3.5</a></h2>
+<h2 id="downloadrelease"><a href="/downloads/">Download NetSurf 3.6</a></h2>
<ul>
<li><a href="/downloads/riscos/">For RISC OS</a></li>
<li><a href="/downloads/gtk/">For Linux</a></li>
@@ -147,18 +147,18 @@
<h2 id="news">Latest news</h2>
<dl class="frontnews">
+<dt><a href="/downloads/">NetSurf 3.6 released</a> <span>19 Nov 2016</span></dt>
+<dd>NetSurf 3.6 is primarily a bugfix release. It contains several fixes and clean-ups to front end code, as well as supercookie blocking, and certificate chain handling improvements. We recommend all users upgrade to NetSurf 3.6.</dd>
<dt><a href="/downloads/">NetSurf 3.5 released</a> <span>14 Apr 2016</span></dt>
<dd>NetSurf 3.5 is primarily a bugfix release. It contains several fixes and clean-ups to front end code, as well as an improvement to URL parsing. We recommend all users upgrade to NetSurf 3.5.</dd>
<dt><a href="/downloads/">NetSurf 3.4 released</a> <span>17 Feb 2016</span></dt>
<dd>NetSurf 3.4 features many optimisations to improve performance over previous releases. It also contains many bug fixes, including improvements to page layout. This is also the first release to contain the <a href="http://duktape.org/">Duktape</a> JavaScript engine. While our JavaScript bindings have seen a lot of development for this release, JavaScript remains disabled by default as the support is incomplete. We recommend all users upgrade to NetSurf 3.4.</dd>
-<dt><a href="https://listmaster.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.o...">Codethink sponsored development</a> <span>12 Feb 2016</span></dt>
-<dd>Over the last couple of weeks Michael has been able to work full time on NetSurf, and more particularly, its LibDOM and LibCSS components. At <a href="http://www.codethink.co.uk/">Codethink</a> there is an arrangement whereby engineers may fill time between projects by making contributions to certain open source projects. A <a href="https://listmaster.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.o...">write-up of the work done</a> has been posted to our mailing list. Thanks Codethink!</dd>
</dl>
<p class="more"><a href="/about/news" class="seemore">See more news</a></p>
-<h2 id="features">NetSurf 3.5 features</h2>
+<h2 id="features">NetSurf 3.6 features</h2>
-<p>NetSurf 3.5 is available for: RISC OS; Linux and other UNIX-like systems; AmigaOS 4; and more.</p>
+<p>NetSurf 3.6 is available for: RISC OS; Linux and other UNIX-like systems; AmigaOS 4; and more.</p>
<dl>
<dt>General</dt>
--
NetSurf website source for *.netsurf-browser.org
6 years, 2 months