Skip to content

Commit 5e6d849

Browse files
committed
fix getClientRects() for tables and anon block boxes
1 parent 82f332a commit 5e6d849

2 files changed

Lines changed: 41 additions & 35 deletions

File tree

cssom-view/Overview.html

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727

2828
<h1 id=cssom-view-module>CSSOM View Module</h1>
2929

30-
<h2 class="no-num no-toc" id=w3c-doctype>Editor's Draft 9 March 2008</h2>
30+
<h2 class="no-num no-toc" id=w3c-doctype>Editor's Draft 10 March 2008</h2>
3131

3232
<dl>
3333
<dt>This Version:
3434

3535
<dd><a
36-
href="http://www.w3.org/TR/2008/ED-cssom-view-20080309/">http://www.w3.org/TR/2008/ED-cssom-view-20080309/</a>
36+
href="http://www.w3.org/TR/2008/ED-cssom-view-20080310/">http://www.w3.org/TR/2008/ED-cssom-view-20080310/</a>
3737

3838
<dt>Latest Version:
3939

@@ -548,17 +548,6 @@ <h3 id=the-getclientrects><span class=secno>6.1 </span>The <code
548548
href="#clientrectlist">ClientRectList</a></code> object and stop this
549549
algorithm.
550550

551-
<li>
552-
<p>If the element on which it was invoked has a computed value for the
553-
<code>display</code> property of <code>table</code> or
554-
<code>inline-table</code> and the element has a child element with a
555-
computed value for <code>display</code> of <code>table-caption</code>
556-
return a <code><a href="#clientrectlist">ClientRectList</a></code>
557-
object containing two <code><a href="#clientrect">ClientRect</a></code>
558-
objects. The first representing the table box and the second the caption
559-
box and stop this algorithm. [<cite><a
560-
href="#ref-css21">CSS21</a></cite>]
561-
562551
<li>
563552
<p>If the element is in the <code>http://www.w3.org/2000/svg</code>
564553
namespace return a <code><a
@@ -571,11 +560,24 @@ <h3 id=the-getclientrects><span class=secno>6.1 </span>The <code
571560
<p>Return a <code><a href="#clientrectlist">ClientRectList</a></code>
572561
object containing a list of <code><a
573562
href="#clientrect">ClientRect</a></code> objects in content order
574-
describing the border boxes, including <a
575-
href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">anonymous
576-
block boxes</a> and including boxes whose height or width is zero, for
577-
the element on which it was invoked. [<cite><a
578-
href="#ref-css21">CSS21</a></cite>]
563+
describing the border boxes (including those with a height or width of
564+
zero) with the following constraints:</p>
565+
566+
<ul>
567+
<li>
568+
<p>If the element on which the method was invoked has a computed value
569+
for <code>display</code> property of <code>table</code> or
570+
<code>inline-table</code> include both the table box and the caption
571+
box, but not the anonymous container box. [<cite><a
572+
href="#ref-css21">CSS21</a></cite>]
573+
574+
<li>
575+
<p>Replace each <a
576+
href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">anonymous
577+
block boxes</a> with its child box(es) and repeat this until no
578+
anonymous block boxes are left in the final list. [<cite><a
579+
href="#ref-css21">CSS21</a></cite>]
580+
</ul>
579581
</ol>
580582

581583
<p>The <dfn

cssom-view/Overview.src.html

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -433,29 +433,33 @@ <h3>The <code title="">getClientRects()</code> and
433433
<li><p>If the element on which it was invoked does not have an associated
434434
CSS layout box return an empty <code>ClientRectList</code>
435435
object and stop this algorithm.</p></li>
436-
437-
<li><p>If the element on which it was invoked has a computed value for
438-
the <code>display</code> property of <code>table</code> or
439-
<code>inline-table</code> and the element has a child element with a
440-
computed value for <code>display</code> of <code>table-caption</code>
441-
return a <code>ClientRectList</code> object containing two
442-
<code>ClientRect</code> objects. The first representing the table box and
443-
the second the caption box and stop this algorithm.
444-
[<cite><span>CSS21</span></cite>]</p></li>
445436

446437
<li><p>If the element is in the <code>http://www.w3.org/2000/svg</code>
447438
namespace return a <code>ClientRectList</code> object containing
448439
a single <code>ClientRect</code> object that describes the bounding box
449440
of the element as defined by SVG specification.
450441
[<cite><span>SVG</span></cite>]</p></li>
451-
452-
<li><p>Return a <code>ClientRectList</code> object containing
453-
a list of <code>ClientRect</code> objects in content order
454-
describing the border boxes, including
455-
<a href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">anonymous
456-
block boxes</a> and including boxes whose height or width is zero, for
457-
the element on which it was invoked.
458-
[<cite><span>CSS21</span></cite>]</p></li>
442+
443+
<li>
444+
<p>Return a <code>ClientRectList</code> object containing a list of
445+
<code>ClientRect</code> objects in content order describing the border
446+
boxes (including those with a height or width of zero) with the
447+
following constraints:</p>
448+
449+
<ul>
450+
<li><p>If the element on which the method was invoked has a computed
451+
value for <code>display</code> property of <code>table</code> or
452+
<code>inline-table</code> include both the table box and the caption
453+
box, but not the anonymous container box.
454+
[<cite><span>CSS21</span></cite>]</p></li>
455+
456+
<li><p>Replace each
457+
<a href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">anonymous
458+
block boxes</a> with its child box(es) and repeat this until no
459+
anonymous block boxes are left in the final list.
460+
[<cite><span>CSS21</span></cite>]</p></li>
461+
</ul>
462+
</li>
459463
</ol>
460464

461465
<p>The

0 commit comments

Comments
 (0)