[wp-trac] [WordPress Trac] #61348: HTML API: Report real and virtual nodes in the HTML Processor.
WordPress Trac
noreply at wordpress.org
Thu Jun 27 20:57:47 UTC 2024
#61348: HTML API: Report real and virtual nodes in the HTML Processor.
-------------------------------------------------+-------------------------
Reporter: dmsnell | Owner: dmsnell
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.6
Component: HTML API | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs-dev- | Focuses:
note dev-feedback |
-------------------------------------------------+-------------------------
Comment (by dmsnell):
Requesting backport into 6.6, fixing a bug introduced during the 6.6
release cycle.
I prepared a commit message, in case it helps.
{{{
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
Reviewed by jonsurrell, zieladam.
Merges [58588] to the 6.6 branch.
Follow-up to [58304].
Props dmsnell, hellofromtonya, joemcgill, jonsurrell, zieladam.
Fixes #61348.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61348#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list