Skip to content

Commit bdd7787

Browse files
committed
Clarify that attribution rectangles use CSS pixels
1 parent 3675a56 commit bdd7787

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

index.bs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,12 @@ contexts. This allows developers to detect support for the Layout Instability AP
466466
};
467467
</pre>
468468

469+
NOTE: The {{LayoutShiftAttribution/previousRect}} and {{LayoutShiftAttribution/currentRect}}
470+
attributes report rectangles in <a>CSS pixels</a>, consistent with other Web Platform APIs
471+
such as {{Element/getBoundingClientRect()}}, {{IntersectionObserver}}, and {{ResizeObserver}}.
472+
This provides a device-independent coordinate system that simplifies correlation of layout
473+
shift measurements with other DOM measurements.
474+
469475
Each {{LayoutShiftAttribution}} is associated with a {{Node}} (its
470476
<dfn>associated node</dfn>).
471477

@@ -582,10 +588,10 @@ run the following steps:
582588
1. Set the <a>associated node</a> of |A| to |N|.
583589
1. Set the <dfn attribute for=LayoutShiftAttribution>previousRect</dfn> attribute
584590
of |A| to the smallest <a>Rectangle</a> containing the <a>previous frame visual
585-
representation</a> of |N|.
591+
representation</a> of |N|, in <a>CSS pixels</a>.
586592
1. Set the <dfn attribute for=LayoutShiftAttribution>currentRect</dfn> attribute
587593
of |A| to the smallest <a>Rectangle</a> containing the <a>visual
588-
representation</a> of |N|.
594+
representation</a> of |N|, in <a>CSS pixels</a>.
589595
1. Return |A|.
590596

591597
</div>

0 commit comments

Comments
 (0)