History log of /php-src/ext/dom/php_dom.h (Results 1 – 25 of 137)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 9cb23a3d 30-Aug-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-15654: Signed integer overflow in ext/dom/nodelist.c

There's implicit truncation casts from zend_long to int which cause
issues because checks are done against the zend_longs. Sin

Fix GH-15654: Signed integer overflow in ext/dom/nodelist.c

There's implicit truncation casts from zend_long to int which cause
issues because checks are done against the zend_longs. Since the
iterator infrastructure uses zend_longs, just convert everything to
zend_long.

Closes GH-15669.

show more ...


# 7e45e57d 23-Aug-2024 Máté Kocsis

Suppress deprecation notices when ext/dom properties are accessed by the get_debug_info handler (#15530)


# b282dd74 28-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix UAF when removing doctype and using foreach iteration

This is an old bug, but this is pretty easy to fix.
It's basically applying the same fix as I did for e878b9f.
Reported by Y

Fix UAF when removing doctype and using foreach iteration

This is an old bug, but this is pretty easy to fix.
It's basically applying the same fix as I did for e878b9f.
Reported by YuanchengJiang.

Closes GH-15143.

show more ...


# 80a4783d 18-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Deduplicate NULL checks in ext/dom (#15015)

This introduces a new helper php_dom_create_nullable_object() that does
the NULL check and puts NULL in return_value. Otherwise it runs
ph

Deduplicate NULL checks in ext/dom (#15015)

This introduces a new helper php_dom_create_nullable_object() that does
the NULL check and puts NULL in return_value. Otherwise it runs
php_dom_create_object(). This deduplicates a bit of code.

show more ...


# b3a4a6b1 17-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Resolve TODOs in ext/dom around nullable content (#14999)

It's indeed possible this is NULL. When you create a new text-like node
in libxml and pass NULL as content, you do get NULL in t

Resolve TODOs in ext/dom around nullable content (#14999)

It's indeed possible this is NULL. When you create a new text-like node
in libxml and pass NULL as content, you do get NULL in the content field
instead of the empty string. You can hit this by creating DOMText or
DOMComment directly and not passing any argument. This could also be
created internally.
We refactor the code such that this detail is hidden and we add a test
to check that it correctly throws an exception.

show more ...


# 4ef75391 09-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Split off private data from the ns mapper


# 88252353 08-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Reapply "Stop using reserved names in dom"

This reverts commit dda96768ece24cb56f09924baf9d6b9dd27ad587.


# dda96768 08-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Revert "Stop using reserved names in dom"

This reverts commit 013bc53f0cf0c55a196a4336bc7d07dcded6ed95.

This somehow breaks the Windows build. Will investigate later.


# 013bc53f 06-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Stop using reserved names in dom


# 3303c157 06-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Make some pointers const in php_dom.h


# fc09f4b2 02-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Implement Dom\TokenList (#13664)

Part of RFC: https://wiki.php.net/rfc/dom_additions_84

Closes GH-11688.


# 768900b1 12-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Implement Dom $innerHTML property


# 88da9149 27-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Implement CSS selectors


# 8dc2391b 26-May-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix bug #79701: getElementById does not correctly work with duplicate definitions

This is a long standing bug: IDs aren't properly tracked causing either
outdated or plain incorrect resu

Fix bug #79701: getElementById does not correctly work with duplicate definitions

This is a long standing bug: IDs aren't properly tracked causing either
outdated or plain incorrect results from getElementById.

This PR implements a pragmatic solution in which we still try to use the
ID lookup table to a degree, but only as a performance boost not as a
"single source of truth". Full details are explained in the
getElementById code.

Closes GH-14349.

show more ...


# ab803927 26-May-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Cleanup DOM exception throwing parameters (#14330)


# c461b600 24-May-2024 Levi Morrison

refactor: change `zend_is_true` to return `bool` (#14301)

Previously this returned `int`. Many functions actually take advantage
of the fact this returns exactly 0 or 1. For instance,

refactor: change `zend_is_true` to return `bool` (#14301)

Previously this returned `int`. Many functions actually take advantage
of the fact this returns exactly 0 or 1. For instance,
`main/streams/xp_socket.c` does:

sockopts |= STREAM_SOCKOP_IPV6_V6ONLY_ENABLED * zend_is_true(tmpzval);

And `Zend/zend_compile.c` does:

child = &ast->child[2 - zend_is_true(zend_ast_get_zval(ast->child[0]))];

I changed a few places trivially from `int` to `bool`, but there are
still many places such as the object handlers which return `int` that
should eventually be `bool`.

show more ...


# e95b06c5 12-May-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Make some more arguments const


# 1fdbb0ab 12-May-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Get rid of unused declarations


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

Factor out all common code for XML serialization and merge common paths


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

Remove unused prototype from php_dom.h


# fae25ca2 04-May-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Move dom_attr_value() into ext/libxml


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

Fix crashes when entity declaration is removed while still having entity references

libxml doesn't do reference counting inside its node types. It's
possible to remove an entity declarat

Fix crashes when entity declaration is removed while still having entity references

libxml doesn't do reference counting inside its node types. It's
possible to remove an entity declaration out of the document, but then
entity references will keep pointing to that stale declaration. This
will cause crashes.

One idea would be to check when a declaration is removed, to trigger a
hook that updates all references. However this means we have to keep
track of all references somehow, which would be a high-overhead
solution. The solution in this patch makes sure that the fields are
always updated before they are read.

Closes GH-14089.

show more ...


# 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


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

Implement HTMLCollection::namedItem()


123456