History log of /PHP-8.3/ext/dom/element.c (Results 1 – 25 of 159)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ab508c98 05-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix unlikely memory leak in case of namespace removal with extremely deep trees


# b2d778c3 22-Dec-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix crash when toggleAttribute() is used without a document


# 3167d076 15-Nov-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-12616: DOM: Removing XMLNS namespace node results in invalid default: prefix

The namespace data is freed and set to NULL, but there remain references
to the namespace declaration

Fix GH-12616: DOM: Removing XMLNS namespace node results in invalid default: prefix

The namespace data is freed and set to NULL, but there remain references
to the namespace declaration nodes. This (rightfully) confuses libxml2
because its invariants are broken. We also have to remove all remaining
references from the subtree. This fixes the data corruption bug.

Closes GH-12681.

show more ...


# f9a24969 27-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix #47531: No way of removing redundant xmlns: declarations

Now it's possible via removeAttribute("xmlns:prefix").
It was not possible to reuse a libxml2 function to reconcile because i

Fix #47531: No way of removing redundant xmlns: declarations

Now it's possible via removeAttribute("xmlns:prefix").
It was not possible to reuse a libxml2 function to reconcile because it
does not align with DOM behaviour.

Closes GH-12542.

show more ...


# 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.


# 08c4db7f 06-Aug-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix manually calling __construct() on DOM classes

Closes GH-11894.


# abb1d2e8 22-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix empty argument cases for DOMParentNode methods

Closes GH-11768.


# 168bc814 23-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix incorrect attribute existence check in DOMElement::setAttributeNodeNS()

Closes GH-11776.


# dbe897b7 22-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Remove useless readonly checks

These checks will always be false because we're dealing with elements
here. DOMElement always are of type XML_ELEMENT_NODE, so they don't need
to be ch

Remove useless readonly checks

These checks will always be false because we're dealing with elements
here. DOMElement always are of type XML_ELEMENT_NODE, so they don't need
to be checked.

show more ...


# c8964b9a 22-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Use xmlSetNsProp when possible to prevent parsing the name

The normal xmlSetProp() function parses the name to find the namespace.
But we don't care about the namespace in this case.


# db5e8ae6 13-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Implement DOMElement::toggleAttribute()

ref: https://dom.spec.whatwg.org/#dom-element-toggleattribute

Closes GH-11696.


# 5b5a3d79 13-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Split off some methods so they can be reused in different places


# 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 ...


# 72e2e250 13-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Implement DOMElement::id

ref: https://dom.spec.whatwg.org/#dom-element-id

Closes GH-11701.


# e8f0bdc7 13-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix ?


# 6560c9bf 13-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Implement DOMParentNode::replaceChildren()

ref: https://dom.spec.whatwg.org/#dom-parentnode-replacechildren


# b24b3510 12-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Implement DOMElement::className

ref: https://dom.spec.whatwg.org/#dom-element-classname

Closes GH-11691.


# 10d7e8dc 12-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Implement DOMElement::getAttributeNames()

ref: https://dom.spec.whatwg.org/#dom-element-getattributenames


# f04e5059 13-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Avoid allocations in DOMElement::getAttribute()


# 9880c336 13-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Avoid string allocation in dom_get_dom1_attribute() for as long as possible


# 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.


# c174ebfc 19-Jun-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM"

This reverts commit 7eb3e9cd173fbdd39e

Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM"

This reverts commit 7eb3e9cd173fbdd39eefa791aab610858e76399d.

Although the fix follows the spec, it causes issues because a lot of old
code assumes the incorrect behaviour PHP had since a long time.
We cannot do this yet, especially not in a stable release.
We revert this for the time being.
See GH-11428.

show more ...


# 7eb3e9cd 16-Jun-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM

The NULL namespace is only correct when there i

Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM

The NULL namespace is only correct when there is no default namespace
override. When there is, we need to manually set it to the empty string
namespace.

Closes GH-11428.

show more ...


# e309fd84 10-Jun-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix lifetime issue with getAttributeNodeNS()

It's the same issue that I fixed previously in GH-11402, but in a
different place.

Closes GH-11422.


1234567