Skip to content

Commit f769473

Browse files
author
Simon Pieters
committed
[cssom-view] clientWidth/Height depend on quirks mode, not top-leveledness. https://www.w3.org/Bugs/Public/show_bug.cgi?id=22917
1 parent cfa1747 commit f769473

2 files changed

Lines changed: 20 additions & 12 deletions

File tree

cssom-view/Overview.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<h1>CSSOM View Module</h1>
1818

19-
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 27 June 2013</h2>
19+
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 12 August 2013</h2>
2020

2121
<dl>
2222

@@ -83,7 +83,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2>
8383
can be found in the <a href="http://www.w3.org/TR/">W3C technical reports
8484
index at http://www.w3.org/TR/.</a></em>
8585

86-
<p>This is the 27 June 2013 Editor's Draft of CSSOM View. Please send
86+
<p>This is the 12 August 2013 Editor's Draft of CSSOM View. Please send
8787
comments to
8888
<a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a>
8989
(<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
@@ -1032,18 +1032,21 @@ <h2 id="extensions-to-the-element-interface"><span class="secno">7 </span>Extens
10321032
<p>The <dfn id="dom-element-clientwidth" title="dom-Element-clientWidth"><code>clientWidth</code></dfn> attribute must run these steps:
10331033
<ol>
10341034
<li><p>If the element has no associated <a href="#css-layout-box">CSS layout box</a> or if the <a href="#css-layout-box">CSS layout box</a> is inline, return zero.
1035-
<li><p>If the element is the root element and the element's document's <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> is a
1036-
<a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#top-level-browsing-context">top-level browsing context</a>, return the <a href="#viewport">viewport</a> width excluding the size of a rendered scroll bar (if
1037-
any).
1035+
<li><p>If the element is the root element and the element's document is not in <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, or
1036+
if the element is <a href="#the-html-body-element">the HTML <code title="">body</code> element</a> and the element's document <em>is</em> in
1037+
<a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, return the <a href="#viewport">viewport</a> width excluding the size of a rendered scroll bar
1038+
(if any).
10381039
<li><p>Return the width of the <a href="#padding-edge">padding edge</a> excluding the width of any rendered scrollbar between the <a href="#padding-edge">padding edge</a> and the
10391040
<a href="#border-edge">border edge</a>.
10401041
</ol>
10411042

10421043
<p>The <dfn id="dom-element-clientheight" title="dom-Element-clientHeight"><code>clientHeight</code></dfn> attribute must run these steps:
10431044
<ol>
10441045
<li><p>If the element has no associated <a href="#css-layout-box">CSS layout box</a> or if the <a href="#css-layout-box">CSS layout box</a> is inline, return zero.
1045-
<li><p>If the element is the root element and the element's document's <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> is a
1046-
<a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#top-level-browsing-context">top-level browsing context</a>, return the <a href="#viewport">viewport</a> height excluding the size of a rendered scroll bar (if any).
1046+
<li><p>If the element is the root element and the element's document is not in <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, or
1047+
if the element is <a href="#the-html-body-element">the HTML <code title="">body</code> element</a> and the element's document <em>is</em> in
1048+
<a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, return the <a href="#viewport">viewport</a> height excluding the size of a rendered scroll
1049+
bar (if any).
10471050
<li><p>Return the height of the <a href="#padding-edge">padding edge</a> excluding the height of any rendered scrollbar between the <a href="#padding-edge">padding edge</a> and the
10481051
<a href="#border-edge">border edge</a>.
10491052
</ol>
@@ -1578,6 +1581,7 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2>
15781581
Michael Dyck,
15791582
Mike Wilson,
15801583
Morten Stenshorne,
1584+
Pavel Curtis,
15811585
Peter-Paul Koch,
15821586
Rachel Kmetz,
15831587
Robert O'Callahan,

cssom-view/Overview.src.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -994,18 +994,21 @@ <h2>Extensions to the <code title>Element</code> Interface</h2>
994994
<p>The <dfn title=dom-Element-clientWidth><code>clientWidth</code></dfn> attribute must run these steps:
995995
<ol>
996996
<li><p>If the element has no associated <span>CSS layout box</span> or if the <span>CSS layout box</span> is inline, return zero.
997-
<li><p>If the element is the root element and the element's document's <span data-anolis-spec=html>browsing context</span> is a
998-
<span data-anolis-spec=html>top-level browsing context</span>, return the <span>viewport</span> width excluding the size of a rendered scroll bar (if
999-
any).
997+
<li><p>If the element is the root element and the element's document is not in <span data-anolis-spec=dom title=concept-document-quirks>quirks mode</span>, or
998+
if the element is <span>the HTML <code title>body</code> element</span> and the element's document <em>is</em> in
999+
<span data-anolis-spec=dom title=concept-document-quirks>quirks mode</span>, return the <span>viewport</span> width excluding the size of a rendered scroll bar
1000+
(if any).
10001001
<li><p>Return the width of the <span>padding edge</span> excluding the width of any rendered scrollbar between the <span>padding edge</span> and the
10011002
<span>border edge</span>.
10021003
</ol>
10031004

10041005
<p>The <dfn title=dom-Element-clientHeight><code>clientHeight</code></dfn> attribute must run these steps:
10051006
<ol>
10061007
<li><p>If the element has no associated <span>CSS layout box</span> or if the <span>CSS layout box</span> is inline, return zero.
1007-
<li><p>If the element is the root element and the element's document's <span data-anolis-spec=html>browsing context</span> is a
1008-
<span data-anolis-spec=html>top-level browsing context</span>, return the <span>viewport</span> height excluding the size of a rendered scroll bar (if any).
1008+
<li><p>If the element is the root element and the element's document is not in <span data-anolis-spec=dom title=concept-document-quirks>quirks mode</span>, or
1009+
if the element is <span>the HTML <code title>body</code> element</span> and the element's document <em>is</em> in
1010+
<span data-anolis-spec=dom title=concept-document-quirks>quirks mode</span>, return the <span>viewport</span> height excluding the size of a rendered scroll
1011+
bar (if any).
10091012
<li><p>Return the height of the <span>padding edge</span> excluding the height of any rendered scrollbar between the <span>padding edge</span> and the
10101013
<span>border edge</span>.
10111014
</ol>
@@ -1520,6 +1523,7 @@ <h2 class="no-num">Acknowledgments</h2>
15201523
Michael Dyck,
15211524
Mike Wilson,
15221525
Morten Stenshorne,
1526+
Pavel Curtis,
15231527
Peter-Paul Koch,
15241528
Rachel Kmetz,
15251529
Robert O'Callahan,

0 commit comments

Comments
 (0)