Skip to content

Commit 51b9f3d

Browse files
committed
define the Screen interface
1 parent 6546486 commit 51b9f3d

2 files changed

Lines changed: 145 additions & 29 deletions

File tree

cssom/Overview.html

Lines changed: 77 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
<div class=head>
3030
<h1 id=cssom>Cascading Style Sheets Object Model (<abbr>CSSOM</abbr>)</h1>
3131

32-
<h2 class="no-num no-toc" id="">Editor's draft <!--W3C Working Draft--> 28
32+
<h2 class="no-num no-toc" id="">Editor's draft <!--W3C Working Draft--> 30
3333
January 2007</h2>
3434

3535
<dl>
3636
<dt>This version:
3737

3838
<dd><a
39-
href="http://www.w3.org/TR/2007/WD-cssom-20070128">http://www.w3.org/TR/2007/WD-cssom-20070128/</a>
39+
href="http://www.w3.org/TR/2007/WD-cssom-20070130">http://www.w3.org/TR/2007/WD-cssom-20070130/</a>
4040

4141
<dt>Latest version:
4242

@@ -236,6 +236,10 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
236236
<ul class=toc>
237237
<li><a href="#the-windowlayout"><span class=secno>4.1. </span>The
238238
<code>WindowLayout</code> Interface</a>
239+
<ul class=toc>
240+
<li><a href="#the-screen"><span class=secno>4.1.1. </span>The
241+
<code>Screen</code> Interface</a>
242+
</ul>
239243

240244
<li><a href="#the-elementlayout"><span class=secno>4.2. </span>The
241245
<code>ElementLayout</code> Interface</a>
@@ -1793,31 +1797,90 @@ <h2 id=layout><span class=secno>4. </span>Layout APIs</h2>
17931797
<h3 id=the-windowlayout><span class=secno>4.1. </span>The <code><a
17941798
href="#windowlayout">WindowLayout</a></code> Interface</h3>
17951799

1800+
<p>The <code><a href="#windowlayout">WindowLayout</a></code> interface <em
1801+
class=ct>must</em> be implemented on objects implementing the
1802+
<code>Window</code> interface. [Window]
1803+
1804+
<p>The term <dfn id=browsing>browsing context</dfn> is used as defined by
1805+
the Window Object 1.0 specification. [Window]
1806+
1807+
<p>This interface represents rendering information about the current
1808+
browsing context.
1809+
17961810
<pre class=idl>interface <dfn id=windowlayout>WindowLayout</dfn> {
1797-
// do we need these given the attributes below?
17981811
readonly attribute float innerWidth;
17991812
readonly attribute float innerHeight;
18001813
readonly attribute float outerWidth;
18011814
readonly attribute float outerHeight;
1802-
1803-
// do we want these here??? do we need them
18041815
readonly attribute float pageXOffset;
18051816
readonly attribute float pageYOffset;
18061817
readonly attribute float screenX;
18071818
readonly attribute float screenY;
1819+
readonly attribute <a href="#screen0">Screen</a> <a href="#screen" title=windowlayout-screen>screen</a>;
1820+
};</pre>
18081821

1809-
readonly attribute <a href="#screen">Screen</a> screen;
1810-
};
1822+
<dl>
1823+
<dt><dfn id=screen title=windowlayout-screen><code>screen</code></dfn>
1824+
1825+
<dd>This attribute <em class=ct>must</em> hold a <code><a
1826+
href="#screen0">Screen</a></code> object.
1827+
</dl>
1828+
1829+
<h4 id=the-screen><span class=secno>4.1.1. </span>The <code><a
1830+
href="#screen0">Screen</a></code> Interface</h4>
1831+
1832+
<p>This interface represents information about the screen of the output
1833+
device.
1834+
1835+
<p>The terminology used in this subsection is that of Media Queries. [MQ]
18111836

