History log of /php-src/ext/dom/element.c (Results 1 – 25 of 161)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 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


# 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


# 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


# 89ea24f6 13-Jan-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Give anonymous dom structs a name (#13135)


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


# 3e33eda3 28-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix cloning attribute with namespace disappearing namespace

Closes GH-12547.


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


# 8c2c6949 08-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Replace always-false attribute type check with assertion

The type will always be XML_ATTRIBUTE_NODE by construction via
php_dom_create_object, no need to check the type. Use an assertion

Replace always-false attribute type check with assertion

The type will always be XML_ATTRIBUTE_NODE by construction via
php_dom_create_object, no need to check the type. Use an assertion
instead. This simplifies code and reasoning about error conditions.

show more ...


# 48443183 02-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Use zend_result as return for properties in ext/dom (#12113)


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


1234567