WordPress/wp-includes/html-api
dmsnell ede77aca35 HTML API: Report breadcrumbs properly when visiting virtual nodes.
When [58304] introduced the abililty to visit virtual nodes in the HTML document,
those being the nodes which are implied by the HTML but no explicitly present in
the raw text, a bug was introduced in the `get_breadcrumbs()` method because it
wasn't updated to be aware of the virtual nodes. Therefore it would report the
wrong breadcrumbs for virtual nodes. Since the new `get_depth()` method is based
on the same logic it was also broken for virtual nodes.

In this patch, the breadcrumbs have been updated to account for the virtual nodes
and the depth method has been updated to rely on the fixed breadcrumb logic.

Developed in https://github.com/WordPress/wordpress-develop/pull/6914
Discussed in https://core.trac.wordpress.org/ticket/61348

Follow-up to [58304].

Props dmsnell, jonsurrell, zieladam.
See #61348.

Built from https://develop.svn.wordpress.org/trunk@58588


git-svn-id: http://core.svn.wordpress.org/trunk@58035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-27 20:49:19 +00:00
..
class-wp-html-active-formatting-elements.php
class-wp-html-attribute-token.php
class-wp-html-decoder.php HTML API: Add custom text decoder. 2024-06-02 15:16:13 +00:00
class-wp-html-open-elements.php HTML API: Report breadcrumbs properly when visiting virtual nodes. 2024-06-27 20:49:19 +00:00
class-wp-html-processor-state.php
class-wp-html-processor.php HTML API: Report breadcrumbs properly when visiting virtual nodes. 2024-06-27 20:49:19 +00:00
class-wp-html-span.php
class-wp-html-stack-event.php HTML API: Add missing subclass methods to HTML Processor and add token provenance. 2024-06-25 03:11:19 +00:00
class-wp-html-tag-processor.php HTML API: Remove unused $tag_name variable in WP_HTML_Tag_Processor::set_attribute. 2024-06-25 08:53:21 +00:00
class-wp-html-text-replacement.php
class-wp-html-token.php
class-wp-html-unsupported-exception.php
html5-named-character-references.php