Michael Drake
e1a3e0427f
HTML handler: Reformat passing viewport height when triggered by object.
...
Previously we correctly used the viewport width, but we were using the
document height instead of viewport height when an HTML child content
triggered a reformat of the parent HTML document.
2019-02-17 09:06:58 +00:00
Michael Drake
07242c7415
Content: Make the content structure aware of viewport height.
...
It was always aware of viewport width, but since adding support for
vh CSS units, the HTML content handler also needs viewport height.
Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
2019-02-17 09:06:58 +00:00
Michael Drake
776b0242a6
Layout: Add debug logging to show viewport dimensions passed into layout.
...
Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
2019-02-17 09:06:58 +00:00
Michael Drake
0a3a40c23e
Box construction: Don't handle IMAGE specially.
2018-12-13 12:31:38 +00:00
Vincent Sanders
7264ff6f4d
ensure url buffer is sufficient to not truncate output
2018-11-06 21:58:53 +00:00
Vincent Sanders
5b235b5195
fix logging level in duktape binding
2018-11-06 21:54:03 +00:00
Daniel Silverstone
44082f9988
Slightly nicer handling of js_exec() and errors
2018-11-04 09:56:41 +00:00
Vincent Sanders
e275b3175b
check dom call return and improve handling of missing form type
2018-10-09 17:00:22 +01:00
Vincent Sanders
7a61c95724
rewrite form_successful_controls_dom as form_dom_to_data
...
Trying to reason about error propagation and resource leakage within
the form submission code was impossible because of the
form_successful_controls_dom function.
This function was over six hundred lines long, had twenty six top
level local variables and six levels of indent in places.
This commit splits it out into thirteen shorter and more obvious
functions. The resulting operation is identical except errors are
properly propagated (all failures were reported as out of memory)
and resource management can be reasoned about.
The compiler appears to inline the entirety of the code from
form_submit() down excepting a handful of leaf functions. This
results in similar code output size as previous implementation.
The new implementation has a greater number of variables passed to sub
functions than desirable because multiple character sets are required
to encode names and values in the multipart data list. However as
noted the compiler effectively inlines all these functions so this
does not actually become a major problem.
2018-09-29 16:59:34 +01:00
Vincent Sanders
a268252629
gcc on openbsd is unable to reason about res variable usage and generates bogus warning
2018-09-26 21:32:35 +01:00
Vincent Sanders
5c96acd6f1
fix url encoding to be compatible with nsurl API changes.
...
As part of this fix the form submission error handling and
reporting has been improved.
2018-09-26 17:21:48 +01:00
Vincent Sanders
e4537cb37e
allow comments to supress implicit fallthrough warnings
2018-09-07 12:53:51 +01:00
Michael Drake
9d8f37ca10
HTML: Don't try to finish an HTML document's conversion twice.
2018-08-27 20:47:37 +01:00
Vincent Sanders
eee67a65e8
remove warning by replacing sprintf snprintf
2018-08-24 11:49:56 +01:00
Vincent Sanders
5dd5d5da4b
remove warning by replacing strcpy with safer strncpy
2018-08-24 10:26:26 +01:00
Vincent Sanders
5f1defd4a7
fix size_t format specifiers
2018-08-18 23:44:15 +01:00
Michael Drake
5e97a3cb26
API: Don't expose urldb_{g|s}et_auth_details to frontends.
2018-08-15 07:29:58 +01:00
Michael Drake
9fa6c1e0fb
Text handling: Display application/json, rather than offering download.
2018-08-14 16:15:12 +01:00
Vincent Sanders
92424b6946
refactor llcache header processing
...
refactor the header processing in the low level object cache to make
cache control header processing more explicit.
2018-08-12 12:50:57 +01:00
Michael Drake
0601b7dbec
Duktape: Make declaration match definition for memcmp and double_div.
2018-08-10 12:30:48 +01:00
Michael Drake
80e8c74a69
Duktape: Make declaration match definition for duk_refzero_check_fast()
2018-08-10 11:30:17 +01:00
Michael Drake
ad0a75af8f
Duktape: Make declarations match definitions for fastint-enabled functions.
2018-08-10 11:29:39 +01:00
Michael Drake
e5f2ea9d7a
Duktape: Make declarations match definitions for duk_raw_read_xxx_be
2018-08-10 11:28:27 +01:00
Michael Drake
c986c212bf
Duktape: Make declarations match definitions for inline functions.
2018-08-10 11:27:56 +01:00
Michael Drake
f5f2ebb37a
Duktape: Prevent clang static analysis.
2018-08-10 11:12:20 +01:00
Michael Drake
ae126cfdd5
Duktape: Update to version 2.3.0 release.
2018-08-10 11:11:08 +01:00
Michael Drake
97f9e2d9f5
Curl fetcher: Jiggle logging levels.
2018-08-09 16:43:37 +01:00
Michael Drake
9fecbc6554
Content: Log URLs with nsurl_access_log().
...
This reduces the log file size for startup and a single visit
to https://www.bbc.co.uk/news from 266133 to 178777 bytes,
by not dumping big data URLs over and over into the log.
2018-08-09 16:31:16 +01:00
Michael Drake
ca0514ea92
Curl fetcher: Move poll logging from INFO to DEEPDEBUG.
2018-08-09 14:58:49 +01:00
Michael Drake
09b015bf11
Browser: Rename function to access bw URL.
2018-07-23 10:47:26 +01:00
Michael Drake
62e3ee6c7e
Layout: Use box helper for first child checks.
2018-06-29 15:03:47 +01:00
Michael Drake
049695fa07
Box: Add helper to check if box is first child.
2018-06-29 15:03:10 +01:00
Michael Drake
948207472a
Layout: Tidy condition so it can be read.
2018-06-29 14:58:32 +01:00
Michael Drake
8a931f01b9
Plotters: Expose array of font family strings to front ends.
2018-05-23 14:02:53 +01:00
Michael Drake
8332bf6b2a
Plotters: Remove width param from path plotter.
...
We now use the stroke_width in the plot_style.
2018-05-23 13:48:17 +01:00
Michael Drake
66493421e6
Plotters: Change stroke width in the plot_style_t to fixed point.
2018-05-23 13:04:19 +01:00
Michael Drake
a58d97a41a
Plotters: Add plot_style_fixed type, and use for font size.
2018-05-23 11:48:35 +01:00
Vincent Sanders
216fb88f58
clean up html content handler header use
...
Improve header use in preperation for making browser window a corewindow
2018-05-11 13:18:54 +01:00
Vincent Sanders
2a03ea3049
move html and text content handlers where they belong
2018-05-10 13:37:02 +01:00
Michael Drake
2290c208ba
Disc cache: Squash armhf warnings.
2018-05-08 12:26:04 +01:00
Michael Drake
6e0e3ea81f
Duktape: Squash armhf warnings.
...
content/handlers/javascript/duktape/duktape.c: In function 'duk_resolve_nonbound_function':
content/handlers/javascript/duktape/duktape.c:14609:25: warning: cast increases required alignment of target type [-Wcast-align]
duk_push_tval(thr, &((duk_hboundfunc *) h)->target);
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_bi_function_prototype_bind':
content/handlers/javascript/duktape/duktape.c:32423:20: warning: cast increases required alignment of target type [-Wcast-align]
h_boundtarget = (duk_hboundfunc *) h_target;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_free_hobject':
content/handlers/javascript/duktape/duktape.c:46072:23: warning: cast increases required alignment of target type [-Wcast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk__mark_hobject':
content/handlers/javascript/duktape/duktape.c:47889:23: warning: cast increases required alignment of target type [-Wcast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_hobject_refcount_finalize_norz':
content/handlers/javascript/duktape/duktape.c:49866:23: warning: cast increases required alignment of target type [-Wcast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk__handle_bound_chain_for_call':
content/handlers/javascript/duktape/duktape.c:61533:14: warning: cast increases required alignment of target type [-Wcast-align]
h_bound = (duk_hboundfunc *) func;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_js_instanceof':
content/handlers/javascript/duktape/duktape.c:78165:24: warning: cast increases required alignment of target type [-Wcast-align]
duk_push_tval(thr, &((duk_hboundfunc *) func)->target);
^
2018-05-08 12:21:41 +01:00
Michael Drake
8319ead530
Duktape: Squash -Wcast-align warnings on armhf.
2018-05-05 21:19:36 +01:00
Michael Drake
0ee536b083
Duktape: Make declarations match definitions for inline functions.
2018-05-04 16:54:36 +01:00
Michael Drake
dcb12cab51
Duktape: Make declarations match definitions for fastint-enabled functions.
2018-05-04 16:54:33 +01:00
Michael Drake
4bf20cc693
Duktape: Make declaration match definition for duk_refzero_check_fast()
2018-05-04 16:54:30 +01:00
Michael Drake
f6073cd699
Duktape: Make declarations match definitions for duk_raw_read_xxx_be
2018-05-04 16:54:27 +01:00
Michael Drake
af8bde6214
Duktape: Prevent clang static analysis.
2018-05-04 16:54:23 +01:00
Michael Drake
b16b525cd3
Duktape: Update to 2.2.1 release.
2018-05-04 16:50:55 +01:00
John-Mark Bell
a8bf9b05aa
HTTPS: restrict ciphersuites
2018-04-22 12:54:23 +00:00
John-Mark Bell
7d4349035d
Explicitly re-enable TLS session tickets.
...
Libcurl disables this by default.
2018-04-22 12:24:56 +00:00
John-Mark Bell
842513f10b
URLdb: fix comparison
2018-04-22 12:09:05 +00:00
Daniel Silverstone
70b6ca4376
Force SSL session caching on, Ubuntu seems to have it off by default
2018-04-22 13:04:21 +01:00
Daniel Silverstone
5efc6407d3
Revert "Disable SSL session ID caching."
...
This reverts commit debe0e345b
.
2018-04-22 12:58:39 +01:00
John-Mark Bell
103c015784
HSTS: make llcache update policy on 3xx responses
2018-04-22 11:39:12 +00:00
John-Mark Bell
ec1936cc93
HSTS: prevent llcache being nice
...
If the server has defined a HSTS policy, then the user no longer
gets to click-through a garbage certificate. Additionally, if
the server has provided a HSTS policy, it should do TLS properly,
so don't permit client-driven TLS version downgrades in that case,
either.
2018-04-22 11:39:12 +00:00
John-Mark Bell
83f5332708
HSTS: teach llcache to update and enforce policy.
2018-04-22 11:39:12 +00:00
John-Mark Bell
a6014cae15
HSTS: support policy in urldb
2018-04-22 11:39:12 +00:00
John-Mark Bell
badc0d437a
LLCache: correct typos/grammar/etc.
2018-04-22 11:16:26 +00:00
Vincent Sanders
f3eb366679
Fix dependency declaration for dukky.c
2018-04-21 11:54:09 +01:00
John-Mark Bell
fe45bc1dbe
JPEG: handle CMYK/YCCK images
...
No real colourspace conversion here, so expect oversaturated images
Fixes #2570 .
2018-01-20 17:58:42 +00:00
John-Mark Bell
17ae38771d
Backing store: clean up resources properly.
...
Patch from Felix S. Fixes #2579 .
2018-01-20 16:18:51 +00:00
John-Mark Bell
328a29d22f
RSVG: fix colour conversion
2018-01-20 15:33:05 +00:00
Michael Drake
6be6fa1b21
CSS utils: Handle new units in length conversion routines.
...
This causes a ripple effect of all the callsites needing
information they didn't have.
2018-01-05 13:49:51 +00:00
Michael Drake
5776d3448c
CSS computed style composition: Update for new CSS units.
...
Since the nscss_compute_font_size callback now needs to convert
new units to absolute values, and some of these units require info
from the root element's style, there are knock-on changes to ensure
that the required info is available where its needed.
2018-01-05 13:49:51 +00:00
Michael Drake
d1c656b55f
CSS: Add new libcss unit types to computed style dump.
2018-01-02 15:38:35 +00:00
Michael Drake
046977507b
Duktape: Squash -Wcast-align warnings on armhf.
2017-11-02 16:34:59 +00:00
Michael Drake
8f73414c06
Revert "Duktape: Attempt to squash aarch64 cast increases required alignment warnings."
...
This reverts commit 8cc3adee5a
.
These warnings don't show up with the CI updated to Debian Stretch.
2017-11-01 16:02:20 +00:00
Michael Drake
8cc3adee5a
Duktape: Attempt to squash aarch64 cast increases required alignment warnings.
...
content/handlers/javascript/duktape/duktape.c: In function 'duk_resolve_nonbound_function':
content/handlers/javascript/duktape/duktape.c:14585:25: error: cast increases required alignment of target type [-Werror=cast-align]
duk_push_tval(thr, &((duk_hboundfunc *) h)->target);
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_bi_function_prototype_bind':
content/handlers/javascript/duktape/duktape.c:32399:20: error: cast increases required alignment of target type [-Werror=cast-align]
h_boundtarget = (duk_hboundfunc *) h_target;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_free_hobject':
content/handlers/javascript/duktape/duktape.c:46048:23: error: cast increases required alignment of target type [-Werror=cast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk__mark_hobject':
content/handlers/javascript/duktape/duktape.c:47865:23: error: cast increases required alignment of target type [-Werror=cast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_hobject_refcount_finalize_norz':
content/handlers/javascript/duktape/duktape.c:49842:23: error: cast increases required alignment of target type [-Werror=cast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk__handle_bound_chain_for_call':
content/handlers/javascript/duktape/duktape.c:61509:14: error: cast increases required alignment of target type [-Werror=cast-align]
h_bound = (duk_hboundfunc *) func;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_js_instanceof':
content/handlers/javascript/duktape/duktape.c:78117:24: error: cast increases required alignment of target type [-Werror=cast-align]
duk_push_tval(thr, &((duk_hboundfunc *) func)->target);
^
2017-10-30 16:50:38 +00:00
Michael Drake
448228a30c
Duktape: Use align-by-8 on all platforms by default
...
This reproduces upstream commit de7ae8a2ecc597e1c2024c15dbeae4d28c9f2a2c.
* de7ae8a2ec
It was applied to master after the release of Duktape 2.2.0. See also:
* https://github.com/svaarala/duktape/issues/1783
* https://github.com/svaarala/duktape/issues/812#issuecomment-337058737
2017-10-29 15:17:06 +00:00
Michael Drake
0687687c37
Duktape: Revert alignment of struct duk_hobject
.
2017-10-29 15:16:21 +00:00
Michael Drake
ea7da966de
Duktape: Another attempt to squash aarch64 increases required alignment warnings.
2017-10-29 14:50:10 +00:00
Michael Drake
6619be2b72
Duktape: Attempt to squash aarch64 cast increases required alignment warnings.
...
content/handlers/javascript/duktape/duktape.c: In function 'duk_resolve_nonbound_function':
content/handlers/javascript/duktape/duktape.c:14585:25: error: cast increases required alignment of target type [-Werror=cast-align]
duk_push_tval(thr, &((duk_hboundfunc *) h)->target);
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_bi_function_prototype_bind':
content/handlers/javascript/duktape/duktape.c:32399:20: error: cast increases required alignment of target type [-Werror=cast-align]
h_boundtarget = (duk_hboundfunc *) h_target;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_free_hobject':
content/handlers/javascript/duktape/duktape.c:46048:23: error: cast increases required alignment of target type [-Werror=cast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk__mark_hobject':
content/handlers/javascript/duktape/duktape.c:47865:23: error: cast increases required alignment of target type [-Werror=cast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_hobject_refcount_finalize_norz':
content/handlers/javascript/duktape/duktape.c:49842:23: error: cast increases required alignment of target type [-Werror=cast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk__handle_bound_chain_for_call':
content/handlers/javascript/duktape/duktape.c:61509:14: error: cast increases required alignment of target type [-Werror=cast-align]
h_bound = (duk_hboundfunc *) func;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_js_instanceof':
content/handlers/javascript/duktape/duktape.c:78117:24: error: cast increases required alignment of target type [-Werror=cast-align]
duk_push_tval(thr, &((duk_hboundfunc *) func)->target);
^
2017-10-29 14:02:10 +00:00
Michael Drake
e418416c77
Squash remaining GCC7 -Wimplicit-fallthrough warnings.
2017-10-23 09:46:02 +01:00
Michael Drake
a47edd3733
Duktape: Make declarations match definitions for inline functions.
2017-10-21 16:33:03 +01:00
Michael Drake
8e7fc8e2ac
Duktape: Make declarations match definitions for fastint-enabled functions.
...
Restore ff20edbfbe
for 2.2.0 import.
2017-10-21 16:23:16 +01:00
Michael Drake
0759139c61
Duktape: Make declaration match definition for duk_refzero_check_fast()
...
Restore 9a8577fead
for 2.2.0 import.
2017-10-21 16:21:48 +01:00
Michael Drake
0a7f62ceb0
Duktape: Make declarations match definitions for duk_raw_read_xxx_be
...
Restore 6d63f7959a
for 2.2.0 import.
2017-10-21 16:20:33 +01:00
Michael Drake
6f33e48ca3
Duktape: Prevent clang static analysis.
...
Restore 336326af3a
for 2.2.0 import.
2017-10-21 15:54:33 +01:00
Michael Drake
3356906904
Duktape: Update to 2.2.0 release.
2017-10-21 15:51:55 +01:00
Michael Drake
f7f18042bf
CSS: Wrappers for computed style getters that return unsupported values.
...
We don't yet handle the Flexbox-related values for certain properties.
2017-10-20 17:46:37 +01:00
Michael Drake
f64a22c228
CSS hints: Ensure length and unit are initialised for vertical-align.
2017-10-13 10:28:42 +01:00
Vincent Sanders
b9bdc8d312
fix image cache format specifiers signedness
2017-09-11 17:29:57 +01:00
Vincent Sanders
8fb2fc6fc3
rationalise history icon bitmap handling to ensure correct lifetime
2017-09-10 16:06:38 +01:00
Vincent Sanders
8b88e44090
fix time_t logging
2017-09-08 20:47:22 +01:00
Daniel Silverstone
50cbb98941
Hopefully quash warning about time_t formatting on openbsd
2017-09-08 19:38:11 +01:00
Vincent Sanders
5d6f189d8b
Fixup everything the semantic patch missed
2017-09-07 18:12:09 +01:00
Vincent Sanders
71225624f6
update fetch debug logging to use catagory
2017-09-06 18:45:35 +01:00
Vincent Sanders
72e6050eb3
add low level cache category and use it
2017-09-06 18:45:35 +01:00
Vincent Sanders
63f5ba6f62
update bindings with logging changes
2017-09-06 18:45:35 +01:00
Vincent Sanders
75018632a9
Use coccinelle to change logging macro calls in c files
...
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Vincent Sanders
8d9b2efc11
use nslog library for logging if available.
2017-09-03 23:40:32 +01:00
Michael Drake
c2ac1a713f
Errorcodes: Add SPRITE_ERROR and use it in sprite content handler.
2017-08-30 09:43:13 +01:00
Michael Drake
1670dc33af
Sprite content handler: Ensure we broadcast error on librosprite error.
2017-08-29 11:57:34 +01:00
Michael Drake
a9d18a8efd
Sprite content handler: Fix leaked rosprite_mem_context on rosprite_load error.
2017-08-29 11:55:46 +01:00
Michael Drake
ba0283f526
RSVG content handler: Remove unused assignement.
2017-08-28 12:16:24 +01:00
Michael Drake
4a014fecde
hlcache content callback: Use designated initialiser for hlcache_event.
2017-08-28 11:52:54 +01:00
Michael Drake
e411c84e9b
SVG content handler: Convert to using content_broadcast_errorcode().
2017-08-28 10:24:04 +01:00
Michael Drake
9e64f37846
RSVG content handler: Convert to using content_broadcast_errorcode().
2017-08-28 10:21:11 +01:00
Michael Drake
cae1c44f8f
PNG content handler: Convert to using content_broadcast_errorcode().
2017-08-28 10:14:22 +01:00
Michael Drake
36c01fc03b
Sprite content handler: Convert to using content_broadcast_errorcode().
2017-08-28 10:06:47 +01:00
Vincent Sanders
cde300133e
initialise event struct correctly to avoid compiler warning
2017-08-27 16:01:58 +01:00
Michael Drake
d1a493f569
ICO content handler: Convert to using content_broadcast_errorcode().
2017-08-27 13:32:53 +01:00
Michael Drake
d83f6ea3c1
GIF content handler: Convert to using content_broadcast_errorcode().
2017-08-27 13:28:21 +01:00
Michael Drake
337bd98f6c
BMP content handler: Convert to using content_broadcast_errorcode().
2017-08-27 13:28:21 +01:00
Michael Drake
d4cdcf3067
CSS content handler: Convert to using content_broadcast_errorcode().
2017-08-27 13:09:44 +01:00
Michael Drake
e94fe1632e
Content API: Avoid content message copy in content user callback.
2017-08-26 16:38:18 +01:00
Michael Drake
d70beb28db
Content API: Make content_broadcast take pointer to content_msg_data.
2017-08-26 15:50:03 +01:00
Vincent Sanders
2467a0a990
fix coverity issue 1372473 Out-of-bounds write
2017-06-09 19:51:12 +01:00
Vincent Sanders
703427a486
Update documentation removing junk and moving to markdown for most text files
2017-06-09 17:30:00 +01:00
Michael Drake
ff20edbfbe
Duktape: Make declarations match definitions for fastint-enabled functions.
2017-04-21 11:33:28 +01:00
Michael Drake
6da983ca27
Duktape: Enable fastints.
...
Suggested by svaarala.
2017-04-20 12:12:29 +01:00
Michael Drake
9a8577fead
Duktape: Make declaration match definition for duk_refzero_check_fast()
2017-04-16 17:36:25 +01:00
Michael Drake
40e589531e
Duktape: Make declarations match definitions for duk_raw_read_xxx_be
...
Restore 6d63f7959a
for 2.1.0 import.
2017-04-16 16:58:57 +01:00
Michael Drake
8449b13a3a
Duktape: Prevent clang static analysis.
...
Restore 336326af3a
for 2.1.0 import.
2017-04-16 16:58:35 +01:00
Michael Drake
db9b0dfe00
Duktape: Update to 2.1.0 release.
2017-04-16 16:57:01 +01:00
Michael Drake
5d5081eb57
CSS: Handle presentational hint for HR's "width" attribute.
2017-04-10 09:33:09 +01:00
Michael Drake
abdab90859
Presentational hints: Ensure length is initialised for auto margins.
...
Although the length is unused when margin is auto, having
uninitialised values present in a computed style means that
the style hashing may give the same style different hashes
depending on the unintitialised info.
The effect of this would have been be to reduce the chance
of computed style sharing. It would have had no effect on
page rendering.
2017-04-06 17:14:58 +01:00
Vincent Sanders
4e750bdab6
fix doc comment spelling mistake
2017-03-28 11:45:24 +01:00
Michael Drake
0a0e7b5bd7
Duktape: Suppress warnings about increasing alignment of pointer type.
2017-03-23 17:52:28 +00:00
Michael Drake
ae793a3ad9
Duktape: Atari Mint lacks trunc, log2 and cbrt.
...
build/Linux-atari/content_handlers_javascript_duktape_duktape.o:build/Linux-atari/content_handlers_javascript_duktape_duktape.o:(.text+0x978): undefined reference to `_trunc'
build/Linux-atari/content_handlers_javascript_duktape_duktape.o:build/Linux-atari/content_handlers_javascript_duktape_duktape.o:(.text+0x990): undefined reference to `_log2'
build/Linux-atari/content_handlers_javascript_duktape_duktape.o:build/Linux-atari/content_handlers_javascript_duktape_duktape.o:(.text+0x99c): undefined reference to `_cbrt'
2017-03-23 16:02:48 +00:00
Michael Drake
bc204a469a
Duktape: Make declarations match definitions for duk_raw_read_xxx_be
...
Restore 6d63f7959a
for 2.0.2 import.
2017-03-23 15:30:22 +00:00
Michael Drake
c98fc7999a
Duktape: Prevent clang static analysis.
...
Restore 336326af3a
for 2.0.2 import.
2017-03-23 14:56:32 +00:00
Michael Drake
5d39972b9f
Duktape 2.X: duk_error now returns a duk_ret_t
...
https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_error-duk_error_va-duk_throw-duk_fatal-have-a-return-value
This also changes Console.bnd to return on error, rather than ignoring it.
2017-03-23 14:56:32 +00:00
Michael Drake
ff8e5c99a0
Duktape 2.x: duk_safe_call callbacks now have a void ptr user data param.
...
https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_safe_call-userdata
2017-03-23 14:56:32 +00:00
Michael Drake
736bbbed71
Duktape 2.X: Update to Duktape 2.0.2.
...
Note that DUK_OPT_XXX feature selection has been removed.
This means we can't use `DUK_OPT_HAVE_CUSTOM_H`, so we need another
way to tell duktape about our custom header.
This means assembling our own duktape distribution with a
duktape "tools/configure.py" invocation.
Instructions for updating duktape have been added to NetSurf's
`Docs/` directory.
See:
https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_opt_xxx-feature-option-support-removed
2017-03-23 14:56:32 +00:00
Michael Drake
be77f764e2
Improve content logging with content IDs (pointer values).
...
This makes it easier to track a content by its ID through a log.
2017-03-23 14:23:57 +00:00
Vincent Sanders
f39d78dc2e
mimimal mime sniffing test
2017-03-20 00:48:11 +00:00
Vincent Sanders
0866314d96
reduce hlcache handle api usage in mimesniff
2017-03-19 22:29:23 +00:00
Vincent Sanders
93e2b4855b
make mimesniffing use core strings
2017-03-19 15:00:21 +00:00
Vincent Sanders
2406acfeb3
fix urldb numerical v6 address handling
2017-03-13 23:44:06 +00:00
Vincent Sanders
27aa56cbf6
make the urldb content type setting API return an error
2017-03-13 21:55:39 +00:00
Vincent Sanders
92b5f114ba
make urldb persistance setting API return an error
2017-03-13 21:19:59 +00:00
Vincent Sanders
5078bffad7
change urldb_set_title API to return an error status
2017-03-13 16:38:24 +00:00
Vincent Sanders
5ebec85282
actually check the generated database files against reference test data
2017-03-08 22:22:54 +00:00
Vincent Sanders
0da0dcc342
remove urldb_add_host and path from public API
...
The urldb_add_host and urldb_add_path API were only public for the
urldb test code which was calling them incorrectly in any case as the
url bloom filters were not updated so serialising and adding data to
entries was inconsistent.
This also changes the tests to use the urldb_add_url API which is less
buggy and results in a smaller, cleaner urldb API.
2017-03-08 13:27:00 +00:00
Vincent Sanders
b78887c7c8
make update data api return an result
2017-03-08 13:13:21 +00:00
Vincent Sanders
670110b171
use robust handling of time_t value (de)serialisation
...
The previous implementation was wrong on systems where time_t was not
an int type. This changes urldb to use the portable implementation
netsurf has available.
2017-03-08 10:54:17 +00:00
Vincent Sanders
c41d42644b
clean up url database documentation comments and formatting
2017-03-06 23:21:12 +00:00
Vincent Sanders
a88254897b
Revert "make urldb internal parse macros less prone to control flow errors"
...
This reverts commit 718da3ffff
.
These macros are used in a way that causes safe macros to break
2017-03-05 15:28:05 +00:00
Vincent Sanders
3217c82cdb
attempt to remove unintended sign extension warning in fs backing store
2017-03-05 13:02:47 +00:00
Vincent Sanders
718da3ffff
make urldb internal parse macros less prone to control flow errors
...
fixes issue highlighted by coverity (CID 1361696)
2017-03-05 12:11:48 +00:00
Vincent Sanders
d9a2c7b9c1
fix some doxygen errors
2017-02-24 14:02:31 +00:00
Vincent Sanders
07c8ea22a5
fix unused variable warning on non public suffix library builds
2017-02-23 23:33:39 +00:00
Vincent Sanders
0f69965805
clean up some of the doxygen generation warnings
2017-02-19 11:32:17 +00:00
Vincent Sanders
7d660561cc
Update knockout plotter to use new API
2017-02-11 13:57:06 +00:00
Vincent Sanders
3722ff8d86
Update all core use of plotters to new API
2017-02-11 13:55:41 +00:00
Daniel Silverstone
8e9751d3b6
Add EventTarget binding
...
This adds the binding for EventTarget along with implementations for
addEventListener() removeEventListener() and dispatchEvent()
2017-02-05 12:39:46 +00:00
Daniel Silverstone
2858aec1c2
Add EventListener support to duktape binding.
...
This paves the way for EventTarget and its associated event listener support.
In particular it ensures the generic event handling we do supports the
semantics of the addEventListener() and removeEventListener() managed lists of
callbacks.
2017-02-05 12:05:04 +00:00
Daniel Silverstone
108cc0cebd
Support fixed nsgenbind bindings
2017-02-05 11:20:08 +00:00
Vincent Sanders
1f52b2d514
remove unused fetch acessor
2017-01-31 22:56:45 +00:00
Vincent Sanders
e96bf01339
make backing store use inttypes format specifiers
2017-01-21 16:48:41 +00:00
Vincent Sanders
6075feb487
create netsurf inttypes header to have portable integer formatting macros
2017-01-21 14:20:55 +00:00
Vincent Sanders
70d700b26c
rationalise use of utils/utils.h header
2017-01-19 21:15:08 +00:00
Vincent Sanders
7dab7cb43d
move plot style header to netsurf include directory
...
move plotter style header and adjust all callers to use only what they
actually require.
2017-01-13 10:03:24 +00:00
Vincent Sanders
9be0f4ccaf
fixup usage of directory creation macro in Makefiles
2017-01-07 13:21:25 +00:00
Michael Drake
770c277ccc
Duktape: Prevent clang static analysis.
...
Restore 336326af3a
for 1.6.0 import.
2016-12-28 15:06:08 +00:00
Michael Drake
539d5da5c4
Duktape: Make declarations match definitions for duk_raw_read_xxx_be
...
Restore 6d63f7959a
for 1.6.0 import.
2016-12-28 15:04:08 +00:00
Michael Drake
7c03ae91fd
Duktape: Update to version 1.6.0.
2016-12-28 15:01:03 +00:00
Vincent Sanders
af1f1f375d
make nsgenbind call last in rule so faliures are noticed by make
2016-11-24 23:45:49 +00:00
Vincent Sanders
3f88c12315
Fix OpenSSL X509 cert API detection
...
LibreSSL defines a OPENSSL_VERSION_NUMBER of 2.1 but only provides the
old OpenSSL 1.0.x API.
2016-11-21 18:29:23 +00:00
Vincent Sanders
bcce8cc7b4
fix spelling of retrived
2016-11-21 00:07:13 +00:00
Vincent Sanders
f679a9b1d6
fix spelling and doxygen comments in image cache
2016-11-21 00:07:12 +00:00
Vincent Sanders
b3042f6c1f
fix spelling in low level cache code
2016-11-20 15:38:14 +00:00
Vincent Sanders
9ff13d64c4
fix spelling mistakes in hlcache code
2016-11-20 15:25:33 +00:00
Vincent Sanders
8828bdc702
fix comedy spelling in fs backing store code
2016-11-20 15:22:04 +00:00
Vincent Sanders
e8a9e37445
fix openSSL 1.1.0 X509 certificate handling
2016-11-20 12:15:31 +00:00
Vincent Sanders
61a00c3832
fix unecessary base64 header include
2016-11-19 17:11:23 +00:00
Michael Drake
b3d98a4d7d
Work in Progress: Update for style-sharing LibCSS API.
2016-11-19 14:46:44 +00:00
Daniel Silverstone
1fb06929d9
Remove internal BASE64 in favour of nsutils' one
2016-11-19 14:40:10 +00:00
Michael Drake
b42d253f86
Table cell nowrap attribute is presentational hint, not UA style.
2016-10-13 12:44:27 +01:00
Vincent Sanders
1ef1edc9e0
enable use of netsurf public suffix library to prevent supercookies
2016-09-20 21:45:35 +01:00
Vincent Sanders
e582497322
if the cookie is a session cookie indicate it
...
previously session cookies were simply displayed as having an expiry
in 1970 which was unhelpful.
2016-09-13 23:17:28 +01:00
Vincent Sanders
a91c7cdf04
make urldb parsing of ascii data explicit
2016-09-10 23:05:24 +01:00
Vincent Sanders
fa1af79e7c
document file fetcher being locale dependant
2016-09-10 23:05:24 +01:00
Michael Drake
91d6215215
Duktape: Prevent clang static analysis.
...
Restore 336326af3a
for 1.5.1 import.
2016-08-31 18:58:13 +01:00
Michael Drake
a64f8eb8a0
Duktape: Make declarations match definitions for duk_raw_read_xxx_be
...
Restore 6d63f7959a
for 1.5.1 import.
2016-08-31 18:58:13 +01:00
Michael Drake
9800c5f298
Duktape: Update to version 1.5.1.
...
Version 1.5.1 includes some of our own fixes, reducing our delta
to upstream.
These should not be needed now:
- 2cbb337756
Squash harmless Clang warning introduced in Duktape 1.5.0.
- 8f8cda2b48
Fix Duktape on AmigaOS3 (thanks to Tygre and Sami)
2016-08-31 18:54:35 +01:00
Chris Young
8f8cda2b48
Fix Duktape on AmigaOS3 (thanks to Tygre and Sami)
2016-08-27 18:51:17 +01:00
Sergei Rogachev
a815ad6250
Fix longjmp to invalid address on jpeg init error
...
Libjpeg used in NetSurf for decoding of JPEG images handles exceptions using a
pair of non-local jump functions: setjmp() and longjmp(). When a decompression
context is created via a call to the function jpeg_create_decompress() the
caller passes a structure jpeg_decompress_struct as a parameter. This structure
should has a validly initialized jump buffer, so the initialization or other
functions called in future can jump to the exception handling context.
The jpeg backend of NetSurf now initializes libjpeg mistakenly: jump buffer is
filled after the call to jpeg_create_decompress(). It results in jump to random
addresses in the case of exception caught during operation of the function
jpeg_create_decompress().
The patch moves the initialization of jump buffer before the call to
jpeg_create_decompress().
Signed-off-by: Sergei Rogachev <rogachevsergei@gmail.com>
2016-08-14 22:37:12 +01:00
Vincent Sanders
59b108498a
fix bitmap modification callback calling for bmp image handler
...
bitmap file decoding is done at first call to redraw but was not
calling the modified callback at the correct time immediately after
decode so frontend image chnages were not being done. This caused
nsgtk to fail to apply its colour space fixups so red was swapped with
blue.
2016-08-14 22:26:37 +01:00
Michael Drake
fe00eac8cb
Buildsystem: Make curl/openssl usage build-time options.
2016-08-13 13:31:07 +01:00
Vincent Sanders
9176d3233f
ensure url database destructor cleans up correctly
2016-08-09 13:15:02 +01:00
Vincent Sanders
115985f069
extend url database unit testing to cover more API
2016-08-09 12:26:37 +01:00
Vincent Sanders
c1aec1cfa0
fix urldb warning and test build
2016-08-08 13:52:54 +01:00
Vincent Sanders
05d2b9a92c
update urldb dump to use LOG rather than writing to stderr directly
2016-08-08 13:44:18 +01:00
Vincent Sanders
b939afe3fc
Allow certificate verification user prompt creation to return errors
2016-07-31 13:25:20 +01:00
Michael Drake
fa2e3b7784
URL unescape: return the new length to the caller.
...
The avoids situations were we threw away the length, only for
the caller to have to strlen the returned string.
Note, there seems to be a case of the amiga front end writing
beyond end of allocation. Added a TODO for now.
2016-07-24 14:03:16 +01:00
Michael Drake
7202ff2f64
Data URL handling: Use url_unescape rather than curl.
2016-07-24 12:23:42 +01:00
Michael Drake
f9870c41f5
Whitespace: Convert spaces to tab for indent.
2016-07-24 12:07:31 +01:00
Daniel Silverstone
c523bb47a0
Actually use utils/inet.h instead of sys/select.h
2016-06-27 21:58:09 +01:00
Daniel Silverstone
be1ff548cb
fetch.h needs sys/select.h for the fd_set type et al.
2016-06-27 21:50:54 +01:00
Daniel Silverstone
47ccd9855d
Move fetcher_fdset to fetch.h (and rename to fetch_fdset). Maybe not ideal but better
2016-06-27 21:09:39 +01:00
Daniel Silverstone
a468b40990
Refactor the fdset acquisition into the fetchers to stop fetch.c including curl.h
2016-06-27 21:00:58 +01:00
Vincent Sanders
ab6c03f311
Fix handling of certificate chains
...
When processing a x509 certificate chain from openssl it is necessary
to allow teh entire chain to be processed rather than halting
processing at the first certificate with an error. This allows errors
with a certificate authority to be examined.
2016-06-27 13:39:07 +01:00
Vincent Sanders
976eca9958
msplit public url database API out for frontends
2016-06-13 23:34:45 +01:00
Vincent Sanders
042fcb82b8
Move javascript content handler as appropriate for updated source format
2016-06-07 16:01:04 +01:00
Vincent Sanders
0fad46cd0f
reduce unecessary usage of content headers
2016-06-06 16:10:47 +01:00
Vincent Sanders
8861923455
Allow include directories to be added by sub makefiles
2016-06-06 14:47:27 +01:00
Vincent Sanders
cf73e369ef
fixup rsvg image handler for content API changes
2016-06-06 09:16:47 +01:00
Vincent Sanders
76a68d7dd0
Update content to split public and internal API
2016-06-06 09:01:38 +01:00
Vincent Sanders
667605869f
move plotters header into public API
2016-05-30 21:05:57 +01:00
Vincent Sanders
7fc0a4c481
move desktop window header into public API
2016-05-30 17:32:57 +01:00
Vincent Sanders
8711fbe47d
move mouse and pointer state header into public API
2016-05-30 12:10:08 +01:00
Vincent Sanders
527756cca0
move fetch header into public API
2016-05-30 11:29:39 +01:00
Vincent Sanders
fe7eb85614
move misc header into public API
2016-05-30 11:23:32 +01:00
Vincent Sanders
2dab078f21
move bitmap API header to core include directory
2016-05-26 23:01:03 +01:00
Vincent Sanders
6722943b81
move the CSS content handler
2016-05-26 11:18:41 +01:00
Vincent Sanders
3224d7121a
move image content handlers to accomodate core build changes
2016-05-23 23:32:16 +01:00
Vincent Sanders
6a36d4ec2b
remove all core usage of warn_user API
2016-04-26 12:50:16 +01:00
Vincent Sanders
974a4a21e1
split out the layout glyph sizing and splitting API
...
This refactors the core "font" sizing API to be handled through gui
function tables similar to every other core/frontend calling API.
2016-04-23 23:32:21 +01:00
Vincent Sanders
2bb68cb874
need strings.h for strncasecmp on freebsd
2016-04-21 23:04:00 +01:00
Vincent Sanders
7d9c9dba36
Split utils header into string functions and everything else
...
split out the string handling API from the rest of the utils header
and fix up all the fallout.
2016-04-21 22:36:21 +01:00
Vincent Sanders
10ef7b3f1d
update content wallclock timing to use monotonic time interface
2016-04-20 22:58:48 +01:00
Vincent Sanders
a6dd92c571
use monotonic clock call for html reflow timing
2016-04-20 19:18:15 +01:00
Vincent Sanders
dee7426656
stop content header dragging in so many other headers
2016-04-19 23:20:29 +01:00
Vincent Sanders
798654f910
remove curl fetchers use of the wallclock API
...
The wallclock() API uses gettimeofday which can be affected by the the
systems clock being changed etc. The curl fetcher usage of this API is
to generate a timing delta and does not cope with the gettimeofday
issues.
This changes the fetcher to use the nsutils library monotonic time
function which does not suffer from the issues with gettimeofday.
2016-04-19 14:18:09 +01:00
Vincent Sanders
afea659fef
move dir_sort_alpha function from generic utils to one specific place it is used
2016-04-19 12:01:05 +01:00
Vincent Sanders
1bc010665e
Reduce unecessary use of directory entry headers
...
The config header was causing many source files to unecessarily
include the dirent headers causing extra dependancies. This has been
fixed by providing a utility dirent header that provides a common API
across all platforms while removing the unecessary dirent header usage.
2016-04-19 11:21:06 +01:00
Vincent Sanders
392307bb1f
reduce content header interdependancy
2016-04-18 23:04:16 +01:00
Vincent Sanders
34f6aa1323
clean up header usage in content hnadling core
2016-04-18 20:58:49 +01:00
Vincent Sanders
ade0cd8bb9
Reduce unecessary use of networking headers
...
The utility configuration header dragged in a number of bsd sockets
and related API as a side effect of setting up the configuration. By
splitting the header and API setup into a separate header only the
small number of places that need the functionality explitly include
it.
2016-04-17 13:42:28 +01:00
Vincent Sanders
810e9153d1
urldb no longer uses curl directly but it does need correct network includes
...
The update to remove curl usage from urldb must pull in the utility
config header instead to get inet_aton and such or compoles on some
platforms fail.
2016-04-17 09:39:44 +01:00
Vincent Sanders
0bc5d2ca4c
create date and time to seconds since epoch processing utility function
...
currently NetSurf uses curl_getdate to convert textural date and time
strings into seconds since epoch. It is betetr to move this
functionality to a utility function so curl_getdate can easily be
replaced if required.
2016-04-16 23:50:22 +01:00
Vincent Sanders
33c7df0c40
complete the rename of the gui browser table
...
When the operations tables were created the browser table was renamed
to miscellaneous except the actual rename patch was never applied,
this fixes that situation.
2016-04-16 23:50:21 +01:00
Vincent Sanders
d15ab96a51
Fix size_t printf formatting
...
The printf formatting for size_t is set in c99 as %zu but in windows
it is %Iu this is solved by adding and inttypes style PRI macro for size_t
This also uses this macro everywhere size_t is formatted.
2016-03-17 22:00:54 +00:00
Vincent Sanders
72308c1f0d
revert urldb include fixes as tehy cause build issues elsewhere and failed to fix the warning
2016-02-12 15:55:13 +00:00
Vincent Sanders
fb95797862
fix more freebsd warnings
2016-02-12 15:45:49 +00:00
Vincent Sanders
5d3c38a704
remove reliance on GLib from monkey frontend
...
This changes the monkey implemntation to use a simple scheduler list
and select instead of glib events.
2016-02-12 13:37:50 +00:00
Chris Young
a0e41a46a3
Stop GIF animations when they are no longer in use, instead of waiting until they are destroyed.
2016-02-11 19:23:32 +00:00
Michael Drake
255361a885
Log the cache limit along side size, after clean.
2016-02-08 11:48:33 +00:00
Michael Drake
fc2d766bff
Style: Wrap some long lines.
2016-02-08 11:38:41 +00:00
Michael Drake
63fb2cbdc1
Add URL to llcache object destruction logging.
2016-02-08 11:27:04 +00:00
Michael Drake
0a3519fdac
Remove torrent of logging during browser window resize.
2016-02-06 12:41:51 +00:00
Michael Drake
4055ecf796
Tiny simplification of curl debug logging.
2016-01-21 09:27:27 +00:00
Michael Drake
58d9c98017
URLdb doesn't store 'mailto' urls, so add early exit to lookup.
2016-01-08 17:17:41 +00:00
Michael Drake
8e0e72368e
Fix crazy indentation.
2016-01-08 17:17:11 +00:00
Vincent Sanders
b1e0a711c7
Stop reporting error from mime sniffing when a fetcher completes with no data
...
If a fetcher returns with no data (no content or http error code 204)
the hlcache state machine was trying to mimesniff using non existent
header data and reporting the resulting NSERROR_NOT_FOUND as a
"BadType" message.
This changes the behaviour to be similar to that in the headers
received case where NSERROR_NOT_FOUND from the mimesniffing is not an
error.
2016-01-06 23:53:02 +00:00
Michael Drake
e5ddbd3934
Remove unused variable.
2015-12-20 12:12:36 +00:00
Michael Drake
401cc36924
Add extra logging to curl poll fn when not suppressing curl debug.
2015-11-11 10:39:12 +00:00
Daniel Silverstone
4d1ef3bac4
Add support for retrying timed-out cURL fetches.
...
This is an attempt to amelioriate the situation found in #2384 where
we see the cURL connect() failing to complete. Based on the pcap
from the bug log, we believe that RISC OS is likely failing to signal
the completion of the connection to cURL. As such, cURL times out.
This change permits retries of timed out connections in the hope that
a fresh socket FD might subsequently function correctly. The defaults
chosen mean that the previous behaviour of 30 seconds before timeout
is reported will remain the same, but in that time we will make 3 separate
attempts to connect the socket.
2015-11-10 21:51:54 +00:00
Vincent Sanders
73e45ff024
Fix error reporting from fetch_start
...
Any fetch start error was being reported as "out of memory" which was
clearly insufficient. Foe example bad urls (reported was file:// with
a missing /) were causing a warn_user with out of memory. This change
now at least causes a "bad url" message.
2015-06-24 10:31:13 +01:00
Vincent Sanders
e9b89f776d
Allow the resource scheme to provide data directly.
...
This allows front ends to provide resources from compiled in data
instead of requiring the resources to be available on disc and forcing
a redirect.
2015-06-17 21:35:40 +01:00
Vincent Sanders
0d811963c1
fixup all the remaining logging macro callsites
...
The semantic patch tool appears to have missed some difficult to
reason about callsites which have now been manually cleaned up
2015-05-28 17:06:18 +01:00
Vincent Sanders
c105738fa3
Change LOG() macro to be varadic
...
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.
The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.
A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Michael Drake
8f1c9673d7
Fix format string type missmatches on 32-bit systems.
...
Use C99 inttypes header for format string macros.
2015-05-12 10:19:38 +01:00
Michael Drake
82237d7070
Avoid generating confusing warning.
...
Now the disc cache will be disabled silently if its too slow.
2015-05-12 10:01:06 +01:00
Vincent Sanders
37aad9c749
Improve the logge dinformation about written cache data
2015-05-08 15:42:49 +01:00
Vincent Sanders
35751f3faa
Move the setting of block file extents to background maintinance.
...
On some OS the ftruncate operation can take some time so move it to
occour in the background maintinance operations instead of when data
blocks are initialy opened. This should improve browsing responsiveness.
2015-05-04 09:54:03 +01:00
Vincent Sanders
2aef095f27
Ensure bandwidth minimum check is only performed when enough data has
...
been written.
2015-04-30 14:28:18 +01:00
Vincent Sanders
05538c0264
Ensure small block cache files allocate their entire extent at open.
...
It seems many filesystems are greatly more efficient if the block file
is allocated its entire extent once rather than trying to
continuously grown the file later.
The size of the block files is known at their creation time so this
change ensures they are grown to the full possible extent hence removing
future inefficient writes.
2015-04-30 13:49:25 +01:00
Vincent Sanders
ea2e1c4d98
Add scaled content redraw interface.
...
Add a new interface to the content to allow automaticaly scaled
content redraws. This is intended to replace the thumbnail_redraw
interface with something more generic.
2015-04-23 15:47:28 +01:00
Vincent Sanders
f37e52c394
Move bitmap operations into an operation table.
...
The generic bitmap handlers provided by each frontend are called back
from the core and therefore should be in an operation table. This was
one of the very few remaining interfaces stopping the core code from
being split into a library.
2015-04-13 23:19:04 +01:00
Vincent Sanders
ea9a2ff01d
Fix up some doxygen errors
2015-04-03 00:28:22 +01:00
Vincent Sanders
77ffda1e46
Use nsutils unistd operations for pread and pwrite to get consistant interface
2015-04-02 17:28:55 +01:00
Vincent Sanders
47d08b6506
Revert "Fix RISC OS not having a pread/pwrite implementation."
...
This reverts commit 82c7a7a4ba
.
Conflicts:
content/fs_backing_store.c
2015-04-02 16:37:04 +01:00
Vincent Sanders
576b1c55bf
extend backing store logging to show errno values ofter operations
2015-04-01 09:26:39 +01:00
Vincent Sanders
82c7a7a4ba
Fix RISC OS not having a pread/pwrite implementation.
2015-03-31 22:41:37 +01:00
Vincent Sanders
87a38ca5c1
ensure entry invalidation copes with entries in blocks
2015-03-31 22:02:07 +01:00
Vincent Sanders
9511e9c4e9
Improve file naming inside cache
2015-03-31 20:57:00 +01:00
Vincent Sanders
f1d4094566
allocate small block using block use bitmaps to find free entries.
2015-03-31 20:56:55 +01:00
Vincent Sanders
706a77170d
implement block read and write operations.
2015-03-31 20:56:55 +01:00
Vincent Sanders
c965fa8739
Block file usage bitmaps (de)serialising
2015-03-31 20:56:55 +01:00
Vincent Sanders
a8e501a663
define block store parameters
2015-03-31 20:56:55 +01:00
Vincent Sanders
980e28d916
Change backing store fetch operation to always perform the allocations
...
The fetch API previously allowed for the caller to supply the storage,
this was never used and was preventing the refactoring necessary for
small black storage to be available.
2015-03-31 20:56:55 +01:00
Vincent Sanders
1d03f34d62
Compute the element index once and use that as a parameter.
...
Change to computing the element index from the flags passed to store
and fetch methods instead of passing the flags around and calculating
everywhere.
Additionally split out writing element of entry to file into distinct
function to make code clearer.
2015-03-31 20:56:55 +01:00
Vincent Sanders
c2eda75710
Change element layout and cope with index collisions.
2015-03-31 20:56:55 +01:00
Vincent Sanders
8a99b045bc
Remove url from content thumbnailers API
...
The content thumbnailers for each frontend were being provided the
contents url. This was only ever used to call the urldb thumbnail
setting API.
This changes it so the single callsite that passed a valid url adds
the bitmap to that url itself in desktop_history.c instead of forcing
every frontend to require the urldb API.
Additionally the old API could pass the url as NULL which was causing
asserts where this was not an expected parameter value. Because of
this this fixes bug #2286 which was also present in the monkey
frontend as both called nsurl_access() on the url without the NULL
check and caused an assertion.
2015-03-15 00:00:45 +00:00
Vincent Sanders
a487f7e611
Move win32 window operations into their own module
...
This splits up a great deal of the win32 window code out from other
gui code. It also remove large quantities of unused and junk
variables and functions.
2015-03-12 23:48:53 +00:00
Michael Drake
ac636100e8
Remove include of nsurl from corestrings.h
2015-02-26 16:58:41 +00:00
Michael Drake
cbd9d710a3
Use forward declaration instead of #include for nsurl.
2015-02-26 16:14:23 +00:00
Michael Drake
ee75f5b3ad
Fix to support non-POSIX behaviour when renaming cache entries on disc.
2015-02-03 10:22:28 +00:00
Vincent Sanders
9927232a2d
Improve metadata deserialisation to only update object on success
...
The low level cache deserialisation was leaving bad data in an low
level cache object in the error case. This fixes it so the object
state only gets modified on successful deserialisation of all the
metadata.
2015-01-28 22:39:39 +00:00
Vincent Sanders
5464dc7778
Ensure no division by zero occours if no time has ever been spent writing llcache
2015-01-03 15:13:40 +00:00
Vincent Sanders
6b645664fe
add missing includes
2014-12-27 22:48:37 +00:00
Vincent Sanders
45f98ffd6e
improve comments in low level cache and remove completed todo
2014-12-04 21:09:42 +00:00
Vincent Sanders
5bf4b3ff2b
move the low bandwidth check to allow for an average over a much longer time
2014-12-03 20:13:10 +00:00
Vincent Sanders
57cd5c77b2
Use translated messgae for low bandwidth error
2014-12-02 10:03:27 +00:00
Vincent Sanders
c9ee49baa8
cope with backing store writeout making no progress
2014-12-01 11:32:33 +00:00
Vincent Sanders
ba5ade87b2
ensure the backing store write reports at least a minimal amount of time
2014-12-01 09:18:31 +00:00
Vincent Sanders
1c735140b6
fix resource leak on error (Coverity 1256245)
2014-11-30 11:21:34 +00:00
Vincent Sanders
61ab2777da
Improve writeout rescheduling if list of objects is completed quickly
2014-11-30 00:27:05 +00:00
Vincent Sanders
d08acbc5ae
correctly calculate writeout bandwidth and properly impose limits
2014-11-29 23:57:15 +00:00
Vincent Sanders
6b2676d33f
Improve llcache writeout stratagy
2014-11-28 19:17:42 +00:00
Vincent Sanders
8d51dd4879
update the backing store to allow for invalidating entries which have an allocation
2014-11-27 13:31:43 +00:00
Vincent Sanders
79d5b1bf3b
stop using gettimeofday and use the monotonic time interface fron nsutils
2014-11-26 21:29:13 +00:00
Vincent Sanders
81417ae4a5
caclulate the total amount of time spent writing an object out
...
In order to calculate the writeout bandwidth we need to know how long
it took to write the data to peristant storage in addition to how much
was written.
2014-11-25 23:11:41 +00:00
Vincent Sanders
5a78cd810f
correctly release source data from llcache
2014-11-23 18:21:56 +00:00
Vincent Sanders
01b2bc5a57
Improve doxygen comments and add todo for cache and backing store
2014-11-23 15:43:03 +00:00
Vincent Sanders
246a1fec05
remove constness from backing stores store method
2014-11-23 01:37:24 +00:00
Vincent Sanders
63c35da66e
annotate element struct with packing attributes to reduce entry size
2014-11-23 01:25:14 +00:00
Vincent Sanders
08c7ef6bed
Do not use anonymous union as it is not portable
...
unnamed unions are not portable to old compilers. When reloading data
ensure the heap allocation status is discarded.
2014-11-23 00:35:11 +00:00
Vincent Sanders
8b810ee4a1
change the persistant data store to owning the allocations
2014-11-22 23:56:43 +00:00
Vincent Sanders
eb87406758
update entry points to backing store ready for allowing differing object lifetimes
2014-11-20 22:28:19 +00:00
Vincent Sanders
69f4397fe4
Limit creation of store path directories.
...
Only create all elements of a path in the store when it is being
opened for creation instead of causing reads to create directories.
2014-11-19 16:26:29 +00:00
Vincent Sanders
92a1ac4fbb
Improve backing store control data serialisation
...
By scheduling the control data to be maintained (entries index written
and headers updated) once activity occurs to update these control
structures rather than a single serialisation at browser exit the data
is more likely to be up to date and not lost on a crash.
2014-11-19 16:22:06 +00:00
Vincent Sanders
a79b30bd6f
make backing store use rename to atomicly replace entries file
2014-11-19 11:26:27 +00:00
Vincent Sanders
669df172ec
Fix my spelling of teh everywhere
2014-11-18 17:16:26 +00:00
Vincent Sanders
d4c7a0ff77
Improve data scheme fetcher allocation
...
The data scheme fetcher was over allocating the space for decoded
base64 encoded urls and not using the base64 API that allocated the
correct size storage.
2014-11-17 16:05:17 +00:00
Vincent Sanders
71d016aba5
Remove unecessary form debug
...
Additionaly we make the curl fetcher report errors instead of
uninitialised buffer.
2014-11-15 18:23:44 +00:00
Vincent Sanders
d1f2d29e10
Doxygen cleanups and documentation additions
2014-11-10 17:00:15 +00:00