Skip to content

Commit d8e87e2

Browse files
author
Greg Whitworth
committed
Added text to start passing new IDL info across the API
1 parent 4e3cc09 commit d8e87e2

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

resize-observer-1/Overview.bs

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ more boxes than solely the {{content-box}} ResizeObserver takes one or more of t
139139
* {{content-box}} : the {{content-box}} as defined in CSS2
140140
* {{content-box}} : the {{scrollport}} of the {{scroll container}}
141141

142-
<p class="issue">Is 'pixel-snapped-box' the best name?</p>
143-
144142
<pre class="idl">
145143
dictionary ResizeObserverOptions {
146144
(ResizeObserverSizeOptions or sequence&lt;ResizeObserverSizeOptions>) size = "content-box";
@@ -168,9 +166,7 @@ interface ResizeObserver {
168166

169167
3. Add |this| to {{Document}}'s {{Document/resizeObservers}} slot.
170168

171-
4. Set layoutBox to value provided if it is "padding-box", "border-box", "content-box". If the value is not one of these, use the default value of "content-box".
172-
173-
: <dfn method>observe(target)</dfn>
169+
: <dfn method>observe(target, options)</dfn>
174170
::
175171
Adds target to the list of observed elements.
176172

@@ -215,7 +211,9 @@ This callback delivers {{ResizeObserver}}'s notifications. It is invoked by a
215211
interface ResizeObserverEntry {
216212
readonly attribute Element target;
217213
readonly attribute DOMRectReadOnly contentRect;
218-
readonly attribute ResizeObserverSize boxSize;
214+
readonly attribute ResizeObserverSize borderBoxSize;
215+
readonly attribute ResizeObserverSize contentSize;
216+
readonly attribute ResizeObserverSize scrollSize;
219217
};
220218
</pre>
221219

@@ -225,9 +223,15 @@ interface ResizeObserverEntry {
225223
: <dfn>target</dfn>
226224
::
227225
The {{Element}} whose size has changed.
226+
: <dfn>borderBoxSize</dfn>
227+
::
228+
{{Element}}'s <a>border box rect</a> when {{ResizeObserverCallback}} is invoked.
228229
: <dfn>contentRect</dfn>
229230
::
230231
{{Element}}'s <a>content rect</a> when {{ResizeObserverCallback}} is invoked.
232+
: <dfn>scrollSize</dfn>
233+
::
234+
{{Element}}'s <a>scroll port</a> when {{ResizeObserverCallback}} is invoked.
231235
</div>
232236

233237
<div dfn-type="method" dfn-for="ResizeObserverEntry">
@@ -239,21 +243,21 @@ interface ResizeObserverEntry {
239243

240244
3. If |target| is not an SVG element do these steps:
241245

242-
1. Set |this|.|layoutBox|.width to |target|.<a>content width</a>.
246+
1. Set |this|.|contentRect|.width to |target|.<a>content width</a>.
243247

244-
2. Set |this|.|layoutBox|.height to |target|.<a>content height</a>.
248+
2. Set |this|.|contentRect|.height to |target|.<a>content height</a>.
245249

246-
3. Set |this|.|layoutBox|.top to |target|.<a>padding top</a>.
250+
3. Set |this|.|contentRect|.top to |target|.<a>padding top</a>.
247251

248-
4. Set |this|.|layoutBox|.left to |target|.<a>padding left</a>.
252+
4. Set |this|.|contentRect|.left to |target|.<a>padding left</a>.
249253

250254
4. If |target| is an SVG element do these steps:
251255

252-
1. Set |this|.|layoutBox|.top and |this|.contentRect.left to 0.
256+
1. Set |this|.|contentRect|.top and |this|.contentRect.left to 0.
253257

254-
2. Set |this|.|layoutBox|.width to |target|.<a>bounding box</a>.width.
258+
2. Set |this|.|contentRect|.width to |target|.<a>bounding box</a>.width.
255259

256-
3. Set |this|.|layoutBox|.height to |target|.<a>bounding box</a>.height.
260+
3. Set |this|.|contentRect|.height to |target|.<a>bounding box</a>.height.
257261

258262
</div>
259263

@@ -264,6 +268,8 @@ interface ResizeObserverEntry {
264268
};
265269
</pre>
266270

271+
<p class="issue">We're covering the dimensions of the extra boxes, do we want to also cover their positions?</p>
272+
267273
<h3 id="resize-observation-interface">ResizeObservation</h3>
268274
ResizeObservation holds observation information for a single {{Element}}. This
269275
interface is not visible to Javascript.

0 commit comments

Comments
 (0)