#
30a0b035 |
| 30-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix references not handled correctly in C14N Closes GH-14090.
|
#
d24a04bb |
| 30-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use fast ZPP in very commonly used DOM functions (#14077) Start using fast ZPP in very commonly used DOM functions, and also try to unify some branches by using RETURN_BOOL where appropr
Use fast ZPP in very commonly used DOM functions (#14077) Start using fast ZPP in very commonly used DOM functions, and also try to unify some branches by using RETURN_BOOL where appropriate.
show more ...
|
#
3626e2d5 |
| 24-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Get rid of remaining usages of zval_try_get_string() (#14041) This isn't necessary because the cases where we use it will always succeed because the properties always have the type strin
Get rid of remaining usages of zval_try_get_string() (#14041) This isn't necessary because the cases where we use it will always succeed because the properties always have the type string|null.
show more ...
|
#
539d8d92 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use common helper macro for getting the node in property handlers
|
#
649394d3 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove redundant namespace define
|
#
d57e7a92 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use BAD_CAST consistently
|
#
6c55513e |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use true instead of 1 with php_dom_throw_error
|
#
751163d1 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Change stricterror type to bool
|
#
63bb04e5 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Simplify DOM_RET_OBJ macro
|
#
e3711af8 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Add ZPP checks in DOMNode::{__sleep,__wakeup} Closes GH-13651.
|
#
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
|
#
82897fc4 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Minor cleanup in dom_node_concatenated_name_helper() (#13639)
|
#
60518e96 |
| 18-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Update error handling when node cannot be added (#13421) This can only fail on OOM, so be consistent with the other locations and throw an INVALID_STATE_ERR.
|
#
93951cf5 |
| 24-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-13012: DOMNode::isEqualNode() is incorrect when attribute order is different Attributes (and namespace declarations) have to be compared in an unordered way. Closes GH-13
Fix GH-13012: DOMNode::isEqualNode() is incorrect when attribute order is different Attributes (and namespace declarations) have to be compared in an unordered way. Closes GH-13017.
show more ...
|
#
9c306470 |
| 04-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Handle libxml2 OOM more consistently (#11927) This is a continuation of commit c2a58ab07d, in which several OOM error handling was converted to throwing an INVALID_STATE_ERR DOMException
Handle libxml2 OOM more consistently (#11927) This is a continuation of commit c2a58ab07d, in which several OOM error handling was converted to throwing an INVALID_STATE_ERR DOMException. Some places were missed and they still returned false without an exception, or threw a PHP_ERR DOMException. Convert all of these to INVALID_STATE_ERR DOMExceptions. This also reduces confusion of users going through documentation [1]. Unfortunately, not all node creations are checked for a NULL pointer. Some places therefore will not do anything if an OOM occurs (well, except crash). On the one hand it's nice to handle these OOM cases. On the other hand, this adds some complexity and it's very unlikely to happen in the real world. But then again, "unlikely" situations have caused trouble before. Ideally all cases should be checked. [1] https://github.com/php/doc-en/issues/1741
show more ...
|
#
acbdfd24 |
| 24-Nov-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix DOMElement->prefix with empty string creates bogus prefix Closes GH-12770.
|
#
1492be52 |
| 13-Nov-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
[RFC] DOM HTML5 parsing and serialization support (#12111)
|
#
bb42b418 |
| 04-Nov-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Cleanup arguments of _php_dom_insert_fragment() (#12610)
|
#
3e33eda3 |
| 28-Oct-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix cloning attribute with namespace disappearing namespace Closes GH-12547.
|
#
24e5e4ec |
| 08-Oct-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-8996: DOMNode serialization on PHP ^8.1 PHP 8.1 introduced a seemingly unintentional BC break in ca94d55a19 by blocking the (un)serialization of DOM objects. This was done bec
Fix GH-8996: DOMNode serialization on PHP ^8.1 PHP 8.1 introduced a seemingly unintentional BC break in ca94d55a19 by blocking the (un)serialization of DOM objects. This was done because the serialization never really worked and just resulted in an empty object, which upon unserialization just resulted in an object that you can't use. Users can however implement their own serialization methods, but the commit made that impossible as the ACC flag gets passed down to the child class. An approach was tried in #10307 with a new ACC flag to selectively allow serialization with subclasses if they implement the right methods. However, that was found to be too ad hoc. Instead, let's abuse how the __sleep and __wakeup methods work to throw the exception instead. If the child class implements the __serialize / __unserialize method, then the throwing methods won't be called. Similarly, if the child class implements __sleep and __wakeup, then they're overridden and it doesn't matter that they throw. For the user, this PR has the exact same behaviour for (sub)classes that don't implement the serialization methods: an exception will be thrown. For code that previously implemented subclasses with these methods, this approach will make that code work again. This approach should be both BC preserving and unbreak user's code. Closes GH-12388. For the test: Co-authored-by: wazelin <contact@sergeimikhailov.com>
show more ...
|
#
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 ...
|
#
12790b2b |
| 24-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Extend C14N fast path to HTML documents too (#12293)
|
#
554f6596 |
| 22-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove unnecessary invalidation
|
#
5d68d619 |
| 22-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement #53655: Improve speed of DOMNode::C14N() on large XML documents The XPath query is in accordance to spec [1]. However, we can do it in a simpler way. We can use a custom callba
Implement #53655: Improve speed of DOMNode::C14N() on large XML documents The XPath query is in accordance to spec [1]. However, we can do it in a simpler way. We can use a custom callback function instead of a linear search in XPath to check if a node is visible. Note that comment nodes are handled internally by libxml2 already, so we do not need to differentiate between node types. The callback will do an upwards traversal of the tree until the root of the canonicalization is reached. In practice this will speed up the application a lot. [1] https://www.w3.org/TR/2001/REC-xml-c14n-20010315 section 2.1 Closes GH-12278.
show more ...
|
#
0ea268b5 |
| 09-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove obsolete libxml2 code LIBXML2_NEW_BUFFER is always defined since libxml2 2.9.0. That's the minimum version PHP requires, so it will always be defined.
|