From 6d73ceed7a12f0255457c04ebebd260c7849c9ac Mon Sep 17 00:00:00 2001
From: Daniel Libby ResizeObserverEntry
-[Exposed=Window, Constructor(Element target)]
+[Exposed=Window]
interface ResizeObserverEntry {
readonly attribute Element target;
readonly attribute DOMRectReadOnly contentRect;
@@ -284,36 +284,6 @@ which will correspond to the dimensions of the first column.
A future version of this spec will extend the returned sequences to contain the per-fragment size information.
interface ResizeObserverSize { readonly attribute unrestricted double inlineSize; @@ -456,6 +426,36 @@ To determine if {{Document}} has skipped observations run these steps 2. return false. ++Create and populate a ResizeObserverEntry +
+To create and populate a ResizeObserverEntry for a given |target|, +run these steps: +1. Let |this| be a new {{ResizeObserverEntry}}. + +2. Set |this|.{{ResizeObserverEntry/target}} slot to |target|. + +3. Set |this|.{{ResizeObserverEntry/borderBoxSize}} slot to result of + computing size given |target| and observedBox of "border-box". + +4. Set |this|.{{ResizeObserverEntry/contentBoxSize}} slot to result of + computing size given |target| and observedBox of "content-box". + +5. Set |this|.{{ResizeObserverEntry/devicePixelContentBoxSize}} slot to result of + computing size given |target| and observedBox of "device-pixel-content-box". + +6. Set |this|.{{ResizeObserverEntry/contentRect}} to logical |this|.{{ResizeObserverEntry/contentBoxSize}} given |target| and observedBox of "content-box". + +7. If |target| is not an SVG element do these steps: + + 1. Set |this|.|contentRect|.top to |target|.padding top. + + 2. Set |this|.|contentRect|.left to |target|.padding left. + +8. If |target| is an SVG element do these steps: + + 1. Set |this|.|contentRect|.top and |this|.contentRect.left to 0. +Broadcast active observations
broadcast active observations delivers all active observations @@ -474,7 +474,7 @@ run these steps: 3. For each |observation| in {{ResizeObserver/activeTargets}} perform these steps: - 1. Let |entry| be new {{ResizeObserverEntry}}(|observation|.target) + 1. Let |entry| be the result of running create and populate a {{ResizeObserverEntry}} given |observation|.{{ResizeObservation/target}}. 2. Add |entry| to |entries|.