1812-
interface <dfn id=screen>Screen</dfn> {
1813-
readonly attribute float availWidth;
1814-
readonly attribute float availHeight;
1815-
readonly attribute float width;
1816-
readonly attribute float height;
1817-
readonly attribute float colorDepth;
1818-
readonly attribute float pixelDepth; // maps colorDepth..
1837+
<pre class=idl>interface <dfn id=screen0>Screen</dfn> {
1838+
readonly attribute float <a href="#availwidth" title=screen-availwidth>availWidth</a>;
1839+
readonly attribute float <a href="#height" title=screen-height>availHeight</a>;
1840+
readonly attribute float <a href="#width" title=screen-width>width</a>;
1841+
readonly attribute float <a href="#height" title=screen-height>height</a>;
1842+
readonly attribute float <a href="#colordepth" title=screen-colordepth>colorDepth</a>;
1843+
readonly attribute float <a href="#pixeldepth" title=screen-pixeldepth>pixelDepth</a>;
18191844
};</pre>
18201845

1846+
<dl class=members>
1847+
<dt><dfn id=availwidth
1848+
title=screen-availwidth><code>availWidth</code></dfn>
1849+
1850+
<dd>This attribute <em class=ct>must</em> be the available width for
1851+
rendering surface of the output device in pixels.
1852+
1853+
<dt><dfn id=availheight
1854+
title=screen-availheight><code>availHeight</code></dfn>
1855+
1856+
<dd>This attribute <em class=ct>must</em> be the available height for
1857+
rendering surface of the output device in pixels.
1858+
1859+
<dt><dfn id=width title=screen-width><code>width</code></dfn>
1860+
1861+
<dd>This attribute <em class=ct>must</em> be the width of the output
1862+
device.
1863+
1864+
<dt><dfn id=height title=screen-height><code>height</code></dfn>
1865+
1866+
<dd>This attribute <em class=ct>must</em> be the height of the output
1867+
device.
1868+
1869+
<dt><dfn id=colordepth
1870+
title=screen-colordepth><code>colorDepth</code></dfn>
1871+
1872+
<dt><dfn id=pixeldepth
1873+
title=screen-pixeldepth><code>pixelDepth</code></dfn></dt>
1874+
<!-- pixelDepth is not supported by Internet Explorer 7 -->
1875+
1876+
<dd>These attributes <em class=ct>must</em> be the number of bits per
1877+
color from the output device.
1878+
</dl>
1879+
1880+
<p>If the user agent supports multiple views and the current view does not
1881+
have a notion of an output device the above attributes <em
1882+
class=ct>must</em> be <code>0</code>.
1883+
18211884
<h3 id=the-elementlayout><span class=secno>4.2. </span>The <code><a
18221885
href="#elementlayout">ElementLayout</a></code> Interface</h3>
18231886

cssom/Overview.src.html

Lines changed: 68 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -464,11 +464,11 @@ <h4>Adding style sheets</h4>
464464

465465
<ul>
466466
<li>The style sheet has an empty title.</li>
467-
467+
468468
<li>The <code>lastStyleSheetSet</code> is <code>null</code>, and the style
469469
sheet's title matches (by <span>case-sensitive</span> match) the value of
470470
the <code>preferredStyleSheetSet</code> attribute.</li>
471-
471+
472472
<li>The style sheet's title matches (by <span>case-sensitive</span> match)
473473
the value of the <code>lastStyleSheetSet</code> attribute.</li>
474474
</ul>
@@ -498,7 +498,7 @@ <h4>Changing the preferred style sheet set</h4>
498498
<code>lastStyleSheetSet</code> attribute is, again, not changed.)</p>
499499

500500
<h4>Examples</h4>
501-
501+
502502
<div class="example">
503503
<p>Thus, in the following HTML snippet:</p>
504504

@@ -1441,31 +1441,84 @@ <h2>Layout APIs</h2>
14411441

14421442
<h3>The <code>WindowLayout</code> Interface</h3>
14431443

