From 2746122326fa554c96f8c0a7abaf1301dfbf082e Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Sat, 6 Jul 2024 03:31:48 -0700 Subject: [PATCH] Undo added element support. --- .../html-api/class-wp-html-open-elements.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-open-elements.php b/src/wp-includes/html-api/class-wp-html-open-elements.php index fda99df033d5b..d1585cdea5bf5 100644 --- a/src/wp-includes/html-api/class-wp-html-open-elements.php +++ b/src/wp-includes/html-api/class-wp-html-open-elements.php @@ -237,9 +237,14 @@ public function has_element_in_scope( $tag_name ) { return $this->has_element_in_specific_scope( $tag_name, array( - 'APPLET', - 'MARQUEE', - 'OBJECT', + + /* + * Because it's not currently possible to encounter + * one of the termination elements, they don't need + * to be listed here. If they were, they would be + * unreachable and only waste CPU cycles while + * scanning through HTML. + */ ) ); } @@ -534,10 +539,7 @@ public function after_element_push( $item ) { * cases where the precalculated value needs to change. */ switch ( $item->node_name ) { - case 'APPLET': case 'BUTTON': - case 'MARQUEE': - case 'OBJECT': $this->has_p_in_button_scope = false; break;