@@ -1144,6 +1144,44 @@ <h3 id=processing><span class=secno>3.1. </span>Processing CSS Statements</h3>
11441144 < li > Insert < var > object</ var > at the given < var > index</ var > within the
11451145 < var > rule list</ var > .
11461146 </ ol >
1147+
1148+ < p > The rules for < dfn id =removing title ="remove a statement "> removing a
1149+ statement</ dfn > are as given in the following algorithm. The variables
1150+ < var > index</ var > and < var > rule list</ var > are to be considered equivalent
1151+ to the identically named variables used when invoking this algorithm. If
1152+ an exception is raised this algorithm is to be aborted. The steps < em
1153+ class =ct > must</ em > be followed in order, as follows:
1154+
1155+ < ol >
1156+ < li > If < var > index</ var > is negative or greater than the length of the
1157+ < var > rule list</ var > an < code > INDEX_SIZE_ERR</ code > exception < em
1158+ class =ct > must</ em > be raised.
1159+
1160+ < li > Remove the object at < var > index</ var > from < var > rule list</ var > .
1161+ </ ol >
1162+
1163+ < p > The rules for < dfn id =replacing title ="replace a statement "> replacing a
1164+ statement</ dfn > are as given in the following algorithm. The variable
1165+ < var > rule</ var > and < var > old object</ var > are to be considered equivalent
1166+ to the identically named variables used when invoking this algorithm. If
1167+ an exception is raised this algorithm is to be aborted. The steps < em
1168+ class =ct > must</ em > be followed in order, as follows:
1169+
1170+ < ol >
1171+ < li > Parse < var > rule</ var > as a CSS statement. If the < var > rule</ var > is
1172+ ignored by the CSS parser abort this algorithm (don't raise an
1173+ exception). Otherwise, create an object that implements one of the
1174+ inherited interfaces of < code > CSSStyle</ code > appropriate for the parsed
1175+ < var > rule</ var > . Let < var > object</ var > be the newly created object.
1176+
1177+ < li > If the < code title =cssrule-type > < a
1178+ href ="#cssrule-type "> type</ a > </ code > of new < var > object</ var > doesn't
1179+ match the < code title =cssrule-type > < a
1180+ href ="#cssrule-type "> type</ a > </ code > of the object it will replace raise
1181+ an < code > INVALID_MODIFICATION_ERR</ code > exception.
1182+
1183+ < li > Replace < var > old object</ var > with < var > object</ var > .
1184+ </ ol >
11471185 <!-- XXX we should probably also detail how a CSSStyleRule is properly done
11481186 et cetera. -->
11491187
@@ -1210,12 +1248,11 @@ <h3 id=the-cssstylesheet><span class=secno>3.2. </span>The <code><a
12101248 title =cssstylesheet-deleterule > < code > deleteRule(< var
12111249 title =""> index</ var > )</ code > </ dfn > , method
12121250
1213- < dd > When invoked, if < var title =""> index</ var > is negative or greather
1214- than the < code title =cssrulelist-length > < a
1215- href ="#cssrulelist-length "> length</ a > </ code > user agents < em
1216- class =ct > must</ em > raise a < code > INDEX_SIZE_ERR</ code > exception.
1217- Otherwise user agents < em class =ct > must</ em > remove the rule given by
1218- < var title =""> index</ var > .
1251+ < dd > When invoked, user agents < em class =ct > must</ em > < a
1252+ href ="#removing "> remove a statement</ a > where < var > index</ var > is
1253+ < var > index</ var > and < var > rule list</ var > is < code
1254+ title =cssmediarule-cssrules > < a
1255+ href ="#cssmediarule-cssrules "> < code > cssRules</ code > .</ a > </ code >
12191256 </ dl >
12201257
12211258 < h3 id =the-cssrulelist > < span class =secno > 3.3. </ span > The < code > < a
@@ -1305,25 +1342,14 @@ <h4 id=the-cssrule><span class=secno>3.4.1. </span>The <code><a
13051342
13061343 < dt > < dfn id =cssrule-csstext
13071344 title =cssrule-csstext > < code > cssText</ code > </ dfn > of type
1308- < code > DOMString</ code > </ dt >
1309- <!-- Setting this attribute doesn't work in Firefox. -->
1345+ < code > DOMString</ code >
13101346
13111347 < dd >
1312- < p > On setting, user agents < em class =ct > must</ em > parse the given string
1313- as a statement. If the given statement was ignored user agents < em
1314- class =ct > must</ em > act as if the setting didn't occur.</ p >
1315-
1316- < p > Otherwise, if the < code title =cssrule-type > < a
1317- href ="#cssrule-type "> type</ a > </ code > of the resulting < code > < a
1318- href ="#cssrule "> CSSRule</ a > </ code > object doesn't match the current
1319- < code title =cssrule-type > < a href ="#cssrule-type "> type</ a > </ code > a
1320- < code > INVALID_MODIFICATION_ERR</ code > exception < em class =ct > must</ em >
1321- be raised.</ p >
1322-
1323- < p > Otherwise, < span class =issue > ...</ span > .</ p >
1324- <!-- XXX Need to make sure the underlying object has all its relevant
1325- attributes modified. -->
1326-
1348+ < p > On setting, user agents < em class =ct > must</ em > < a
1349+ href ="#replacing "> replace a statement</ a > where < var > rule</ var > is the
1350+ value being set and < var > old object</ var > is the object of which this
1351+ attribute is set.</ p >
1352+
13271353 < p > On getting, < span class =issue > ...</ span > .</ p >
13281354
13291355 < dt > < dfn id =cssrule-parentrule
@@ -1496,10 +1522,11 @@ <h4 id=the-cssmediarule><span class=secno>3.4.5. </span>The <code><a
14961522 title =cssmediarule-deleterule > < code > deleteRule(< var
14971523 title =""> index</ var > )</ code > </ dfn > , method
14981524
1499- < dd > This method < em class =ct > must</ em > raise a < code > INDEX_SIZE_ERR</ code >
1500- exception if the given < var > index</ var > does not correspond to a rule in
1501- the style sheet. Otherwise, it < em class =ct > must</ em > remove the rule at
1502- < var > index</ var > .
1525+ < dd > When invoked, user agents < em class =ct > must</ em > < a
1526+ href ="#removing "> remove a statement</ a > where < var > index</ var > is
1527+ < var > index</ var > and < var > rule list</ var > is < code
1528+ title =cssmediarule-cssrules > < a
1529+ href ="#cssmediarule-cssrules "> < code > cssRules</ code > .</ a > </ code >
15031530 </ dl >
15041531
15051532 < h4 id =the-cssfontfacerule > < span class =secno > 3.4.6. </ span > The < code > < a
0 commit comments