2525 < div class =head >
2626 < h1 id =cssom > CSSOM</ h1 >
2727
28- < h2 class ="no-num no-toc " id =""> Editor's Draft 1 December 2009</ h2 >
28+ < h2 class ="no-num no-toc " id =""> Editor's Draft 2 December 2009</ h2 >
2929
3030 < dl >
3131 < dt > This Version:
3232
3333 < dd > < a
34- href ="http://www.w3.org/TR/2009/ED-cssom-20091201 / "> http://www.w3.org/TR/2009/ED-cssom-20091201 /</ a >
34+ href ="http://www.w3.org/TR/2009/ED-cssom-20091202 / "> http://www.w3.org/TR/2009/ED-cssom-20091202 /</ a >
3535
3636 < dt > Latest Version:
3737
@@ -317,6 +317,7 @@ <h2 id=media-queries><span class=secno>4. </span>Media Queries</h2>
317317 < p > < dfn id ="media queries "> Media queries</ dfn > are defined by the Media
318318 Queries specification. This section defines various concepts around media
319319 queries, including their API and serialization form.</ p >
320+ <!-- XXX maybe not a <dfn> -->
320321 <!-- XXX ref -->
321322
322323 < h3 id =parsing-media-queries > < span class =secno > 4.1. </ span > Parsing Media
@@ -1575,7 +1576,6 @@ <h4 id=requirements-on-user-agents-implementing0><span class=secno>6.3.4.
15751576 title =""> Link</ code > Header</ h4 >
15761577 <!-- XXX ref, one day -->
15771578 <!-- XXX deal with media param -->
1578- <!-- XXX title* param does not work (how unexpected -->
15791579
15801580 < p > For each HTTP < code title =http-link > Link</ code > header of which one of
15811581 the link relation types is an < a href ="#ascii-case-insensitive "> ASCII
@@ -2146,12 +2146,6 @@ <h4 id=the-cssnamespacerule-interface><span class=secno>7.2.8. </span>The
21462146
21472147 < h3 id =css-declaration-blocks > < span class =secno > 7.3. </ span > CSS Declaration
21482148 Blocks</ h3 >
2149- <!--
2150- concept: CSS declaration block
2151- members: CSS declaration block readonly flag
2152- CSS declaration block value type flag
2153- collection of CSS declarations
2154- -->
21552149
21562150 < p class =XXX > To < dfn id =parse-a-css-declaration-block > parse a CSS
21572151 declaration block</ dfn > ...
@@ -2412,9 +2406,35 @@ <h4 id=examples0><span class=secno>7.3.1. </span>Examples</h4>
24122406 < h4 id =the-cssstyledeclaration-interface > < span class =secno > 7.3.2.
24132407 </ span > The < code title =""> CSSStyleDeclaration</ code > Interface</ h4 >
24142408
2415- < p > The < code > < a href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code >
2416- interface gives access to read and manipulate CSS properties and their
2417- values within a declaration block.
2409+ < p > Objects implementing the < code > < a
2410+ href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code > interface give
2411+ access to read and manipulate CSS properties and their values within a
2412+ declaration block.
2413+
2414+ < p > Objects implementing the < code > < a
2415+ href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code > interface have
2416+ the following associated concepts:
2417+
2418+ < dl >
2419+ < dt > < dfn id =css-declaration-block-readonly-flag > CSS declaration block
2420+ readonly flag</ dfn >
2421+
2422+ < dd >
2423+ < p > Indicates whether or not the object can be modified (as detailed
2424+ below). True when it cannot. False otherwise and by default.
2425+ </ dd >
2426+ <!--
2427+ <dt><dfn>CSS declaration block value type</dfn></dt>
2428+ <dd><p>Indicates the type of value
2429+
2430+ -->
2431+
2432+ < dt > < dfn id =collection-of-css-declarations > collection of CSS
2433+ declarations</ dfn >
2434+
2435+ < dd >
2436+ < p > The CSS declarations associated with the object.
2437+ </ dl >
24182438
24192439 < p > If an attribute or method returns an object implementing the < code > < a
24202440 href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code > interface (and
@@ -2430,10 +2450,6 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2.
24302450 of that.</ p >
24312451 <!-- XXX we should define this in more detail -->
24322452
2433- < p class =issue > < code > < a
2434- href ="#cssstyledeclaration "> CSSStyleDeclaration</ a > </ code > can represent
2435- computed values and used values.
2436-
24372453 < pre
24382454 class =idl > interface < dfn id =cssstyledeclaration > CSSStyleDeclaration</ dfn > {
24392455 attribute DOMString < a href ="#cssstyledeclaration-csstext " title =cssstyledeclaration-csstext > cssText</ a > ;
@@ -2575,19 +2591,28 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2.
25752591 title =cssstyledeclaration-csstext > < code > cssText</ code > </ dfn > attribute < em
25762592 class =ct > must</ em > , on getting, return the result of < a
25772593 href ="#serialize-a-css-declaration-block " title ="serialize a CSS
2578- declaration block "> serializing</ a > the < span > CSS declaration block</ span > .
2594+ declaration block "> serializing</ a > the < a
2595+ href ="#collection-of-css-declarations "> collection of CSS declarations</ a > .
25792596
25802597 < p > On setting the < code title =""> cssText</ code > attribute these steps < em
25812598 class =ct > must</ em > be run:
25822599
25832600 < ol >
25842601 < li >
2585- < p > Remove the < span > list of associated declarations</ span > .
2602+ < p > If the < a href ="#css-declaration-block-readonly-flag "> CSS declaration
2603+ block readonly flag</ a > is true raise a
2604+ < code > NO_MODIFICATION_ALLOWED_ERR</ code > and terminate this algorithm.
2605+
2606+ < li >
2607+ < p > Empty the < a href ="#collection-of-css-declarations "> collection of CSS
2608+ declarations</ a > .
25862609
25872610 < li >
25882611 < p > < a href ="#parse-a-css-declaration-block " title ="Parse a CSS
25892612 declaration block "> Parse</ a > the given value and, if the return value is
2590- not null, append it to the < span > list of associated declarations</ span > .
2613+ not null, append it to the < a
2614+ href ="#collection-of-css-declarations "> collection of CSS
2615+ declarations</ a > .
25912616 </ ol >
25922617
25932618 < p > The < dfn id =cssstyledeclaration-getpropertyvalue
@@ -2609,37 +2634,55 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2.
26092634 < p class =example > E.g. for < code > background-color:lime !IMPORTANT</ code > the
26102635 return value would be "< code title =""> important</ code > ".
26112636
2612- < p > The < dfn id =cssstyledeclaration-removeproperty
2637+ < p > When the < dfn id =cssstyledeclaration-removeproperty
26132638 title =cssstyledeclaration-removeproperty > < code > removeProperty(< var
2614- title =""> property</ var > )</ code > </ dfn > method, when invoked, if < var
2615- title =""> property</ var > case-insensitively matches a specified property
2616- user agents < em class =ct > must</ em > remove that property declaration.
2639+ title =""> property</ var > )</ code > </ dfn > method is invoked these steps < em
2640+ class =ct > must</ em > be run:
2641+
2642+ < ol >
2643+ < li >
2644+ < p > If the < a href ="#css-declaration-block-readonly-flag "> CSS declaration
2645+ block readonly flag</ a > is true raise a
2646+ < code > NO_MODIFICATION_ALLOWED_ERR</ code > and terminate this algorithm.
2647+
2648+ < li >
2649+ < p > If < var title =""> property</ var > is an < a
2650+ href ="#ascii-case-insensitive "> ASCII case-insensitive</ a > match for a
2651+ property of a declaration in the < a
2652+ href ="#collection-of-css-declarations "> collection of CSS
2653+ declarations</ a > remove the declaration.</ p >
2654+ </ ol >
26172655
2618- < p > The < dfn id =cssstyledeclaration-setproperty
2656+ < p > When the < dfn id =cssstyledeclaration-setproperty
26192657 title =cssstyledeclaration-setproperty > < code > setProperty(< var
26202658 title =""> property</ var > , < var title =""> value</ var > , < var
2621- title =""> priority</ var > )</ code > </ dfn > method gives a way to set a
2622- declaration. When invoked, user agents < em class =ct > must</ em > run the
2623- following steps:
2659+ title =""> priority</ var > )</ code > </ dfn > method is invoked these steps < em
2660+ class =ct > must</ em > be run:
26242661
26252662 < ol >
2663+ < li >
2664+ < p > If the < a href ="#css-declaration-block-readonly-flag "> CSS declaration
2665+ block readonly flag</ a > is true raise a
2666+ < code > NO_MODIFICATION_ALLOWED_ERR</ code > and terminate this algorithm.
2667+
26262668 < li >
26272669 < p > If < var title =""> property</ var > does not case-insensitively match a
2628- supported property abort this algorithm.
2670+ supported property terminate this algorithm.
26292671
26302672 < li >
2631- < p > If < var title =""> value</ var > is < code > null</ code > or the empty string
2632- invoke < code title =cssstyledeclaration-removeproperty > < a
2633- href ="#cssstyledeclaration-removeproperty "> removeProperty</ a > </ code >
2634- with < var title =""> property</ var > as argument and abort this algorithm.
2673+ < p > If < var title =""> value</ var > is null or the empty string invoke < code
2674+ title =cssstyledeclaration-removeproperty > < a
2675+ href ="#cssstyledeclaration-removeproperty "> removeProperty()</ a > </ code >
2676+ with < var title =""> property</ var > as argument and terminate this
2677+ algorithm.
26352678
26362679 < li >
26372680 < p > If the < var title =""> priority</ var > argument has been omitted let < var
2638- title =""> priority</ var > be < code > null </ code > .
2681+ title =""> priority</ var > be the empty string .
26392682
26402683 < li >
2641- < p > If < var title =""> priority</ var > is neither a valid priority nor
2642- < code > null </ code > or the empty string abort this algorithm.
2684+ < p > If < var title =""> priority</ var > is neither a valid priority nor the
2685+ empty string terminate this algorithm.
26432686
26442687 < li >
26452688 < p > If < a href ="#parse-a-css-value " title ="parse a CSS value "> parsing the
@@ -2651,14 +2694,15 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2.
26512694 < li >
26522695 < p > Finally, set < var title =""> property</ var > to < var title =""> value</ var >
26532696 with priority < var title =""> priority</ var > when < var
2654- title =""> priority</ var > is not < code > null </ code > or the empty string.
2655- Otherwise set < var title =""> property</ var > to < var title =""> value</ var > .
2697+ title =""> priority</ var > is not the empty string. Otherwise set < var
2698+ title =""> property</ var > to < var title =""> value</ var > .
26562699 </ ol >
26572700 <!-- XXX WebIDL work -->
26582701
26592702 < p > The < dfn id =cssstyledeclaration-length
26602703 title =cssstyledeclaration-length > < code > length</ code > </ dfn > attribute < em
2661- class =ct > must</ em > be the number of setted properties.
2704+ class =ct > must</ em > return the number of declarations in the < a
2705+ href ="#collection-of-css-declarations "> collection of CSS declarations</ a > .
26622706
26632707 < p > The < dfn id =cssstyledeclaration-item
26642708 title =cssstyledeclaration-item > < code > item(< var
@@ -2674,15 +2718,16 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2.
26742718 associated with or < code > null</ code > if it is not associated with a
26752719 < code > < a href ="#cssrule "> CSSrule</ a > </ code > object.</ p >
26762720 <!-- XXX introduce a concept for this instead -->
2721+ <!-- XXX define this in terms of getPropertyValue/setProperty -->
26772722
2678- < p > The IDL attribute in the first column < em class = ct > must </ em > , on getting
2679- return the value for the CSS property given in the second column on the
2680- same row.</ p >
2723+ < p > For the table below, the IDL attribute in the first column < em
2724+ class = ct > must </ em > , on getting return the value for the CSS property given
2725+ in the second column on the same row.</ p >
26812726 <!-- XXX ref -->
26822727
2683- < p > On setting the IDL attribute in the first column the value for the CSS
2684- property giving in the second column on the same row < em
2685- class =ct > must</ em > be set to the given value.</ p >
2728+ < p > Similarly for the table below, on setting the IDL attribute in the first
2729+ column the value for the CSS property giving in the second column on the
2730+ same row < em class =ct > must</ em > be set to the given value.</ p >
26862731 <!-- XXX ref, exceptions for readonly objects -->
26872732
26882733 < table >
0 commit comments