Commit 6e17503
LibWeb: Add and remove MutationObservers at specified times
In the current spec, MutationObservers are explicitly added to the
pending mutation observers list, and they are removed when that list is
cleared in the "notify mutation observers" microtask.
This solves some issues with slotchange events.
As noted, we delay actually emptying the list of pending mutation
observers until after we're finished with the "clone", because we can't
actually copy or move the intrusive list. As far as I am aware, this
should not affect behaviour because only one microtask can run at once.1 parent 37f49d5 commit 6e17503
File tree
6 files changed
+39
-34
lines changed- Libraries/LibWeb
- Bindings
- DOM
- HTML/Scripting
- Tests/LibWeb/Text/expected/wpt-import/shadow-dom
6 files changed
+39
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
726 | | - | |
| 726 | + | |
| 727 | + | |
727 | 728 | | |
| 729 | + | |
728 | 730 | | |
729 | 731 | | |
730 | 732 | | |
731 | | - | |
| 733 | + | |
732 | 734 | | |
733 | | - | |
| 735 | + | |
734 | 736 | | |
735 | 737 | | |
736 | | - | |
737 | | - | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
738 | 746 | | |
739 | 747 | | |
740 | | - | |
| 748 | + | |
741 | 749 | | |
742 | 750 | | |
743 | 751 | | |
744 | 752 | | |
745 | 753 | | |
746 | | - | |
| 754 | + | |
| 755 | + | |
747 | 756 | | |
748 | 757 | | |
749 | 758 | | |
| |||
756 | 765 | | |
757 | 766 | | |
758 | 767 | | |
759 | | - | |
| 768 | + | |
| 769 | + | |
760 | 770 | | |
761 | 771 | | |
762 | 772 | | |
| |||
772 | 782 | | |
773 | 783 | | |
774 | 784 | | |
775 | | - | |
| 785 | + | |
776 | 786 | | |
777 | 787 | | |
778 | 788 | | |
779 | 789 | | |
780 | 790 | | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
781 | 794 | | |
782 | 795 | | |
783 | 796 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 29 | + | |
34 | 30 | | |
35 | 31 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 32 | + | |
44 | 33 | | |
45 | 34 | | |
46 | 35 | | |
| |||
119 | 108 | | |
120 | 109 | | |
121 | 110 | | |
122 | | - | |
| 111 | + | |
123 | 112 | | |
124 | 113 | | |
125 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
2588 | 2589 | | |
2589 | 2590 | | |
2590 | 2591 | | |
2591 | | - | |
| 2592 | + | |
2592 | 2593 | | |
2593 | 2594 | | |
2594 | | - | |
| 2595 | + | |
2595 | 2596 | | |
2596 | 2597 | | |
2597 | | - | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
2598 | 2602 | | |
2599 | 2603 | | |
2600 | 2604 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments