- Timestamp:
- 09/12/2023 03:10:19 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-processor.php
r56493 r56558 164 164 */ 165 165 private $bookmark_counter = 0; 166 167 /**168 * Refers to the currently-matched tag, if any.169 *170 * @since 6.4.0171 *172 * @var WP_HTML_Token|null173 */174 private $current_token = null;175 166 176 167 /** … … 452 443 } 453 444 454 $this-> current_token = new WP_HTML_Token(445 $this->state->current_token = new WP_HTML_Token( 455 446 $this->bookmark_tag(), 456 447 $this->get_tag(), … … 539 530 540 531 $this->reconstruct_active_formatting_elements(); 541 $this->insert_html_element( $this-> current_token );532 $this->insert_html_element( $this->state->current_token ); 542 533 $this->state->frameset_ok = false; 543 534 … … 559 550 } 560 551 561 $this->insert_html_element( $this-> current_token );552 $this->insert_html_element( $this->state->current_token ); 562 553 return true; 563 554 … … 591 582 case '-P': 592 583 if ( ! $this->state->stack_of_open_elements->has_p_in_button_scope() ) { 593 $this->insert_html_element( $this-> current_token );584 $this->insert_html_element( $this->state->current_token ); 594 585 } 595 586 … … 613 604 614 605 $this->reconstruct_active_formatting_elements(); 615 $this->insert_html_element( $this-> current_token );616 $this->state->active_formatting_elements->push( $this-> current_token );606 $this->insert_html_element( $this->state->current_token ); 607 $this->state->active_formatting_elements->push( $this->state->current_token ); 617 608 return true; 618 609 … … 634 625 case '+U': 635 626 $this->reconstruct_active_formatting_elements(); 636 $this->insert_html_element( $this-> current_token );637 $this->state->active_formatting_elements->push( $this-> current_token );627 $this->insert_html_element( $this->state->current_token ); 628 $this->state->active_formatting_elements->push( $this->state->current_token ); 638 629 return true; 639 630 … … 663 654 case '+IMG': 664 655 $this->reconstruct_active_formatting_elements(); 665 $this->insert_html_element( $this-> current_token );656 $this->insert_html_element( $this->state->current_token ); 666 657 return true; 667 658 … … 671 662 case '+SPAN': 672 663 $this->reconstruct_active_formatting_elements(); 673 $this->insert_html_element( $this-> current_token );664 $this->insert_html_element( $this->state->current_token ); 674 665 return true; 675 666 … … 797 788 public function seek( $bookmark_name ) { 798 789 $actual_bookmark_name = "_{$bookmark_name}"; 799 $processor_started_at = $this->current_token ? $this->bookmarks[ $this->current_token->bookmark_name ]->start : 0; 790 $processor_started_at = $this->state->current_token 791 ? $this->bookmarks[ $this->state->current_token->bookmark_name ]->start 792 : 0; 800 793 $bookmark_starts_at = $this->bookmarks[ $actual_bookmark_name ]->start; 801 794 $direction = $bookmark_starts_at > $processor_started_at ? 'forward' : 'backward'; … … 805 798 // When moving forwards, re-parse the document until reaching the same location as the original bookmark. 806 799 while ( $this->step() ) { 807 if ( $bookmark_starts_at === $this->bookmarks[ $this-> current_token->bookmark_name ]->start ) {800 if ( $bookmark_starts_at === $this->bookmarks[ $this->state->current_token->bookmark_name ]->start ) { 808 801 return true; 809 802 }
Note: See TracChangeset
for help on using the changeset viewer.