1444+
<p>The <code>WindowLayout</code> interface <em class="ct">must</em> be
1445+
implemented on objects implementing the <code>Window</code> interface.
1446+
[Window]</p>
1447+
1448+
<p>The term <dfn>browsing context</dfn> is used as defined by the Window
1449+
Object 1.0 specification. [Window]
1450+
1451+
<p>This interface represents rendering information about the current browsing
1452+
context.</p>
1453+
14441454
<pre class="idl">interface <dfn>WindowLayout</dfn> {
1445-
// do we need these given the attributes below?
14461455
readonly attribute float innerWidth;
14471456
readonly attribute float innerHeight;
14481457
readonly attribute float outerWidth;
14491458
readonly attribute float outerHeight;
1450-
1451-
// do we want these here??? do we need them
14521459
readonly attribute float pageXOffset;
14531460
readonly attribute float pageYOffset;
14541461
readonly attribute float screenX;
14551462
readonly attribute float screenY;
1463+
readonly attribute <span>Screen</span> <span title="windowlayout-screen">screen</span>;
1464+
};</pre>
14561465

1457-
readonly attribute <span>Screen</span> screen;
1458-
};
1466+
<dl>
1467+
<dt><dfn title="windowlayout-screen"><code>screen</code></dfn></dt>
1468+
1469+
<dd>This attribute <em class="ct">must</em> hold a <code>Screen</code>
1470+
object.</dd>
1471+
</dl>
1472+
1473+
<h4>The <code>Screen</code> Interface</h4>
1474+
1475+
<p>This interface represents information about the screen of the output
1476+
device.</p>
14591477

1460-
interface <dfn>Screen</dfn> {
1461-
readonly attribute float availWidth;
1462-
readonly attribute float availHeight;
1463-
readonly attribute float width;
1464-
readonly attribute float height;
1465-
readonly attribute float colorDepth;
1466-
readonly attribute float pixelDepth; // maps colorDepth..
1478+
<p>The terminology used in this subsection is that of Media Queries. [MQ]</p>
1479+
1480+
<pre class="idl">interface <dfn>Screen</dfn> {
1481+
readonly attribute float <span title="screen-availwidth">availWidth</span>;
1482+
readonly attribute float <span title="screen-height">availHeight</span>;
1483+
readonly attribute float <span title="screen-width">width</span>;
1484+
readonly attribute float <span title="screen-height">height</span>;
1485+
readonly attribute float <span title="screen-colordepth">colorDepth</span>;
1486+
readonly attribute float <span title="screen-pixeldepth">pixelDepth</span>;
14671487
};</pre>
14681488

1489+
<dl class="members">
1490+
<dt><dfn title="screen-availwidth"><code>availWidth</code></dfn></dt>
1491+
1492+
<dd>This attribute <em class="ct">must</em> be the available width for
1493+
rendering surface of the output device in pixels.</dd>
1494+
1495+
<dt><dfn title="screen-availheight"><code>availHeight</code></dfn></dt>
1496+
1497+
<dd>This attribute <em class="ct">must</em> be the available height for
1498+
rendering surface of the output device in pixels.</dd>
1499+
1500+
<dt><dfn title="screen-width"><code>width</code></dfn></dt>
1501+
1502+
<dd>This attribute <em class="ct">must</em> be the width of the output
1503+
device.</dd>
1504+
1505+
<dt><dfn title="screen-height"><code>height</code></dfn></dt>
1506+
1507+
<dd>This attribute <em class="ct">must</em> be the height of the output
1508+
device.</dd>
1509+
1510+
<dt><dfn title="screen-colordepth"><code>colorDepth</code></dfn></dt>
1511+
<dt><dfn title="screen-pixeldepth"><code>pixelDepth</code></dfn></dt>
1512+
<!-- pixelDepth is not supported by Internet Explorer 7 -->
1513+
1514+
<dd>These attributes <em class="ct">must</em> be the number of bits per color
1515+
from the output device.</dd>
1516+
</dl>
1517+
1518+
<p>If the user agent supports multiple views and the current view does not
1519+
have a notion of an output device the above attributes
1520+
<em class="ct">must</em> be <code>0</code>.</p>
1521+
14691522
<h3>The <code>ElementLayout</code> Interface</h3>
14701523

14711524
<pre class="idl">interface <dfn>ElementLayout</dfn> {

0 commit comments

Comments
 (0)