path: root/render/html.c
Commit message (Collapse)AuthorAgeFilesLines
* move html and text content handlers where they belongVincent Sanders2018-05-101-2467/+0
* CSS utils: Handle new units in length conversion routines.Michael Drake2018-01-051-4/+11
| | | | | This causes a ripple effect of all the callsites needing information they didn't have.
* Fixup everything the semantic patch missedVincent Sanders2017-09-071-1/+1
* Use coccinelle to change logging macro calls in c filesVincent Sanders2017-09-061-34/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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);
* Content API: Make content_broadcast take pointer to content_msg_data.Michael Drake2017-08-261-4/+5
* HTML handler: Avoid unnecessary dom_string_caseless_isequal call.Michael Drake2017-06-101-9/+11
* HTML content handler: Don't let aborted contents get stuck in LOADING.Michael Drake2017-03-231-0/+1
| | | | | | | Previously, aborted HTML fetches left the content in LOADING state, and the hlcache clean code does not clean contents in the LOADING state. They, and their child contents ended up stuck in the cache forever.
* Improve content logging with content IDs (pointer values).Michael Drake2017-03-231-5/+9
| | | | This makes it easier to track a content by its ID through a log.
* rationalise use of utils/utils.h headerVincent Sanders2017-01-191-0/+1
* Style: Fix ignoring of STYLE elements with non-screen media.Michael Drake2016-09-241-0/+3
| | | | | | | | | | | | | | | | | | We were handling the STYLE tag getting added in the dom_default_action_DOMSubtreeModified_cb callback, however, the media attribute dadn't been added by that point. We now check it in the dom_default_action_DOMNodeInserted_cb callback, at which time the media attribute is available for checking. Note, we should probably store the media type in the html_stylesheet structure, but for now we just have an `unused` boolean. Also, it may be possible to optimise to avoid parsing non- screen media STYLE element data if we could detect the media earlier.
* make html content line parsing use no locale dependant ascii processingVincent Sanders2016-09-121-7/+7
* Update content to split public and internal APIVincent Sanders2016-06-061-6/+5
* move desktop window header into public APIVincent Sanders2016-05-301-1/+1
* move layout header into public APIVincent Sanders2016-05-301-1/+1
* move misc header into public APIVincent Sanders2016-05-301-1/+1
* move utf8 header into public APIVincent Sanders2016-05-301-1/+1
* move bitmap API header to core include directoryVincent Sanders2016-05-261-1/+1
* move image content handlers to accomodate core build changesVincent Sanders2016-05-231-1/+1
* remove all core usage of warn_user APIVincent Sanders2016-04-261-1/+2
* split out the layout glyph sizing and splitting APIVincent Sanders2016-04-231-2/+2
| | | | | This refactors the core "font" sizing API to be handled through gui function tables similar to every other core/frontend calling API.
* Split utils header into string functions and everything elseVincent Sanders2016-04-211-0/+1
| | | | | split out the string handling API from the rest of the utils header and fix up all the fallout.
* implement tsla code review points in render monotonic time changeVincent Sanders2016-04-201-15/+16
* use monotonic clock call for html reflow timingVincent Sanders2016-04-201-6/+13
* HTML: Remove some status bar updating code.Michael Drake2016-02-101-11/+0
* Simplify special element handling in node inserted callback.Michael Drake2016-01-291-31/+31
* Ensure we do on-demand JS context creation only when JS is enabled.Michael Drake2016-01-211-13/+16
| | | | | | | | | | | An alternative approach which may be better would be to create the JavaScript context when the html_content is created, rather than on demand. This code checks for the JS context and creates one every time we add a node to the DOM. So when JS is on, every doc with a single node in it has a JS context. This seems to make on-demand creation a redundant overhead.
* Fix place where we're calling a js_* fn without checking for context.Michael Drake2016-01-211-1/+3
* Ensure constant javascript_enabled for HTML contents.Michael Drake2016-01-211-2/+3
| | | | | | | | | | | | | | | | Now we take the value of the javascript_enabled option when the content is created. We then use the content's script_enabled boolean everywhere else. This prevents us getting inconsistent values for javascript_enabled if a user toggles the setting while a page is loading. It was read frequently during box construction, and also the parser's script enabled setting could change where we handled a change of encoding. Now we only care about the setting of the javascript_enabled option at time of html_content creation.
* Add fire_dom_event, it's in a bad place but we can move it laterDaniel Silverstone2015-10-311-0/+34
* Shunt the handling of new elementsDaniel Silverstone2015-10-311-3/+4
* Initial work toward JS event supportDaniel Silverstone2015-10-311-0/+14
* It's not a hubbub errorDaniel Silverstone2015-08-121-1/+2
* Store the HTML content as userdata on the DOM's HTMLDocumentDaniel Silverstone2015-08-091-0/+53
* fixup all the remaining logging macro callsitesVincent Sanders2015-05-281-1/+1
| | | | | The semantic patch tool appears to have missed some difficult to reason about callsites which have now been manually cleaned up
* Change LOG() macro to be varadicVincent Sanders2015-05-281-20/+20
| | | | | | | | | | | | 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.
* Ensure result of ftell is checked for errorsVincent Sanders2015-04-261-0/+6
| | | | | | | | The ftell call in the html renderer handling of drag and drop was not checking its return value for errors which could have resulted in attempting to read -1 bytes. coverity 1251038
* Add invalidate API to html content script handling and use it.Vincent Sanders2015-03-091-11/+21
| | | | | | | | | | The html content script handling needs to invalidate its JavaScript context when the browsing context (browser_window) containing it is either closed or the content fetch is aborted (stopped) Previously the invalidation was only done on browser_window close which resulted in use after free crashes because of the now invalid JavaScript context.
* clear the html content reference to javascript context.Vincent Sanders2015-03-061-0/+8
| | | | | | | | | | | | When the browser window is about to be destroyed html_close gets called indicating the browser_window previously associated with the html content is about to become invalid. This makes the javascript context invalid within the html content (it is held by the browser window) when that context is about to be destroyed. Previously the javascript children would continue to attempt to use the context after it had been destroyed causing all sorts of strange errors and failures.
* cleanup Doxygen warningsVincent Sanders2014-11-121-23/+19
* Doxygen cleanupsVincent Sanders2014-11-121-2/+3
* Make most of the form API internal to the html renderer.Vincent Sanders2014-11-111-1/+1
| | | | | | Very little of the form API needed exposing outside of the renderer. This makes the form API that may be used by frontends obvious and limited.
* Fix reference to local variable outside scope (fixes coverity 1251161)Vincent Sanders2014-11-101-1/+1
* Improve content encoding information APIVincent Sanders2014-11-071-15/+7
| | | | | Extend the content_get_encoding() API to retrieve the source of the encoding as well as the actual encoding.
* Allow content handlers to have debug values set through APIVincent Sanders2014-11-061-1/+18
| | | | | | | | Previously content handler debugging features were accessed by global variables. This allows the setting of debugging parameters via a content API giving per content control over debugging features. Currently only used by the html content handler to toggle global redraw debugging.
* Make the fetching of a contents encoding generic.Vincent Sanders2014-11-051-5/+6
| | | | | | | The frontends previously had to use an html renderer API to get the encoding of a content. This also required the explicit checking of the contents type rather than using the existing content API to abstract this knowledge.
* Change contextual content retrieval to browser features.Vincent Sanders2014-11-021-17/+19
| | | | | | | | | | | | | Update the API which allows frontends to acquire the page features (images, link urls or form elements) present at the given coordinates within a browser window. By making this an explicit browser_window API and using the browser.h header for the associated data structure with a more appropriate API naming the usage is much more obvious and contained. Additionally the link url is now passed around as a nsurl stopping it being converted from nsurl to text and back again several times.
* remove unecessary browser.h include from core headersVincent Sanders2014-10-171-0/+1
* Update the core to use the split operations table headersVincent Sanders2014-10-161-1/+2
| | | | Second in the series to decouple the core API usage from the frontends.
* Put the font operations table alongside all the other core APIVincent Sanders2014-10-131-1/+1
| | | | | | | | | | | | The netsurf core is driven from numerous operation tables most of which are now set through a common netsurf_register() interface. The font and plotting interfaces are currently separate and unlike all the other operation tables are modified for differing contexts. This change moves the font operations alongside all the other operations table and remove unnecessary interaction with the renderers font internals. Further this also removes the need for css internals to be visible in frontends.
* Redraws during layout are prohibited, and redundant.Michael Drake2014-09-271-0/+5