Vincent Sanders
5ce8f0baf1
make text selection context an opaque interface
2020-05-23 23:33:52 +01:00
Vincent Sanders
1161029d29
remove unecessary content handler specific selection creation
2020-05-23 23:00:08 +01:00
Vincent Sanders
2ea577c47e
remove unused is_html parameter to text selection routines
2020-05-23 23:00:08 +01:00
Vincent Sanders
a8c540ea59
move content specific selection end to content handlers
2020-05-23 23:00:08 +01:00
Vincent Sanders
cfe57002fe
remove unused css length usage in selection
2020-05-23 23:00:08 +01:00
Vincent Sanders
e65e41e2d6
move content handler specific selection copying into handlers
2020-05-23 23:00:08 +01:00
Vincent Sanders
36b9262e14
split selection redraw into content handler specific implementations
2020-05-23 23:00:08 +01:00
Vincent Sanders
4cef0f955c
pass the browser window to selection click handler
...
this means the content handlers do not have to provide a separate
method to extract their browser window and it can simply be
passed in.
2020-05-20 23:17:48 +01:00
Vincent Sanders
f4e50b45c8
make free text search content handler agnostic
2020-05-12 23:22:05 +01:00
Vincent Sanders
3c7538a9f9
hoist common text search out of content handlers
2020-05-12 21:09:41 +01:00
Vincent Sanders
a8596a80ae
move free text search general interface to content.
...
needs additional cleanup to call content through handler table to
perform searches.
2020-05-10 23:22:29 +01:00
Vincent Sanders
ab952e0634
improve content header usage
2020-05-07 20:55:44 +01:00
Vincent Sanders
d9a593c984
split dom event handling into separate module
2020-05-05 20:05:37 +01:00
Vincent Sanders
1d8542166c
Clean up html content dom element insertion processing
2020-05-05 11:14:26 +01:00
Vincent Sanders
a706c69bf4
improve html content handler private headers
2020-05-02 20:47:53 +01:00
Vincent Sanders
19cd5cb3b3
add missing include
2020-05-01 21:36:50 +01:00
Vincent Sanders
479d0cb29a
remove unused available width and height parameters from html_fecth_object()
2020-04-30 22:16:41 +01:00
Vincent Sanders
e8d0ba15ad
split html box processing code
...
reduce the module size of the html box handling code by
splitting into smaller sections.
No functional code change.
2020-04-29 20:37:42 +01:00
Vincent Sanders
c0ef8ce645
clean up html box, no functionality change just cosmetic
...
split up the html box headers
tidy up the documentation comments
avoid forward declarations in normalisation implementation
2020-04-28 23:30:20 +01:00
Vincent Sanders
084861a31b
Implement javascript scheme url script https://wiki.whatwg.org/wiki/URL_schemes
2020-04-17 22:43:44 +01:00
Daniel Silverstone
cbc28d2c98
html: Also close js thread on html_stop()
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-29 14:31:42 +01:00
Daniel Silverstone
6a2ce2b3c7
HTML: Use new js_closethread()
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 10:18:30 +00:00
Daniel Silverstone
efbfaa0cb1
JS: Move ownership of jsthread from browser to htmlc
...
Since it makes more sense for the htmlc to be responsible for
when the JS thread gets destroyed, move its lifetime from the
responsibility of the browser window to the html content.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 10:00:29 +00:00
Daniel Silverstone
17b28e85c1
JS: Split concept of JS context into heap and thread
...
In preparation for proper splitting of Javascript support into
heaps and threads, this renames the types and corrects the no-js
builds to still work. At this time no substantive change in
semantics exists, and the duktape build won't work.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 18:30:41 +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
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
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
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
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
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
Vincent Sanders
b9bc34b875
split out html interaction header elements and rename source
2019-11-12 21:54:35 +00:00
Vincent Sanders
e95c11dac8
remove user warning and log error instead
2019-11-07 21:35:24 +00:00
Daniel Silverstone
524965b867
Box Conversion: Cancel conversion during html_destroy
...
If dom_to_box is still in progress when we destroy an HTML
content, we need to cancel the conversion otherwise we will
end up with a scheduled callback into infinity.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-23 21:58:07 +01:00
Michael Drake
5e45c4498c
HTML: Don't allow objects to redraw until we have a layout.
2019-08-06 09:42:37 +01:00
Daniel Silverstone
9318ee5d6a
html_begin_conversion: If we pause in completing parse, try again later.
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-05 21:29:18 +01:00
Daniel Silverstone
2be3ebd918
content: Rename content_broadcast_errorcode()
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-05 15:25:15 +01:00
Daniel Silverstone
05c6ee02d9
html: Mirror gadget values in and out of the DOM
...
Currently only supporting text input, password input, and hidden
input, along with text areas, this mirrors the text values in
and out of the DOM, allowing JS to adjust the gadget values and
for the gadget values to be interrogated from JS.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-04 22:07:42 +01:00
Vincent Sanders
3be2b98cc2
change browser_window_drop_file_at_point() to take unscaled coordinates
2019-08-04 14:24:33 +01:00
Vincent Sanders
d4c01894c2
change browser_window_get_features to use unscaled coordinates
2019-08-03 14:29:06 +01:00
Vincent Sanders
c2fa6af0ff
make content close check the content status itself
...
make content handler open and close return error status
2019-07-10 16:42:52 +01:00
Michael Drake
1c3ce67c62
HTML: Viewport width/height in length context are fixed point.
2019-06-29 21:59:15 +01:00
Daniel Silverstone
64ee8e1b00
html.c: Correct ordering for reformat time
...
Fix a minor bug where we'd likely never end up reformatting.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-05 22:59:49 +01:00
Michael Drake
b330fd9f0e
HTML: Update selection media data for new libcss API.
2019-05-07 14:01:51 +01:00
Michael Drake
51feeadcf9
HTML: Set up the CSS length measuring context in CSS pixels.
2019-05-06 21:30:05 +01:00
Michael Drake
0db71994ea
HTML: Before building the box tree, get viewport dimensions.
2019-05-06 15:38:33 +01:00
Daniel Silverstone
52ef77ceef
Do not prevent reattempting conversion of HTML contents
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-06 15:10:01 +01:00
Vincent Sanders
35bc2ccbb8
change content get_source_data interfaces to return uint8_t and size_t
...
previously these interfaces returned char * and unsigned int which was
undesirable.
2019-05-05 22:50:25 +01:00
Daniel Silverstone
8474c5d4c0
Logging: migrate and provide content interface
...
Migrate the console enums into netsurf/console.h and add
support so that contents can raise a message to log to
the console.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-05 22:17:10 +01:00