summaryrefslogtreecommitdiff
path: root/content/handlers/html
Commit message (Collapse)AuthorAgeFilesLines
* html_script.c: html_script_exec() reqacquire script ptrDaniel Silverstone2019-06-011-0/+5
| | | | | | | | | Since executing a script can cause more scripts to be appended to the script array, and that can cause a reallocation which might move the script array, reacquire the script pointer after running the script so that we don't wander off into the reeds. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* HTML: Update selection media data for new libcss API.Michael Drake2019-05-071-4/+7
|
* HTML: Set up the CSS length measuring context in CSS pixels.Michael Drake2019-05-061-2/+2
|
* HTML: Squash error-path leaks in select box construction.Michael Drake2019-05-061-0/+2
|
* HTML: Before building the box tree, get viewport dimensions.Michael Drake2019-05-061-0/+21
|
* HTML content handler: Handle content msg for getdims.Michael Drake2019-05-061-0/+7
|
* Do not prevent reattempting conversion of HTML contentsDaniel Silverstone2019-05-061-8/+0
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* change content get_source_data interfaces to return uint8_t and size_tVincent Sanders2019-05-052-9/+9
| | | | | previously these interfaces returned char * and unsigned int which was undesirable.
* Logging: migrate and provide content interfaceDaniel Silverstone2019-05-051-1/+1
| | | | | | | | 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>
* Support content_exec for content_htmlDaniel Silverstone2019-05-051-0/+85
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* change back to unsigned long to avoid warning on gnueabihf platformsVincent Sanders2019-05-041-1/+1
|
* JS: Attribute external JS to the URI it came from in backtracesDaniel Silverstone2019-05-041-5/+8
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Clean up async/defer JS contents during parent finalisationDaniel Silverstone2019-05-041-10/+15
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* CSS: Update for change to libcss append sheet API.Michael Drake2019-05-041-1/+7
| | | | | | | | | | | | | | When appending stylesheets to the selection context, it now takes the media query string associated with the sheet, rather than the type bitfield. TODO: We need to pass all the sheets in, with their full media query string, rather than filtering it ourselves and setting the ones we pass in to "screen". Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
* CSS: Update for change to libcss select style API.Michael Drake2019-05-043-1/+4
| | | | | | | LibCSS now takes the client media spec, rather than just the media type we're selecting for. Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
* Support script insertion after conversion has begunDaniel Silverstone2019-05-043-13/+135
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* use memcpy instead of strcpy to make the dom string copy intention explicitVincent Sanders2019-03-041-4/+4
|
* validate the form button element type attribute as per specVincent Sanders2019-02-221-4/+16
| | | | | | | https://html.spec.whatwg.org/multipage/form-elements.html#attr-button-type says if the type attribute is anything but "reset" or "button" it is of "submit" type. The previous logic was incorrect and only used the button if its type was explicitly submit and noting else.
* HTML handler: Reformat passing viewport height when triggered by object.Michael Drake2019-02-171-3/+3
| | | | | | 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.
* Layout: Add debug logging to show viewport dimensions passed into layout.Michael Drake2019-02-171-0/+4
| | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
* Box construction: Don't handle IMAGE specially.Michael Drake2018-12-131-1/+0
|
* check dom call return and improve handling of missing form typeVincent Sanders2018-10-091-22/+30
|
* rewrite form_successful_controls_dom as form_dom_to_dataVincent Sanders2018-09-291-556/+883
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* gcc on openbsd is unable to reason about res variable usage and generates ↵Vincent Sanders2018-09-261-1/+1
| | | | bogus warning
* fix url encoding to be compatible with nsurl API changes.Vincent Sanders2018-09-264-152/+165
| | | | | As part of this fix the form submission error handling and reporting has been improved.
* allow comments to supress implicit fallthrough warningsVincent Sanders2018-09-071-1/+1
|
* HTML: Don't try to finish an HTML document's conversion twice.Michael Drake2018-08-271-0/+16
|
* remove warning by replacing sprintf snprintfVincent Sanders2018-08-241-1/+5
|
* remove warning by replacing strcpy with safer strncpyVincent Sanders2018-08-241-5/+11
|
* fix size_t format specifiersVincent Sanders2018-08-181-3/+4
|
* Layout: Use box helper for first child checks.glenwalker/bug_0002428Michael Drake2018-06-291-2/+2
|
* Box: Add helper to check if box is first child.Michael Drake2018-06-291-0/+11
|
* Layout: Tidy condition so it can be read.Michael Drake2018-06-291-7/+6
|
* Plotters: Expose array of font family strings to front ends.Michael Drake2018-05-231-0/+1
|
* Plotters: Change stroke width in the plot_style_t to fixed point.Michael Drake2018-05-231-1/+1
|
* Plotters: Add plot_style_fixed type, and use for font size.Michael Drake2018-05-233-5/+5
|
* clean up html content handler header useVincent Sanders2018-05-1112-68/+180
| | | | Improve header use in preperation for making browser window a corewindow
* move html and text content handlers where they belongVincent Sanders2018-05-1030-0/+27093