[css3-conditional] Specify behavior of insertRule when given an empty string or more than one syntactically valid rule.

Fri, 08 Feb 2013 21:43:29 -0800

author
L. David Baron <dbaron@dbaron.org>
date
Fri, 08 Feb 2013 21:43:29 -0800
changeset 7412
3b40faa91133
parent 7411
1e06b058dde6
child 7413
5befdc86fe92

[css3-conditional] Specify behavior of insertRule when given an empty string or more than one syntactically valid rule.

This is as proposed in
http://lists.w3.org/Archives/Public/www-style/2013Feb/0229.html
and addresses Last Call issue 5.

css3-conditional/Makefile file | annotate | diff | comparison | revisions
css3-conditional/Overview.html file | annotate | diff | comparison | revisions
css3-conditional/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/css3-conditional/Makefile	Fri Feb 08 14:04:09 2013 -0800
     1.2 +++ b/css3-conditional/Makefile	Fri Feb 08 21:43:29 2013 -0800
     1.3 @@ -1,16 +1,29 @@
     1.4  # Calling the post-processor with file-upload. Assumes the username
     1.5 -# and password are in ~/.curl-w3.org
     1.6 +# and password are in ~/.curl-w3.org (user = USER:PASS)
     1.7  #
     1.8 -# Possible other options:
     1.9 -# -F date=YYYY-MM-DD
    1.10 +# To set a date other than today, use: make cdate=YYYYMMDD
    1.11 +#
    1.12 +# To set the status, modify one of the "this version" URLs:
    1.13 +# http://www.w3.org/TR/[YEAR]/CR-[SHORTNAME]-[CDATE]/
    1.14 +# Or set that URL to [VERSION] and call Make as: make status=CR
    1.15 +#
    1.16 +#
    1.17 +# Possible other options to add to the curl command below:
    1.18  # -F ids=on
    1.19  
    1.20 +cdate = $(shell date +%Y%m%d)
    1.21 +status = ED
    1.22 +
    1.23  %.html: %.src.html
    1.24  	@echo "Calling post-processor to generate $@..."
    1.25 -	@curl -F file=@$< -F group=CSS -F output=html -F method=file -s -K ~/.curl-w3.org https://www.w3.org/Style/Group/process.cgi >$@
    1.26 +	@curl -F file=@$< -F group=CSS -F output=html -F method=file -s \
    1.27 +	-F date=$(cdate) -F status=$(status) \
    1.28 +	-K ~/.curl-w3.org https://www.w3.org/Style/Group/process.cgi >$@
    1.29  %.err: %.src.html
    1.30  	@echo "Calling post-processor to check $<..."
    1.31 -	@curl -F file=@$< -F group=CSS -F output=err -F method=file -s -K ~/.curl-w3.org https://www.w3.org/Style/Group/process.cgi >$@
    1.32 +	@curl -F file=@$< -F group=CSS -F output=err -F method=file -s \
    1.33 +	-F date=$(cdate) -F status=$(status) \
    1.34 +	-K ~/.curl-w3.org https://www.w3.org/Style/Group/process.cgi >$@
    1.35  
    1.36  
    1.37  
    1.38 @@ -25,15 +38,9 @@
    1.39  
    1.40  # A handy shortcut:
    1.41  
    1.42 -commit: update clean all
    1.43 -	cvs commit -m 'Generated. Do not edit!' Overview.html
    1.44 -
    1.45 -update:
    1.46 -	cvs update
    1.47 -
    1.48  clean:
    1.49  	rm Overview.html
    1.50  
    1.51  
    1.52  
    1.53 -.PHONY: check commit update clean
    1.54 +.PHONY: check clean
     2.1 --- a/css3-conditional/Overview.html	Fri Feb 08 14:04:09 2013 -0800
     2.2 +++ b/css3-conditional/Overview.html	Fri Feb 08 21:43:29 2013 -0800
     2.3 @@ -1172,13 +1172,14 @@
     2.4      by one. It must throw INDEX_SIZE_ERR if index is greater than
     2.5      <code>cssRules.length</code>. It must throw SYNTAX_ERR if the rule has a
     2.6      syntax error and is unparseable; this does not include syntax errors
     2.7 -    handled by error handling rules for constructs inside of the rule. It
     2.8 +    handled by error handling rules for constructs inside of the rule, but
     2.9 +    this does include cases where the string given does not parse into a
    2.10 +    single CSS rule (such as when the string is empty) or where there is
    2.11 +    anything other than whitespace or comments after that single CSS rule. It
    2.12      must throw HIERARCHY_REQUEST_ERR if the rule cannot be inserted at the
    2.13      location specified, for example, if an ‘<code
    2.14 -    class=css>@import</code>’ rule is inserted inside a group rule. <span
    2.15 -    class=issue>This needs to specify what to do if <code>rule</code> is the
    2.16 -    empty string, if it contains more than one CSS rule, or if it contains
    2.17 -    garbage after a valid rule.</span>
    2.18 +    class=css>@import</code>’ rule is inserted inside a group rule.
    2.19 +    <p>The return value is the <var>index</var> parameter.
    2.20  
    2.21     <dt><code>deleteRule (unsigned long index)</code>, return
    2.22      <code>void</code>
     3.1 --- a/css3-conditional/Overview.src.html	Fri Feb 08 14:04:09 2013 -0800
     3.2 +++ b/css3-conditional/Overview.src.html	Fri Feb 08 21:43:29 2013 -0800
     3.3 @@ -906,15 +906,16 @@
     3.4      It must throw SYNTAX_ERR
     3.5      if the rule has a syntax error and is unparseable;
     3.6      this does not include syntax errors handled by error handling rules
     3.7 -    for constructs inside of the rule.
     3.8 +    for constructs inside of the rule,
     3.9 +    but this does include cases where the string given
    3.10 +    does not parse into a single CSS rule (such as when the string is empty)
    3.11 +    or where there is anything other than whitespace or comments
    3.12 +    after that single CSS rule.
    3.13      It must throw HIERARCHY_REQUEST_ERR
    3.14      if the rule cannot be inserted at the location specified,
    3.15      for example, if an ''@import'' rule is inserted inside a group rule.
    3.16  
    3.17 -    <span class="issue">This needs to specify what to do
    3.18 -    if <code>rule</code> is the empty string,
    3.19 -    if it contains more than one CSS rule,
    3.20 -    or if it contains garbage after a valid rule.</span>
    3.21 +    <p>The return value is the <var>index</var> parameter.
    3.22  
    3.23    <dt><code>deleteRule (unsigned long index)</code>, return <code>void</code>
    3.24    <dd>

mercurial