@@ -2146,6 +2146,7 @@ <h4>The <code title="">Screen</code> Interface</h4>
21462146
21472147
21482148
2149+
21492150 < h3 > The < code title =""> DocumentLayout</ code > Interface</ h3 >
21502151
21512152 < p > Objects implementing the < code > Document</ code > interface
@@ -2166,6 +2167,7 @@ <h3>The <code title="">DocumentLayout</code> Interface</h3>
21662167
21672168
21682169
2170+
21692171 < h3 > The < code title =""> ElementLayout</ code > Interface</ h3 >
21702172
21712173 < p > Objects implementing the < code > Element</ code > interface
@@ -2193,26 +2195,29 @@ <h3>The <code title="">ElementLayout</code> Interface</h3>
21932195 readonly attribute float < span > clientHeight</ span > ;
21942196};</ pre >
21952197
2198+
2199+
21962200 < h4 > The < code > getClientRects()</ code > and < code > getBoundingClientRect</ code >
21972201 methods</ h4 >
21982202
2199- <!-- XXX On block level elements TextRectangleList.length is mostly 1 (e
638D
xcept I
2200- guess for printing or so or multicol perhaps and for inline elements with
2201- multiple boxes it's the amount of boxes. -- >
2203+ < p > The < code > getClientRects() </ code > and < code > getBoundingClientRect </ code >
2204+ methods provide information about the position of the border box edges of
2205+ an element relative to the initial containing block. </ p >
22022206
22032207 < p > The
22042208 < dfn id ="elementlayout-getclientrects "> < code > getClientRects()</ code > </ dfn >
22052209 method, when invoked, < em class ="ct "> must</ em > return the result of the
22062210 following algorithm:</ p >
2207-
2211+
22082212 < ol >
22092213 < li > < p > If the element on which it was invoked does not have an associated CSS
22102214 layout box return an empty (static) < code > TextRectangleList</ code > object and
22112215 stop this algorithm.</ p > </ li >
2212-
2216+
22132217 < li > < p > Return a (static) < code > TextRectangleList</ code > object containing a
2214- list of (static) < code > TextRectangle</ code > objects describing the border
2215- boxes for the element (in content order) on which it was invoked.</ p > </ li >
2218+ list of (static) < code > TextRectangle</ code > objects in content order
2219+ describing the border boxes, even if they are empty, for the element on which
2220+ it was invoked.</ p > </ li >
22162221 </ ol >
22172222
22182223 < p > The
@@ -2228,29 +2233,20 @@ <h4>The <code>getClientRects()</code> and <code>getBoundingClientRect</code>
22282233 < code title ="textrectangle-bottom "> bottom</ code > and
22292234 < code title ="textrectangle-left "> left</ code > members are zero.</ p > </ li >
22302235
2231- < li > < p > Return a union of the rectangles returned by
2232- < code > getClientRects()</ code > method as a single < code > TextRectangle</ code >
2233- object for the element on which it was invoked.</ p > </ li >
2236+ < li > < p > Return a union of the border boxes, excluding border boxes that are
2237+ empty, returned by < code > getClientRects()</ code > method as a single
2238+ < code > TextRectangle</ code > object for the element on which it was invoked. If
2239+ all border boxes are empty let the < code title ="textrectangle-top "> top</ code >
2240+ attribute of the new < code > TextRectangle</ code > object be the value of the
2241+ < code title ="textrectangle-top "> top</ code > attribute of the first border box
2242+ in the list returned. Do likewise for
2243+ < code title ="textrectangle-left "> left</ code > and then let
2244+ < code title ="textrectangle-bottom "> bottom</ code > be equal to
2245+ < code title ="textrectangle-bottom "> top</ code > and
2246+ < code title ="textrectangle-right "> right</ code > to
2247+ < code title ="textrectangle-left "> left</ code > .</ p > </ li >
22342248 </ ol >
22352249
2236- <!--
2237- XXX
2238-
2239- - The returned rectangles do not include the bounds of any child elements
2240- that might happen to overflow (ok, this was not ambiguous in the above
2241- definition, it's just a note)
2242-
2243- - for getClientRects we return rectangles even for CSS boxes that have empty
2244- border-boxes. The left, top, right and bottom coordinates can still be
2245- meaningful.
2246-
2247- - for getBoundingClientRect, we completely ignore CSS boxes that have empty
2248- border-boxes. If all the element's CSS boxs' border-boxes are empty, then we
2249- return a rectangle whose width and height are zero and whose top and left are
2250- the top-left of the border-box for the first (content order) CSS box for the
2251- element.
2252- -->
2253-
22542250 < h5 > The < code > TextRectangleList</ code > Interface</ h5 >
22552251
22562252 < p > The < code > TextRectangleList</ code > object consists of an ordered list of
@@ -2316,6 +2312,10 @@ <h5>The <code>TextRectangle</code> Interface</h5>
23162312 the left of the initial containing block and the left of the rectangle box in
23172313 CSS pixels as number of CSS pixels assuming nothing has been scrolled.</ p >
23182314
2315+ < p class ="note "> The < code > svg:foreignObject</ code > element represents an
2316+ initial containing block for its descendents.</ p >
2317+ <!-- XXX No specification has specified this so far ... -->
2318+
23192319
23202320
23212321 < h4 > The < code title =""> offset< var title =""> *</ var > </ code > attributes</ h4 >
0 commit comments