Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fixes libdom build on gcc 14 due to calloc-transposed-args warningHEADmaster | Peter Shkenev | 2024-08-10 | 1 | -1/+1 |
| | |||||
* | bindings/xml/libxml_xmlparser.c: update for libxml2 >= 2.12.0 | Michael Orlitzky | 2024-02-08 | 1 | -0/+16 |
| | | | | | | | | | | | | | | | Version 2.12.0 of libxml2 changes a few functions to return (const xmlError *) where previously they returned only (xmlError *). Compilers generally are not happy with this. For example, bindings/xml/libxml_xmlparser.c: In function 'xml_parser_start_document': bindings/xml/libxml_xmlparser.c:327:16: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 327 | xmlerr = xmlCtxtGetLastError(parser->xml_ctx); This commit adds a few #ifdefs to handle both versions of the API cleanly. It's probably not the sexiest fix, but it's simple and gets the job done. | ||||
* | bindings/xml/libxml_xmlparser.c: add stdlib.h include | Michael Orlitzky | 2024-02-08 | 1 | -0/+1 |
| | | | | | | | | This file uses malloc() but does not include stdlib.h directly. With glibc, that apparently works out just fine... but with musl, it leads to implicit declaration warnings/errors, most likely because musl does not include stdlib.h transitively via any of the other headers used by this file. | ||||
* | xmlparser/libxml: abort on dom errors | John-Mark Bell | 2023-09-17 | 2 | -83/+145 |
| | | | | | | Previously, we would carry on regardless, leaving inconsistent tree structures in our wake. Instead, give up as soon as something unexpected happens. | ||||
* | xmlparser/libxml: abort if libxml had an error | John-Mark Bell | 2023-09-17 | 1 | -0/+20 |
| | | | | | | | | | We cannot do this the intuitive way (i.e. providing a structured error callback) because, when we call on to the libxml callbacks any errors within will get reported to us but with the libxml context pointer, rather than ours. Instead, simply peek inside the context on return from the libxml handler to see if there was an error we care about. | ||||
* | bindings/xml/libxml_xmlparser.c: handle an empty document | Michael Orlitzky | 2023-08-09 | 1 | -1/+5 |
| | | | | | | | | | | | | | The xml_parser_end_document() function tries to retrieve the XML node using dom_node_get_user_data() after the parser has finished. It checks the return value of that function, but not the true result (a node pointer), which is itself passed in via a pointer. This goes wrong when the returned pointer is NULL and unusable, because the return value is always DOM_NO_ERR (meaning everything was OK). This problem manifests as a segfault (null dereference) if you try to parse an empty document using the libxml bindings. It is fixed by adding a NULL check. | ||||
* | Bindings: source is a hubbub_charset_source really | Daniel Silverstone | 2020-03-26 | 1 | -1/+1 |
| | | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org> | ||||
* | hubbub: Add fragment parser creation support | Daniel Silverstone | 2020-02-21 | 2 | -1/+120 |
| | | | | | | | In order to support innerHTML, we have to support parsing into document fragments. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org> | ||||
* | Assert instead of checking | Daniel Silverstone | 2019-05-06 | 1 | -1/+4 |
| | | | | | | | At this point, we MUST have an element created, so assert it rather than half-heartedly checking. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org> | ||||
* | Begin to support SCRIPT elements flags | Daniel Silverstone | 2019-05-04 | 1 | -0/+35 |
| | | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org> | ||||
* | Ignore http and https addresses when fetching entity refs | Chris Young | 2016-11-20 | 1 | -0/+13 |
| | | | | | The fopen() causes a requester on AmigaOS which I'm bored of hearing about. See also bug 2313 | ||||
* | Slightly better fix for afl issues | Daniel Silverstone | 2016-08-27 | 1 | -20/+15 |
| | |||||
* | fix expat parser adding comment if no node is being constructed | Vincent Sanders | 2016-08-24 | 1 | -0/+5 |
| | |||||
* | protect expat parser from null current node | Vincent Sanders | 2016-08-24 | 1 | -0/+17 |
| | |||||
* | Revert "Don't attempt to fetch external entity references blindly with fopen" | Chris Young | 2016-08-23 | 1 | -3/+35 |
| | | | | | | | It appears that this change broke the libdom tests because they expect to be able to load relative paths, and thus will not work without some external entity ref fetching system. Therefore this external entity reference fetching problem will need to have a proper fix written to resolve #2313 and avoid the security implications of not taking the base URI into account. This reverts commit 389f74b11d3f6cd54c32ffcf423cee1c9b07f845. | ||||
* | Don't attempt to fetch external entity references blindly with fopen | Chris Young | 2016-08-23 | 1 | -35/+3 |
| | | | | | | The system_id is a URI, either absolute or relative to 'base', it needs to be fetched using network calls, fopen won't work. I've put a half-working POC in chris/fetch-x-ent-ref but it needs fixing up and testing. Removing this non-working code fixes #2313 for now, but fetching of external entities will still need to be added. | ||||
* | make unused variable macro more portable in expat binding | Vincent Sanders | 2016-02-06 | 1 | -1/+1 |
| | |||||
* | make unused variable macro more portable in hubbub binding | Vincent Sanders | 2016-02-06 | 1 | -1/+1 |
| | |||||
* | Split out tag names from general string table and enum. | Michael Drake | 2016-01-27 | 1 | -5/+6 |
| | | | | | Previously these were mixed in the the document's general memoised strings. This also gives us an enum by which HTML elements can be identified. | ||||
* | Fix some doxygen warnings | Vincent Sanders | 2015-09-01 | 2 | -7/+8 |
| | |||||
* | Fix include paths for Haiku. | Adrien Destugues | 2015-03-21 | 2 | -2/+2 |
| | |||||
* | Update for new hubbub API. | Michael Drake | 2013-12-14 | 1 | -20/+0 |
| | |||||
* | add context for default action function | Vincent Sanders | 2013-02-19 | 3 | -0/+3 |
| | |||||
* | add default action fetcher to binding parameters | Vincent Sanders | 2012-12-06 | 2 | -5/+9 |
| | |||||
* | make the hubbub binding creation take a parameter struct and return standard ↵ | Vincent Sanders | 2012-12-06 | 3 | -70/+95 |
| | | | | error codes | ||||
* | Fix typos. | Michael Drake | 2012-11-07 | 1 | -1/+1 |
| | |||||
* | Intern a few more bits in the expat handler | Daniel Silverstone | 2012-11-03 | 1 | -12/+14 |
| | |||||
* | Change XML Parser API to be more sane | Daniel Silverstone | 2012-11-03 | 3 | -72/+32 |
| | |||||
* | Add some casts through void to shush the RISC OS compiler | Daniel Silverstone | 2012-11-03 | 1 | -3/+4 |
| | |||||
* | Remove unused variables | Daniel Silverstone | 2012-11-02 | 1 | -2/+0 |
| | |||||
* | Augment expat binding to support namespaced attribute values | Daniel Silverstone | 2012-11-02 | 1 | -5/+29 |
| | |||||
* | Update expat binding to cope better with namespaced tag names | Daniel Silverstone | 2012-11-02 | 1 | -2/+27 |
| | |||||
* | Move generation of id_name into document by default. Since 'id' is the most ↵ | Daniel Silverstone | 2012-11-02 | 1 | -10/+0 |
| | | | | common name of the 'id' attribute | ||||
* | alter when the id name is set to before the hubbub parse completion so id ↵ | Vincent Sanders | 2012-11-02 | 1 | -10/+16 |
| | | | | based searches work during dom creation | ||||
* | extend binding error enumeration to explicitly include hubbub errors | Vincent Sanders | 2012-10-18 | 1 | -0/+19 |
| | |||||
* | Update comment. | Michael Drake | 2012-10-11 | 1 | -6/+2 |
| | |||||
* | Mostly implement HTMLOptionElement, HTMLSelectElement. | John-Mark Bell | 2012-08-08 | 1 | -1/+11 |
| | | | | Enable HTMLOptionElement tests that pass. | ||||
* | Move document out parameter after in parameters. | John-Mark Bell | 2012-08-05 | 2 | -11/+15 |
| | |||||
* | Obtain the docuemnt object at parser creation time. | Vincent Sanders | 2012-08-05 | 2 | -24/+12 |
| | | | | Remove the unecessary document retrival API | ||||
* | fix error handling return from script completion calback | Vincent Sanders | 2012-07-31 | 1 | -3/+8 |
| | |||||
* | Fix master | Chris Young | 2012-07-29 | 1 | -2/+2 |
| | |||||
* | Change back for branch only | Chris Young | 2012-07-29 | 1 | -2/+2 |
| | |||||
* | Resynchronise hubbub binding with master | Daniel Silverstone | 2012-07-29 | 1 | -2/+2 |
| | |||||
* | Merge branch 'master' of git://git.netsurf-browser.org/libdom into ↵ | Chris Young | 2012-07-28 | 2 | -0/+31 |
|\ | | | | | | | chris/amiga-hubbub-lib-compat | ||||
| * | Allow control over parser pause state | Vincent Sanders | 2012-07-27 | 2 | -0/+31 |
| | | |||||
* | | Merge branch 'master' of git://git.netsurf-browser.org/libdom into ↵ | Chris Young | 2012-07-22 | 1 | -2/+0 |
|\| | | | | | | | chris/amiga-hubbub-lib-compat | ||||
| * | Cleanup: Remove two UNUSED()s which are not true | Daniel Silverstone | 2012-07-19 | 1 | -2/+0 |
| | | |||||
* | | Merge branch 'master' of git://git.netsurf-browser.org/libdom into ↵ | Chris Young | 2012-07-19 | 3 | -55/+269 |
|\| | | | | | | | chris/amiga-hubbub-lib-compat | ||||
| * | HTMLTextAreaElement: Make it work | Daniel Silverstone | 2012-07-18 | 1 | -0/+10 |
| | | |||||
| * | XML Binding: Allow expat handler to coalesce TEXT nodes. Core suite now ↵ | Daniel Silverstone | 2012-07-15 | 1 | -1/+35 |
| | | | | | | | | passes with expat. |