Commit b19c465
committed
HTML API: Derive removed anchor breadcrumb depth from stack position.
Scanning breadcrumbs by node name latched onto same-named foreign
elements (MathML or SVG A) between the removed HTML anchor and the
integration point, storing the wrong depth. The virtual closer then
never fired and the stale anchor breadcrumb persisted for the rest of
the document. Record the removed node's position in the stack of open
elements instead, accounting for the fragment parser's context crumb.1 parent 779e594 commit b19c465
2 files changed
Lines changed: 60 additions & 5 deletions
File tree
- src/wp-includes/html-api
- tests/phpunit/tests/html-api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2921 | 2921 | | |
2922 | 2922 | | |
2923 | 2923 | | |
2924 | | - | |
2925 | | - | |
2926 | | - | |
2927 | | - | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
2928 | 2936 | | |
| 2937 | + | |
2929 | 2938 | | |
| 2939 | + | |
2930 | 2940 | | |
2931 | 2941 | | |
2932 | | - | |
| 2942 | + | |
2933 | 2943 | | |
2934 | 2944 | | |
2935 | 2945 | | |
| |||
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
495 | 540 | | |
496 | 541 | | |
497 | 542 | | |
| |||
0 commit comments