<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>22917</bug_id>
          
          <creation_ts>2013-08-12 10:22:42 +0000</creation_ts>
          <short_desc>&quot;If the element is the root element and the elem...&quot;</short_desc>
          <delta_ts>2013-08-12 10:36:16 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>CSSOM View</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>91880</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-08-12 10:22:42 +0000</bug_when>
    <thetext>http://dev.w3.org/csswg/cssom-view/#extensions-to-the-element-interface

[[
If the element is the root element and the element&apos;s document&apos;s browsing context is a top-level browsing context, return the viewport width excluding the size of a rendered scroll bar (if any).
]]

This needs to check for quirks mode instead of top-level browsing context.

In quirks mode, &lt;body&gt; maps to viewport
Otherwise, root maps to viewport

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2442
vs
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2443

ack:

On Mon, 05 Aug 2013 23:32:40 +0200, Pavel Curtis &lt;pavel@keltis.us&gt; wrote:

&gt; Hi, Simon.
&gt;
&gt; I noticed that, in May of this year, you added language to the CSSOM
&gt; editor&apos;s draft that changed the specified behavior for &apos;clientWidth&apos;
&gt; and &apos;clientHeight&apos; on root elements of documents inside IFRAMEs.  With
&gt; the new language, these properties only return the viewport dimensions
&gt; for root elements of documents in *top-level* browsing contexts.
&gt;
&gt; Do you remember why you made this change?  As far as I can tell,
&gt; testing on IE 10, Chrome 28, Firefox 22, and Opera 12, none of the
&gt; major browsers appear to implement this new behavior: they all return
&gt; the viewport size regardless of whether the document is in a top-level
&gt; or nested browsing context.  I was unable to find any discussion of
&gt; this issue in the www-style archives, either.
&gt;
&gt; Thanks for any light you can shed on this question!
&gt;
&gt;         Pavel</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91881</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-08-12 10:36:16 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/csswg/rev/8688f55b42f4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>