@@ -2329,11 +2329,11 @@ <h3 id=the-elementlayout><span class=secno>4.3. </span>The <code><a
23292329 < a href ="#textrectanglelist "> TextRectangleList</ a > < a href ="#elementlayout-getclientrects "> getClientRects</ a > ();
23302330 < a href ="#textrectangle "> TextRectangle</ a > < a href ="#elementlayout-getboundingclientrect "> getBoundingClientRect</ a > ();
23312331
2332+ readonly attribute Element < a href ="#elementlayout-offsetparent "> offsetParent</ a > ;
23322333 readonly attribute float < a href ="#elementlayout-offsettop "> offsetTop</ a > ;
23332334 readonly attribute float < a href ="#elementlayout-offsetleft "> offsetLeft</ a > ;
23342335 readonly attribute float < a href ="#elementlayout-offsetwidth "> offsetWidth</ a > ;
23352336 readonly attribute float < a href ="#elementlayout-offsetheight "> offsetHeight</ a > ;
2336- readonly attribute HTMLElement < a href ="#elementlayout-offsetparent "> offsetParent</ a > ; // HTMLElement
23372337
23382338 attribute float < a href ="#elementlayout-scrolltop "> scrollTop</ a > ; // scroll on setting
23392339 attribute float < a href ="#elementlayout-scrollleft "> scrollLeft</ a > ; // scroll on setting
@@ -2356,43 +2356,56 @@ <h4 id=the-getclientrects><span class=secno>4.3.1. </span>The <code><a
23562356 multiple boxes it's the amount of boxes. -->
23572357
23582358 < p > The < dfn
2359- id =elementlayout-getclientrects > < code > getClientRects()</ code > </ dfn > method
2360- < em class =ct > must</ em > , when invoked, return a < code > < a
2361- href ="#textrectanglelist "> TextRectangleList</ a > </ code > object containing a
2362- list of < code > < a href ="#textrectangle "> TextRectangle</ a > </ code > objects
2363- describing the border boxes for the element on which it was invoked.
2359+ id =elementlayout-getclientrects > < code > getClientRects()</ code > </ dfn >
2360+ method, when invoked, < em class =ct > must</ em > return the result of the
2361+ following algorithm:
2362+
2363+ < ol >
2364+ < li >
2365+ < p > If the element on which it was invoked does not have an associated CSS
2366+ layout box return an empty (static) < code > < a
2367+ href ="#textrectanglelist "> TextRectangleList</ a > </ code > object and stop
2368+ this algorithm.
2369+
2370+ < li >
2371+ < p > Return a (static) < code > < a
2372+ href ="#textrectanglelist "> TextRectangleList</ a > </ code > object containing
2373+ a list of (static) < code > < a
2374+ href ="#textrectangle "> TextRectangle</ a > </ code > objects describing the
2375+ border boxes for the element (in content order) on which it was invoked.
2376+ </ ol >
23642377
23652378 < p > The < dfn
23662379 id =elementlayout-getboundingclientrect > < code > getBoundingClientRect()</ code > </ dfn >
2367- method < em class =ct > must</ em > , when invoked, return a union of the
2368- rectangles returned by < code > < a
2369- href ="#elementlayout-getclientrects "> getClientRects()</ a > </ code > in a
2370- single < code > < a href ="#textrectangle "> TextRectangle</ a > </ code > object for
2371- the element on which it was invoked.
2372-
2373- < p > The values of the attributes of the < code > < a
2374- href ="#textrectangle "> TextRectAngle</ a > </ code > object < em
2375- class =ct > must</ em > all be expressed in CSS pixels. They are all relative
2376- to the top left corner of the canvas (0, 0) and calculated as if nothing
2377- has been scrolled. If the element is a descendent of an
2378- < code > svg:foreignObject</ code > element the dimensions are measured
2379- relative to the origin of the nearest < code > svg:foreignObject</ code >
2380- ancestor, in the < code > svg:foreignObject</ code > subtree's CSS coordinate
2381- system.
2382-
2383- < p class =issue > ...</ p >
2380+ method, when invoked, < em class =ct > must</ em > return the result of the
2381+ following algorithm:
2382+
2383+ < ol >
2384+ < li >
2385+ < p > If the element on which it was invoked does not have an associated CSS
2386+ layout box return a (static) < code > < a
2387+ href ="#textrectangle "> TextRectangle</ a > </ code > object whose < code
2388+ title =textrectangle-top > < a href ="#textrectangle-top "> top</ a > </ code > ,
2389+ < code title =textrectangle-right > < a
2390+ href ="#textrectangle-right "> right</ a > </ code > , < code
2391+ title =textrectangle-bottom > < a
2392+ href ="#textrectangle-bottom "> bottom</ a > </ code > and < code
2393+ title =textrectangle-left > < a href ="#textrectangle-left "> left</ a > </ code >
2394+ members are zero.
2395+
2396+ < li >
2397+ < p > Return a union of the rectangles returned by < code > < a
2398+ href ="#elementlayout-getclientrects "> getClientRects()</ a > </ code > method
2399+ as a single < code > < a href ="#textrectangle "> TextRectangle</ a > </ code >
2400+ object for the element on which it was invoked.
2401+ </ ol >
23842402 <!--
23852403 XXX
23862404
23872405 - The returned rectangles do not include the bounds of any child elements
23882406 that might happen to overflow (ok, this was not ambiguous in the above
23892407 definition, it's just a note)
23902408
2391- - For HTML AREA elements, SVG elements that do not render anything
2392- themselves, display:none elements, and generally any elements that are not
2393- directly rendered, we return an empty list or a (0,0,0,0) rect (arguably this
2394- also follows from the definition)
2395-
23962409 - for getClientRects we return rectangles even for CSS boxes that have empty
23972410 border-boxes. The left, top, right and bottom coordinates can still be
23982411 meaningful.
@@ -2456,23 +2469,27 @@ <h5 id=the-textrectangle><span class=secno>4.3.1.2. </span>The <code><a
24562469
24572470 < p > The < dfn id =textrectangle-top
24582471 title =textrectangle-top > < code > top</ code > </ dfn > attribute, on getting, < em
2459- class =ct > must</ em > return the distance between the top of the viewport and
2460- the top of the rectangle box.
2472+ class =ct > must</ em > return the distance between the top of the initial
2473+ containing block and the top of the rectangle box in CSS pixels as number
2474+ of CSS pixels assuming nothing has been scrolled.
24612475
24622476 < p > The < dfn id =textrectangle-right
24632477 title =textrectangle-right > < code > right</ code > </ dfn > attribute, on getting,
2464- < em class =ct > must</ em > return the distance between the left of the
2465- viewport and the right of the rectangle box.
2478+ < em class =ct > must</ em > return the distance between the left of the initial
2479+ containing block and the right of the rectangle box in CSS pixels as
2480+ number of CSS pixels assuming nothing has been scrolled.
24662481
24672482 < p > The < dfn id =textrectangle-bottom
24682483 title =textrectangle-bottom > < code > bottom</ code > </ dfn > attribute, on
24692484 getting, < em class =ct > must</ em > return the distance between the top of the
2470- viewport and the bottom of the rectangle box.
2485+ initial containing block and the bottom of the rectangle box in CSS pixels
2486+ as number of CSS pixels assuming nothing has been scrolled.
24712487
24722488 < p > The < dfn id =textrectangle-left
24732489 title =textrectangle-left > < code > left</ code > </ dfn > attribute, on getting,
2474- < em class =ct > must</ em > return the distance between the left of the
2475- viewport and the left of the rectangle box.
2490+ < em class =ct > must</ em > return the distance between the left of the initial
2491+ containing block and the left of the rectangle box in CSS pixels as number
2492+ of CSS pixels assuming nothing has been scrolled.
24762493
24772494 < h4 id =the-offset > < span class =secno > 4.3.2. </ span > The < code
24782495 title =""> offset< var title =""> *</ var > </ code > attributes</ h4 >
0 commit comments