Commit Graph

1448 Commits

Author SHA1 Message Date
Michael Drake
f3b7a0c44c HTML Script: Check for success on intern of mimetype. 2020-02-23 14:28:27 +00:00
Daniel Silverstone
16163aab03
HTML: Ignore dom exceptions we don't care about
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 09:36:07 +00:00
Daniel Silverstone
b633bef7bf
Node: nodeValue setter should return value set into node
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 09:33:26 +00:00
Daniel Silverstone
bfd185ac49
dukky: Guard pointless work for deep debug
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 09:19:51 +00:00
Daniel Silverstone
bc1810ed61
JS: it's Infinity not infinity
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 19:37:54 +00:00
Daniel Silverstone
d0e775e901
JS: Add Element::attributes and NamedNodeMap to handle it
This is a *very* rudimentary implementation lacking most of the
functionality of NamedNodeMap but it's enough to get jQuery 1.12.4 up.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 18:40:35 +00:00
Daniel Silverstone
b23063bb52
JS Generics: Add a NodeMap proxy builder
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 18:40:16 +00:00
Daniel Silverstone
2325062ff1
Element: support innerHTML
To get us further along the JavaScript pathway, support the
getter and setter for innerHTML.  The getter always returns
an empty string for now, but the setter works.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 18:02:57 +00:00
Daniel Silverstone
61fdb8fda6
JS: Add DOMImplementation::createHTMLDocument
This was the last major thing blocking basic jQuery support

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 16:19:00 +00:00
Daniel Silverstone
fa520638fa
HTML: Ignore LOADING status in html_proceed_to_done()
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 14:26:33 +00:00
Daniel Silverstone
2f8868309a
HTML: Don't transition the content state machine if we do nothing
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 14:09:39 +00:00
Daniel Silverstone
db370bfdb7
HTML: Complete content state machine after async script
The async script completion process needs to complete the
content state machine so that browser throbbers eventually
stop once async scripts have fetched and run, even if that
happens *after* conversion finishes.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 10:48:00 +00:00
Vincent Sanders
55ba27c68f re-order config include so strcasecmp is correctly detected on RISC OS/win32 2019-12-22 11:11:04 +00:00
Daniel Silverstone
eba05b0d38
html_script: Count sync scripts to prevent unpausing early
If there is more than one incomplete sync script then it's
important that we don't unpause hubbub too early.  This commit
adds a counter so that if there're unfinished sync scripts in
the set, we don't unpause until the last one completes.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-19 20:50:33 +00:00
Michael Drake
faf667ada7 HTML: box_consturction: cleanup name dom_string in box_object. 2019-12-10 19:26:12 +00:00
Michael Drake
4c4b57d511 HTML redraw: Never draw box scrollbars for textareas.
The scrollbars for textareas are rendered by the widget.

This stops us from putting broken scrollbars over the top of the
textarea's own scrollbars.
2019-12-09 14:33:53 +00:00
Michael Drake
1c466369ef webp: NetSurf bitmap format is RGBA.
Issue a bitmap modified call after conversion, to allow front ends
with different pixel formats to convert.
2019-12-08 11:30:47 +00:00
Daniel Silverstone
3a8317fddb
fetch_curl_report_certs_upstream: Use new SSL_CERT_ERR_CERT_MISSING
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-03 09:42:14 +00:00
Daniel Silverstone
24dd16ddff
fetch_curl_verify_callback: Do depth update after check
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-03 09:35:51 +00:00
Michael Drake
eb88c92749 html: css fetcher: Fix passing LWC borrow to fetcher_add, which consumes.
Fixes abort on exit when corestring finalisation tried to unref
what should have been the final ref:

    $ ./nsgtk3
    corrupted double-linked list
    Aborted (core dumped)
