@@ -620,12 +620,12 @@ run these steps:
620
620
<h4 id='calculate-intersection-rect-algo'>
621
621
Compute the Intersection of a Target Element and the Root</h4>
622
622
623
- To <dfn>compute the intersection</dfn> between a <a>target</a> and the observer's <a>intersection root</a> ,
623
+ To <dfn>compute the intersection</dfn> between a <a>target</a> |target| and an <a>intersection root</a> |root| ,
624
624
run these steps:
625
625
626
- 1. Let |intersectionRect| be the result of running the {{Element/getBoundingClientRect()}} algorithm on the <a> target</a> .
627
- 2. Let |container| be the <a>containing block</a> of the <a> target</a> .
628
- 3. While |container| is not the <a>intersection root</a> :
626
+ 1. Let |intersectionRect| be the result of running the {{Element/getBoundingClientRect()}} algorithm on | target| .
627
+ 2. Let |container| be the <a>containing block</a> of | target| .
628
+ 3. While |container| is not | root| :
629
629
1. If |container| is the {{document}} of a <a>nested browsing context</a> ,
630
630
update |intersectionRect| by clipping to the <a>viewport</a>
631
631
of the {{document}} , and update |container| to be
@@ -637,9 +637,9 @@ run these steps:
637
637
update |container| to be the <a>browsing context</a> 's {{document}} ;
638
638
otherwise, update |container| to be the <a>containing block</a>
639
639
of |container|.
640
- 4. Map |intersectionRect| to the coordinate space of the <a>intersection root</a> .
640
+ 4. Map |intersectionRect| to the coordinate space of | root| .
641
641
5. Update |intersectionRect| by intersecting it with the <a>root intersection rectangle</a> .
642
- 6. Map |intersectionRect| to the coordinate space of the <a>viewport</a> of the {{document}} containing the <a> target</a> .
642
+ 6. Map |intersectionRect| to the coordinate space of the <a>viewport</a> of the {{document}} containing | target| .
643
643
7. Return |intersectionRect|.
644
644
645
645
<h4 id='update-intersection-observations-algo'>
@@ -667,11 +667,11 @@ To <dfn>run the update intersection observations steps</dfn> for a
667
667
in the <a>containing block chain</a> , skip to step 11.
668
668
4. Set |targetRect| to the {{DOMRectReadOnly}} obtained
669
669
by running the {{Element/getBoundingClientRect()}} algorithm on |target|.
670
- 5. Set |intersectionRect| to the result of running the <a>compute the intersection</a>
671
- algorithm on |target|.
672
- 6 . Let |targetArea| be |targetRect|'s area.
673
- 7 . Let |intersectionArea| be |intersectionRect|'s area.
674
- 8. Set |isIntersecting| to true if |targetRect| and |rootBounds| intersect or are edge-adjacent,
670
+ 4. Let |intersectionRect| be the result of running the <a>compute the intersection</a>
671
+ algorithm on |target| and |observer|'s <a>intersection root</a> .
672
+ 5 . Let |targetArea| be |targetRect|'s area.
673
+ 6 . Let |intersectionArea| be |intersectionRect|'s area.
674
+ 7. Let |isIntersecting| be true if |targetRect| and |rootBounds| intersect or are edge-adjacent,
675
675
even if the intersection has zero area (because |rootBounds| or |targetRect| have
676
676
zero area).
677
677
9. If |targetArea| is non-zero, let |intersectionRatio| be |intersectionArea| divided by |targetArea|.<br>
0 commit comments