#
5c69b2e8 |
| 10-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Factor out reading an attribute value
|
#
78ccea4e |
| 10-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-13863: Removal during NodeList iteration breaks loop The list is live, so upon cache invalidation we should rewalk the tree to sync the index again with the node list. We keep the
Fix GH-13863: Removal during NodeList iteration breaks loop The list is live, so upon cache invalidation we should rewalk the tree to sync the index again with the node list. We keep the legacy behaviour for the old DOM classes. Closes GH-13934.
show more ...
|
#
15259a0a |
| 02-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Factor out common "first container's child" code
|
#
fc9b58f6 |
| 02-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove duplicated code for entity vs notation handling
|
#
e1630381 |
| 20-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-13764: xsl cannot build on PHP 8.4 (#13770) Move some of the DOM APIs from the non-public php_dom.h header to the public header xml_common.h.
|
#
751163d1 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Change stricterror type to bool
|
#
14b6c981 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
[RFC] Add a way to opt-in ext/dom spec compliance (#13031) RFC: https://wiki.php.net/rfc/opt_in_dom_spec_compliance
|
#
90785dd8 |
| 12-Jan-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
[RFC] Improve callbacks in ext/dom and ext/xsl (#12627)
|
#
e658f805 |
| 06-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-12870: Creating an xmlns attribute results in a DOMException There were multiple things here since forever, see the GH thread [1] for discussion. There were already many
Fix GH-12870: Creating an xmlns attribute results in a DOMException There were multiple things here since forever, see the GH thread [1] for discussion. There were already many fixes to this function previously, and as a consequence of one of those fixes this started throwing exceptions for a correct use-case. It turns out that even when reverting to the previous behaviour there are still bugs. Just fix all of them while we have the chance. [1] https://github.com/php/php-src/issues/12870 Closes GH-12888.
show more ...
|
#
1492be52 |
| 13-Nov-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
[RFC] DOM HTML5 parsing and serialization support (#12111)
|
#
3e33eda3 |
| 28-Oct-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix cloning attribute with namespace disappearing namespace Closes GH-12547.
|
#
eebc528c |
| 01-Oct-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix broken cache invalidation with deallocated and reallocated document node The original caching implementation had an oversight in combination with the new lifetime management in DOM f
Fix broken cache invalidation with deallocated and reallocated document node The original caching implementation had an oversight in combination with the new lifetime management in DOM for 8.3. The modification counter is stored on the document object itself, but as that can get deallocated when all references disappear, stale cache data can be used. Normally this isn't a problem, unless getElementsByTagName is called not on the document but on a child node. Fix it by moving caching data into the ref object, which will outlive all nodes from a document even if the document object disappears. Closes GH-12338.
show more ...
|
#
ac62eee8 |
| 08-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove DOM_NO_ARGS() and DOM_NOT_IMPLEMENTED() (#12147) DOM_NO_ARGS() has no users. DOM_NOT_IMPLEMENTED() has a single user.
|
#
d46dc569 |
| 23-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix various namespace prefix conflict resolution bugs and namespace shift bugs There are two linked issues: - Conflicts couldn't be resolved by changing the prefix name. - Lacki
Fix various namespace prefix conflict resolution bugs and namespace shift bugs There are two linked issues: - Conflicts couldn't be resolved by changing the prefix name. - Lacking a prefix would shift the namespace as the default namespace, causing elements to suddenly become part of the namespace instead of the attributes. The output could still be improved by removing redundant namespace declarations, but that's another issue. At least the output is correct now. Closes GH-11777.
show more ...
|
#
bb092ab4 |
| 06-Aug-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix #80927: Removing documentElement after creating attribute node: possible use-after-free Closes GH-11892.
|
#
a73f38f4 |
| 17-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement DOMElement::insertAdjacent{Element,Text} (#11700) * Implement DOMElement::insertAdjacent{Element,Text} ref: https://dom.spec.whatwg.org/#dom-element-insertadjacentelement
Implement DOMElement::insertAdjacent{Element,Text} (#11700) * Implement DOMElement::insertAdjacent{Element,Text} ref: https://dom.spec.whatwg.org/#dom-element-insertadjacentelement ref: https://dom.spec.whatwg.org/#dom-element-insertadjacenttext Closes GH-11700.
show more ...
|
#
d38cc9b9 |
| 11-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement DOMNode::isConnected and DOMNameSpaceNode::isConnected ref: https://dom.spec.whatwg.org/#dom-node-isconnected Closes GH-11677.
|
#
6560c9bf |
| 13-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement DOMParentNode::replaceChildren() ref: https://dom.spec.whatwg.org/#dom-parentnode-replacechildren
|
#
b3899eb5 |
| 12-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Refactor dom_node_node_name_read() to avoid double allocation We will use this helper later outside of the node name read handler.
|
#
87e7b61d |
| 02-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Cleanup macro usage in ext/dom and ext/libxml With the new lifetime system in place, we can simplify some macros.
|
#
941a7e59 |
| 26-Jun-2023 |
nielsdos <7771979+nielsdos@users.noreply.github.com> |
Avoid allocation when getting the node content, if possible Closes GH-11543.
|
#
9f7d8880 |
| 17-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix #80332: Completely broken array access functionality with DOMNamedNodeMap The problem is the usage of zval_get_long(). In particular, if the string is non-numeric the result of zval_
Fix #80332: Completely broken array access functionality with DOMNamedNodeMap The problem is the usage of zval_get_long(). In particular, if the string is non-numeric the result of zval_get_long() will be 0 without giving an error or warning. This is misleading for users: users get the impression that they can use strings to access the map because it coincidentally works for the first item (which is at index 0). Of course, this fails with any other index which causes confusion and bugs. This patch adds proper support for using string offsets while accessing the map. It does so by detecting if it's a non-numeric string, and then using the getNamedItem() method instead of item(). I had to split up the array access implementation code for DOMNodeList and DOMNamedNodeMap first to be able to do this. Closes GH-11468.
show more ...
|
#
f2d673fb |
| 08-Jun-2023 |
nielsdos <7771979+nielsdos@users.noreply.github.com> |
Fix #70359 and #78577: segfaults with DOMNameSpaceNode * Fix type confusion and parent reference * Manually manage the lifetime of the parent * Add regression tests * Break out t
Fix #70359 and #78577: segfaults with DOMNameSpaceNode * Fix type confusion and parent reference * Manually manage the lifetime of the parent * Add regression tests * Break out to a helper, and apply the use-after-free fix to xpath Closes GH-11402.
show more ...
|
#
74910b14 |
| 22-Dec-2022 |
Tim Starling |
Factor out dom_remove_all_children() A few callers remove all children of a node. The way it was done in node.c was unsafe, because it left nodep->last dangling. It just happens to n
Factor out dom_remove_all_children() A few callers remove all children of a node. The way it was done in node.c was unsafe, because it left nodep->last dangling. It just happens to not crash if xmlNodeSetContent() is called immediately afterwards.
show more ...
|
#
a7202682 |
| 05-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use uint32_t for the number of nodes (#11371)
|