2019-12-02 10:58:36 +00:00
Michael Drake
65e5512160 html: Fire DOM KeyboardEvents on keypresses. 2019-12-01 21:25:46 +00:00
Michael Drake
f620ea9d17 dukky_push_event: Enable KeyboardEvent specialisation. 2019-12-01 21:25:46 +00:00
Michael Drake
23d413c561 JavaScript: Add KeyboardEvent bindings. 2019-12-01 21:25:46 +00:00
Michael Drake
7e6723e27a html: Add function for issuing a keypress event. 2019-12-01 21:25:46 +00:00
Michael Drake
a2190f91c9 html: Split out helper for firing DOM events and swallowing errors. 2019-12-01 21:25:46 +00:00
Michael Drake
12fd5ddd69 HTML: Rename fire_dom_event to fire_generic_dom_event. 2019-12-01 21:25:46 +00:00
Daniel Silverstone
92caa16cfc
Add missing unrefs
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 17:25:49 +00:00
Daniel Silverstone
715586bb65
html_saw_insecure_objects: Don't infinite loop on objects
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 17:05:28 +00:00
Daniel Silverstone
33c81b6932
html_css_fetcher: Use corestring_lwc_x_ns_css
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 17:05:28 +00:00
Daniel Silverstone
2e07d955b6
content_saw_insecure_objects: Fix various corner cases
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 17:05:28 +00:00
Daniel Silverstone
9faca2b940
Add missing include
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 16:07:45 +00:00
Daniel Silverstone
6fc2666d07
Allow contents to indicate if they believe they may not be secure.
HTML contents reference many other objects.  The browser window
needs to know if any of them may not be secure, in which case it
needs to report that in its page state.  If other content types
might refer to sub-contents, they will need to define the callback
too.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 15:49:08 +00:00
Daniel Silverstone
9a02a41cd6
box_construct: Do not leak attributes in <embed> boxes
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-11-30 20:37:07 +00:00
Michael Drake
dc9de4998f HTML redraw: Don't render scrollbars when the CSS doesn't permit it. 2019-11-30 15:20:21 +00:00
Daniel Silverstone
ea142abdd0 llcache: Reload SSL certificate data from serialised store
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-11-30 14:21:41 +00:00
Daniel Silverstone
0c0b9faddd llcache: Persist SSL certificate data
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-11-30 14:21:41 +00:00
Daniel Silverstone
f49654cfc5 llcache: Support storing SSL certificate data
In order to support persisting SSL data we first have to store it
and support catching up new users.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-11-30 14:21:41 +00:00
Vincent Sanders
4a1ca97c65 make unknown content drag assert have meanigful message 2019-11-29 21:32:46 +00:00
Vincent Sanders
69236590d0 change mouse action drag handling to use a more efficient dispatch 2019-11-17 10:40:34 +00:00
Vincent Sanders
e34f9d3a38 move remaining mouse action drag handling into separate functions 2019-11-17 10:13:56 +00:00
Vincent Sanders
ae39b9f955 move more select menu handling into mouse_action_select_menu() 2019-11-17 10:12:37 +00:00
Vincent Sanders
185d034323 make mouse track and mouse action content handlers return an error code 2019-11-12 22:48:00 +00:00
Vincent Sanders
074407d251 Remove redundant drag handling for content selection
This redundant code was added by:
4747bbbfb2 HTML drags now go via content msg.
and then added again with:
c2a718075a A load of refactoring of how content selection and input work.
2019-11-12 21:54:35 +00:00
Vincent Sanders
b9bc34b875 split out html interaction header elements and rename source 2019-11-12 21:54:35 +00:00
Michael Drake
82d4a2265b Data fetcher: Include stdarg.h header. 2019-11-12 19:16:07 +00:00
Michael Drake
8ad55e23fd gif: Change how we rate-limit frames to match other browsers.
This makes the old minimum_gif_delay option unused.
2019-11-11 21:54:26 +00:00
Michael Drake
8e1154eb1c Content: Remove redundant and unused redraw message fields.
This was archaic support for rendering images as "overlays",
and avoiding a redraw via the browser window redraw and HTML
contents.  Basically it was "plot this image here", but it
was too error prone, so it was removed a long time ago.

These are some last vestiges that made the redraw message
look more complex than it is.
2019-11-11 21:54:15 +00:00
Michael Drake
db7f1f01a9 Data fetcher: Squash BSD warning. 2019-11-11 21:54:04 +00:00
Vincent Sanders
0e16c01cdc remove unecessary user warning 2019-11-10 20:32:37 +00:00
Michael Drake
ad27ed6926 llcache: Avoid putting local content in the disc cache. 2019-11-10 16:49:05 +00:00