History log of /php-src/ext/dom/php_dom.c (Results 1 – 25 of 324)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 47feb579 10-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Support named items in dimension handling for HTMLCollection

Closes GH-13937.


# b3f820b4 10-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Split off nodelist header components to nodelist.h


# 53f6e5ec 10-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Move node list dimension handling to a separate file


# 5c69b2e8 10-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Factor out reading an attribute value


# a0da32a4 07-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Cleanup and optimize attribute value reading (#13897)

When the attribute has a single text child, we can avoid an allocating
call to libxml2 and read the contents directly.

On m

Cleanup and optimize attribute value reading (#13897)

When the attribute has a single text child, we can avoid an allocating
call to libxml2 and read the contents directly.

On my i7-4790, I tested the optimization with both the $value and
$nodeValue property.

```
Summary
./sapi/cli/php bench_value.php ran
1.82 ± 0.09 times faster than ./sapi/cli/php_old bench_value.php

Summary
./sapi/cli/php bench_nodeValue.php ran
1.78 ± 0.10 times faster than ./sapi/cli/php_old bench_nodeValue.php
```

Test code:
```
$dom = new DOMDocument;
$dom->loadXML('<root attrib="this is a relatively short text"/>');
$attrib = $dom->documentElement->attributes[0];

for ($i=0; $i<1000*1000; $i++) {
$attrib->value; // or nodeValue
}
```

show more ...


# 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


# 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


# 1cb86b6f 08-Mar-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Cleanup php_dom_create_object()


# 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


# b8a1041f 25-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix reference access in dimensions for DOMNodeList and DOMNodeMap

Closes GH-13511.


# 85217a04 22-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Mark DOMXPath as uncloneable

This never resulted in a working XPath object anyway, as trying to query
or evaluate anything resulted in an "Invalid XPath context" error.
Supporting th

Mark DOMXPath as uncloneable

This never resulted in a working XPath object anyway, as trying to query
or evaluate anything resulted in an "Invalid XPath context" error.
Supporting this is more trouble than it's worth, so just block the clone
operation.

show more ...


# 9fc7be8c 10-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Use bools


# 79e31c23 10-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Don't use heap allocations for registering DOM property handlers


# f537ed9d 09-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Cleanup useless stuff in php_dom.c


# 90785dd8 12-Jan-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

[RFC] Improve callbacks in ext/dom and ext/xsl (#12627)


# 2b30f187 12-Jan-2024 Tim Düsterhus

Remove unused includes of php_random.h (#13131)

Before this change php_random.h was listed in 146 different *.dep files for a

env CC=clang ./configure --without-sqlite3 --withou

Remove unused includes of php_random.h (#13131)

Before this change php_random.h was listed in 146 different *.dep files for a

env CC=clang ./configure --without-sqlite3 --without-pdo-sqlite

build, after this change it's only listed in 110 of them, preventing uselessly
recompiling those files when working on ext/random, mostly caused by the include
in ext/standard/basic_functions.h.

show more ...


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


# 9a34b57b 20-Nov-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

ext/dom: Use zend_hash_add_new variant when registering classes and properties


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


# 7f46c87f 17-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Cleanup unused variable in php_dom.c (#12463)


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

Restore old namespace reconciliation behaviour

The xmlDOMWrapReconcileNamespaces method we used to fix the namespace
corruption issues in 8.1.21/8.2.8 caused regressions.
Primarily,

Restore old namespace reconciliation behaviour

The xmlDOMWrapReconcileNamespaces method we used to fix the namespace
corruption issues in 8.1.21/8.2.8 caused regressions.
Primarily, there is a similar corruption that the xmlReconciliateNs method
used to have in which a namespace is suddenly shifted
(SAML-Toolkits/php-saml#562) and the side-effect of removing redundant
namespaces causes problems when a specific serialization is required.

Closes GH-12308.

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)


12345678910>>...13