You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h4 id="html-event-loop"> HTML Processing Model: Event Loop</h4>
596
-
597
-
{{ResizeObserver}} processing happens inside the step 7.16 of the <a>HTML Processing Model</a> event loop.
598
-
599
-
Step 16 is currently underspecified as:
600
-
601
-
<q>For each fully active Document in docs, update the rendering or user interface of that Document and its browsing context to reflect the current state.</q>.
602
-
603
-
Existing step 16 can be fully specified as:
604
-
605
-
For each fully active Document in docs, run the following steps for that Document and its browsing contents:
606
-
607
-
1. Recalc styles
608
-
609
-
2. Update layout
610
-
611
-
3. Paint
612
-
613
-
{{ResizeObserver}} extends step 16 with resize notifications.
614
-
It tries to deliver all pending notifications by looping
615
-
until no pending notifications are available. This can cause
616
-
an infinite loop.
617
-
618
-
Infinite loop is prevented by shrinking the set of
619
-
nodes that can notify at every iteration. In each iteration,
620
-
only nodes deeper than the shallowest node in previous iteration
621
-
can notify.
622
-
623
-
An error is generated if notification loop completes, and there
624
-
are undelivered notifications. Elements with undelivered notifications
625
-
will be considered for delivery in the next loop.
626
-
627
-
628
-
Step 16 with {{ResizeObserver}} notifications is:
629
-
630
-
For each fully active Document in docs, run the following steps for that Document and its browsing context:
631
-
632
-
1. Recalc styles
633
-
634
-
2. Update layout
635
-
636
-
3. Set |depth| to 0
637
-
638
-
4. <a>Gather active resize observations at depth</a> |depth| for {{Document}}
639
-
640
-
5. Repeat while document <a>has active resize observations</a>
641
-
642
-
2. Set |depth| to <a>broadcast active resize observations</a>.
643
-
644
-
3. Recalc styles
645
-
646
-
4. Update layout
647
-
648
-
5. <a>Gather active resize observations at depth</a> |depth| for {{Document}}
649
-
650
-
6. If {{Document}}<a>has skipped resize observations</a> then <a>deliver resize loop error notification</a>
651
-
652
-
7. Update the rendering or user interface of {{Document}} and its browsing context to reflect the current state.
0 commit comments