3535 < div class =head >
3636 < h1 id =cssom > Cascading Style Sheets Object Model (< abbr > CSSOM</ abbr > )</ h1 >
3737
38- < h2 class ="no-num no-toc " id =""> Editor's draft <!--W3C Working Draft--> 5
38+ < h2 class ="no-num no-toc " id =""> Editor's draft <!--W3C Working Draft--> 6
3939 June 2007</ h2 >
4040
4141 < dl >
4242 < dt > This version:</ dt >
4343 <!--
44- <dd><a href="http://www.w3.org/TR/2007/WD-cssom-20070605 /">http://www.w3.org/TR/2007/WD-cssom-20070605 /</a></dd>
44+ <dd><a href="http://www.w3.org/TR/2007/WD-cssom-20070606 /">http://www.w3.org/TR/2007/WD-cssom-20070606 /</a></dd>
4545 -->
4646
4747 < dd > ...
@@ -215,17 +215,20 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
215215 < li > < a href ="#declaration "> < span class =secno > 3.6. </ span > Declaration
216216 blocks</ a >
217217 < ul class =toc >
218- < li > < a href ="#the-cssstyledeclaration "> < span class =secno > 3.6.1.
218+ < li > < a href ="#parsing "> < span class =secno > 3.6.1. </ span > Parsing
219+ property values</ a >
220+
221+ < li > < a href ="#the-cssstyledeclaration "> < span class =secno > 3.6.2.
219222 </ span > The < code > CSSStyleDeclaration</ code > Interface</ a >
220223
221- < li > < a href ="#css-properties "> < span class =secno > 3.6.2 . </ span > CSS
224+ < li > < a href ="#css-properties "> < span class =secno > 3.6.3 . </ span > CSS
222225 Properties</ a >
223226 < ul class =toc >
224- < li > < a href ="#the-css2properties "> < span class =secno > 3.6.2 .1.
227+ < li > < a href ="#the-css2properties "> < span class =secno > 3.6.3 .1.
225228 </ span > The < code > CSS2Properties</ code > Interface</ a >
226229
227230 < li > < a href ="#the-cssstyledeclarationproperties "> < span
228- class =secno > 3.6.2 .2. </ span > The
231+ class =secno > 3.6.3 .2. </ span > The
229232 < code > CSSStyleDeclarationProperties</ code > Interface</ a >
230233 </ ul >
231234 </ ul >
@@ -1742,7 +1745,15 @@ <h4 id=the-documentcss><span class=secno>3.5.4. </span>The <code><a
17421745
17431746 < h3 id =declaration > < span class =secno > 3.6. </ span > Declaration blocks</ h3 >
17441747
1745- < h4 id =the-cssstyledeclaration > < span class =secno > 3.6.1. </ span > The <code > < a
1748+ < h4 id =parsing > < span class =secno > 3.6.1. </ span > Parsing property values</ h4 >
1749+
1750+ < p > When the steps below require the user agent to < dfn id =parse title ="CSS
1751+ value parsing "> parse a CSS value</ dfn > for a given property the user agent
1752+ < em class =ct > must</ em > use the < code > S* expr</ code > production in
1753+ combination with the property to determine whether it is a valid value and
1754+ return that or return "null" in case of an error. [CSS]
1755+
1756+ < h4 id =the-cssstyledeclaration > < span class =secno > 3.6.2. </ span > The < code > < a
17461757 href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code > Interface</ h4 >
17471758
17481759 < p > The < code > < a href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code >
@@ -1775,119 +1786,110 @@ <h4 id=the-cssstyledeclaration><span class=secno>3.6.1. </span>The <code><a
17751786
17761787 < pre
17771788 class =idl > interface < dfn id =cssstyledeclaration > CSSStyleDeclaration</ dfn > {
1778- attribute DOMString < a href ="#cssstyledeclaration-csstext " title =cssstyledeclaration-csstext > cssText</ a > ;
1779- DOMString < a href ="#cssstyledeclaration-getpropertyvalue " title =cssstyledeclaration-getpropertyvalue > getPropertyValue</ a > (in DOMString < var title =""> property</ var > );
1780- DOMString < a href ="#cssstyledeclaration-getpropertypriority " title =cssstyledeclaration-getpropertypriority > getPropertyPriority</ a > (in DOMString < var title =""> property</ var > );
1781- DOMString < a href ="#cssstyledeclaration-removeproperty " title =cssstyledeclaration-removeproperty > removeProperty</ a > (in DOMString < var title =""> property</ var > );
1782- void < a href ="#cssstyledeclaration-setproperty " title =cssstyledeclaration-setproperty > setProperty</ a > (in DOMString < var title =""> property</ var > , in DOMString < var title =""> value</ var > );
1783- void < a href ="#cssstyledeclaration-setproperty " title =cssstyledeclaration-setproperty > setProperty</ a > (in DOMString < var title =""> property</ var > , in DOMString < var title =""> value</ var > , in DOMString < var title =""> priority</ var > );
1784- readonly attribute unsigned long < a href ="#cssstyledeclaration-length " title =cssstyledeclaration-length > length</ a > ;
1785- DOMString < a href ="#cssstyledeclaration-item " title =cssstyledeclaration-item > item</ a > (in unsigned long < var title =""> index</ var > );
1786- readonly attribute < a href ="#cssrule "> CSSRule</ a > < a href ="#cssstyledeclaration-parentrule " title =cssstyledeclaration-parentrule > parentRule</ a > ;
1789+ attribute DOMString < a href ="#cssstyledeclaration-csstext " title =cssstyledeclaration-csstext > cssText</ a > ;
1790+ DOMString < a href ="#cssstyledeclaration-getpropertyvalue " title =cssstyledeclaration-getpropertyvalue > getPropertyValue</ a > (in DOMString < var title =""> property</ var > );
1791+ DOMString < a href ="#cssstyledeclaration-getpropertypriority " title =cssstyledeclaration-getpropertypriority > getPropertyPriority</ a > (in DOMString < var title =""> property</ var > );
1792+ DOMString < a href ="#cssstyledeclaration-removeproperty " title =cssstyledeclaration-removeproperty > removeProperty</ a > (in DOMString < var title =""> property</ var > );
1793+ void < a href ="#cssstyledeclaration-setproperty " title =cssstyledeclaration-setproperty > setProperty</ a > (in DOMString < var title =""> property</ var > , in DOMString < var title =""> value</ var > );
1794+ void < a href ="#cssstyledeclaration-setproperty " title =cssstyledeclaration-setproperty > setProperty</ a > (in DOMString < var title =""> property</ var > , in DOMString < var title =""> value</ var > , in DOMString < var title =""> priority</ var > );
1795+ readonly attribute unsigned long < a href ="#cssstyledeclaration-length " title =cssstyledeclaration-length > length</ a > ;
1796+ DOMString < a href ="#cssstyledeclaration-item " title =cssstyledeclaration-item > item</ a > (in unsigned long < var title =""> index</ var > );
1797+ readonly attribute < a href ="#cssrule "> CSSRule</ a > < a href ="#cssstyledeclaration-parentrule " title =cssstyledeclaration-parentrule > parentRule</ a > ;
17871798};</ pre >
17881799
1789- < dl class =members >
1790- < dt > < dfn id =cssstyledeclaration-csstext
1791- title =cssstyledeclaration-csstext > < code > cssText</ code > </ dfn > of type
1792- < code > DOMString</ code >
1793-
1794- < dd >
1795- < p > On setting, user agents < em class =ct > must</ em > remove all properties
1796- currently set on the object and then parse the given string as the
1797- contents of a declaration block and set each property / value pair that
1798- is not ignored on the < code > < a
1799- href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code > block.</ p >
1800-
1801- < p > On getting, < span class =issue > ...</ span > .</ p >
1802-
1803- < dt > < dfn id =cssstyledeclaration-getpropertyvalue
1804- title =cssstyledeclaration-getpropertyvalue > < code > getPropertyValue(< var
1805- title =""> property</ var > )</ code > , method</ dfn >
1806-
1807- < dd class =issue > Once we have defined how everything will be canonicalized
1808- we can start thinking about this... Also involves testing.
1809-
1810- < dt > < dfn id =cssstyledeclaration-getpropertypriority
1811- title =cssstyledeclaration-getpropertypriority > < code > getPropertyPriority(< var
1812- title =""> property</ var > )</ code > , method</ dfn >
1813-
1814- < dd >
1815- < p > When invoked, if < var title =""> property</ var > case-insensitively
1816- matches a specified property that has a priority user agents < em
1817- class =ct > must</ em > return the priority of that property using the case
1818- given in the syntax definition. Otherwise, the empty string < em
1819- class =ct > must</ em > be returned.</ p >
1820-
1821- < p class =note > For < code > background-color:lime !IMPORTANT</ code > the
1822- return value would be < code > important</ code > .</ p >
1823-
1824- < dt > < dfn id =cssstyledeclaration-removeproperty
1825- title =cssstyledeclaration-removeproperty > < code > removeProperty(< var
1826- title =""> property</ var > )</ code > , method</ dfn >
1827-
1828- < dd > When invoked, if < var title =""> property</ var > case-insensitively
1829- matches a specified property user agents < em class =ct > must</ em > remove
1830- that property declaration.
1800+ < p > The < dfn id =cssstyledeclaration-csstext
1801+ title =cssstyledeclaration-csstext > < code > cssText</ code > </ dfn > attribute, on
1802+ getting, < span class =issue > ...</ span > .
1803+
1804+ < p > On setting the < code title =""> cssText</ code > attribute, user agents < em
1805+ class =ct > must</ em > remove all properties currently set on the object and
1806+ then parse the given string as the contents of a declaration block and set
1807+ each property / value pair that is not ignored on the < code > < a
1808+ href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code > block. [CSS]
1809+
1810+ < p > The < dfn id =cssstyledeclaration-getpropertyvalue
1811+ title =cssstyledeclaration-getpropertyvalue > < code > getPropertyValue(< var
1812+ title =""> property</ var > )</ code > </ dfn > method, when invoked, < span
1813+ class =issue > ...</ span > .</ p >
1814+ <!-- Once we have defined how everything will be canonicalized we can start
1815+ thinking about this... -->
1816+
1817+ < p > The < dfn id =cssstyledeclaration-getpropertypriority
1818+ title =cssstyledeclaration-getpropertypriority > < code > getPropertyPriority(< var
1819+ title =""> property</ var > )</ code > </ dfn > method, when invoked, if < var
1820+ title =""> property</ var > case-insensitively matches a specified property
1821+ that has a priority user agents < em class =ct > must</ em > return the
1822+ canonical priority of that property as given in the syntax definition.
1823+ Otherwise, the empty string < em class =ct > must</ em > be returned.
1824+
1825+ < p class =note > For < code > background-color:lime !IMPORTANT</ code > the return
1826+ value would be < code > important</ code > .
1827+
1828+ < p > The < dfn id =cssstyledeclaration-removeproperty
1829+ title =cssstyledeclaration-removeproperty > < code > removeProperty(< var
1830+ title =""> property</ var > )</ code > </ dfn > method, when invoked, if < var
1831+ title =""> property</ var > case-insensitively matches a specified property
1832+ user agents < em class =ct > must</ em > remove that property declaration.
1833+
1834+ < p > The < dfn id =cssstyledeclaration-setproperty
1835+ title =cssstyledeclaration-setproperty > < code > setProperty(< var
1836+ title =""> property</ var > , < var title =""> value</ var > , < var
1837+ title =""> priority</ var > )</ code > </ dfn > method gives a way to set a
1838+ declaration. When invoked, user agents < em class =ct > must</ em > run the
1839+ following steps:
18311840
1832- < dt > < dfn id =cssstyledeclaration-setproperty
1833- title =cssstyledeclaration-setproperty > < code > setProperty(< var
1834- title =""> property</ var > , < var title =""> value</ var > , < var
1835- title =""> priority</ var > )</ code > , method</ dfn >
1836-
1837- < dd >
1838- < p > When invoked, user agents < em class =ct > must</ em > follow the following
1839- steps, in order:</ p >
1840-
1841- < ol >
1842- < li > If < var title =""> property</ var > does not case-insensitively match a
1843- supported property abort this algorithm.
1844-
1845- < li > If < var title =""> value</ var > is < code > null</ code > or the empty
1846- string invoke < code title =cssstyledeclaration-removeproperty > < a
1847- href ="#cssstyledeclaration-removeproperty "> removeProperty</ a > </ code >
1848- with < var title =""> property</ var > as argument and abort this algorithm.
1849-
1850- < li > If the < var title =""> priority</ var > argument has been omitted let
1851- < var title =""> priority</ var > be < code > null</ code > .
1841+ < ol >
1842+ < li >
1843+ < p > If < var title =""> property</ var > does not case-insensitively match a
1844+ supported property abort this algorithm.
18521845
1853- < li > If < var title =""> priority</ var > is neither a valid priority nor
1854- < code > null</ code > or the empty string abort this algorithm.
1846+ < li >
1847+ < p > If < var title =""> value</ var > is < code > null</ code > or the empty string
1848+ invoke < code title =cssstyledeclaration-removeproperty > < a
1849+ href ="#cssstyledeclaration-removeproperty "> removeProperty</ a > </ code >
1850+ with < var title =""> property</ var > as argument and abort this algorithm.
18551851
1856- < li > If < var title =""> value</ var > cannot be parsed into a legal value
1857- abort this algorithm.
1852+ < li >
1853+ < p > If the < var title =""> priority</ var > argument has been omitted let < var
1854+ title =""> priority</ var > be < code > null</ code > .
18581855
1859- < li > Finally, set < var title =""> property</ var > to < var
1860- title =""> value</ var > with priority < var title =""> priority</ var > when
1861- < var title =""> priority</ var > is not < code > null</ code > or the empty
1862- string. Otherwise set < var title =""> property</ var > to < var
1863- title =""> value</ var > .
1864- </ ol >
1856+ < li >
1857+ < p > If < var title =""> priority</ var > is neither a valid priority nor
1858+ < code > null</ code > or the empty string abort this algorithm.
18651859
1866- < dt > < dfn id = cssstyledeclaration-length
1867- title =cssstyledeclaration-length > < code > length </ code > of type
1868- < code > unsigned long </ code > , readonly </ dfn >
1860+ < li >
1861+ < p > If < var title ="" > value </ var > < a href =" #parse " title =" CSS value
1862+ parsing " > cannot be parsed </ a > into a legal value abort this algorithm. </ p >
18691863
1870- < dd > This attribute < em class =ct > must </ em > be the number of setted
1871- properties.
1864+ < p class =note > < var title ="" > value </ var > can not include
1865+ < code > !important </ code > or < code > ; </ code > . </ p >
18721866
1873- < dt > < dfn id =cssstyledeclaration-item
1874- title =cssstyledeclaration-item > < code > item(<var
1875- title =""> index</ var > )</ code > , method</ dfn >
1867+ < li >
1868+ < p > Finally, set < var title =""> property</ var > to < var title =""> value</ var >
1869+ with priority < var title =""> priority</ var > when < var
1870+ title =""> priority</ var > is not < code > null</ code > or the empty string.
1871+ Otherwise set < var title =""> property</ var > to < var title =""> value</ var > .
1872+ </ ol >
18761873
1877- < dd class =issue > Returns the value of property x stored at position item.
1874+ < p > The < dfn id =cssstyledeclaration-length
1875+ title =cssstyledeclaration-length > < code > length</ code > </ dfn > attribute < em
1876+ class =ct > must</ em > be the number of setted properties.
18781877
1879- < dt > < dfn id =cssstyledeclaration-parentrule
1880- title =cssstyledeclaration-parentrule > < code > parentRule</ code > of type
1881- < code > CSSRule</ code > , readonly</ dfn >
1878+ < p > The < dfn id =cssstyledeclaration-item
1879+ title =cssstyledeclaration-item > < code > item(< var
1880+ title =""> index</ var > )</ code > </ dfn > method, when invoked, < span
1881+ class =issue > ...</ span > .</ p >
1882+ <!-- returns the value of property x stored at position item. -->
18821883
1883- < dd > This attribute < em class =ct > must</ em > be the < code > < a
1884- href ="#cssrule "> CSSRule</ a > </ code > the < code > < a
1885- href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code > object is
1886- associated with or < code > null</ code > if it's not associated with a
1887- < code > < a href ="#cssrule "> CSSRule</ a > </ code > object.
1888- </ dl >
1884+ < p > The < dfn id =cssstyledeclaration-parentrule
1885+ title =cssstyledeclaration-parentrule > < code > parentRule</ code > </ dfn >
1886+ attribute, on getting, < em class =ct > must</ em > return the < code > < a
1887+ href ="#cssrule "> CSSrule</ a > </ code > object the < code > < a
1888+ href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code > is object is
1889+ associated with or < code > null</ code > if it is not associated with a
1890+ < code > < a href ="#cssrule "> CSSrule</ a > </ code > object.
18891891
1890- < h4 id =css-properties > < span class =secno > 3.6.2 . </ span > CSS Properties</ h4 >
1892+ < h4 id =css-properties > < span class =secno > 3.6.3 . </ span > CSS Properties</ h4 >
18911893
18921894 < p > The DOM attribute name of a CSS property can be found by using the
18931895 following algorithm:
@@ -1908,14 +1910,14 @@ <h4 id=css-properties><span class=secno>3.6.2. </span>CSS Properties</h4>
19081910 title =""> < strong > V</ strong > endor</ var > < var
19091911 title =""> < strong > P</ strong > roperty</ var > </ code > for instance.
19101912
1911- < h5 id =the-css2properties > < span class =secno > 3.6.2 .1. </ span > The
1913+ < h5 id =the-css2properties > < span class =secno > 3.6.3 .1. </ span > The
19121914 < code > CSS2Properties</ code > Interface</ h5 >
19131915
19141916 < p class =issue > If we have all the properties on < code > < a
19151917 href ="#cssstyledeclarationproperties "> CSSStyleDeclarationProperties</ a > </ code >
19161918 do we still need this interface?
19171919
1918- < h5 id =the-cssstyledeclarationproperties > < span class =secno > 3.6.2 .2.
1920+ < h5 id =the-cssstyledeclarationproperties > < span class =secno > 3.6.3 .2.
19191921 </ span > The < code > < a
19201922 href ="#cssstyledeclarationproperties "> CSSStyleDeclarationProperties</ a > </ code >
19211923 Interface</ h5 >
@@ -2700,6 +2702,9 @@ <h4 id=the-scroll><span class=secno>4.3.3. </span>The
27002702 < p class =issue > ...
27012703 </ ol >
27022704 <!-- XXX need to figure out right terminology -->
2705+ <!--
2706+ <p>The <dfn id="elementlayout-scrollWidth"><code>scrollWidth</code></dfn>
2707+ -->
27032708
27042709 < p class =issue > It seems scrollWidth and scrollHeight are defined by the
27052710 boxes they contain plus any the surrounding padding area. How about
0 commit comments