W3C home > Mailing lists > Public > public-css-testsuite@w3.org > December 2009

RE: Range of integer values (wrt 1 Microsoft z-index test)

From: Arron Eicholz <Arron.Eicholz@microsoft.com>
Date: Sat, 19 Dec 2009 00:44:19 +0000
To: "css21testsuite@gtalbot.org" <css21testsuite@gtalbot.org>, "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Message-ID: <651D2A831D17C040B828D62270386CE92995646A@TK5EX14MBXC132.redmond.corp.microsoft.com>
Gérard Talbot wrote:
> This test
> http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_9/z-index-001.xht
> must be reviewed, reassessed.
> Its assertion field states something that CSS 2.1 spec does not specify, does not define anywhere:
> <meta name="assert" content="The property z-index set to a minimum value minus 1 is correctly truncated to the minimum value.">

This assertion was discussed at the CSS WG F2F in Beijing. It was decided that tests need to test some boundaries that were reasonable. In the case of integer it was easy enough to find the definition of integer in the C Language Specification. Though I am not going to put up much of a battle for the exact number defined in the test case I will put up the question "How do we test that the boundaries are supported correctly for <integers>, <numbers> and <lengths>?". This must be defined or the spec is untestable for all scenarios.

> http://www.w3.org/TR/CSS21/visuren.html#propdef-z-index
> makes no mentions of any truncation method and of any specific (floor) minimum value
>
> Section 4.3.1 Integers and real numbers
> http://www.w3.org/TR/CSS21/syndata.html#numbers
>
> states
>
> "Note that many properties that allow an integer or real number as a value actually restrict the value to some range, often to a non-negative value."
>
> but does not state and does not suggest any floor and/or ceiling values.

We discussed truncating at Beijing as well and we decided that it is better to truncate than roll the value over from negative to positive and positive to negative in the case of integer overflows. The word restrict would imply that you cannot go beyond the maximum value or the minimum values when defining an integer. The issue with the sentence is really the words "some range".

Since there are no clear definition for "some range" (i.e. minimums or maximums) for integers, real numbers, or lengths for that matter, a value range between 0-10 is all that is needed to be standards compliant. Though not very useful to the world it would meet with the specification and be a standards compliant implementation.

What I recommend is that we define some reasonable testable definition of minimums and maximums that user agents must support but allow user agents to support beyond that definition as necessary. This allows for interoperable implementations, and testable assertions, and allows web developers a number that they can rely on. However in the case of <integer> this is defined by a different specification and is already defined as -2,147,483,648 to 2,147,483,647. If we want to use that definition I think it makes the most sense. Again if these definitions are not defined then the spec is not testable for all scenarios and we cannot move it to REC because we can't prove that the maximum or minimum values are supported correctly.

There is also an issue with the section 1.2.2.1 where the modifiers + and * are discussed. These also need a maximum number to be supported or again any property that contains the modifiers cannot be fully tested.

--
Thanks,
Arron Eicholz
Received on Saturday, 19 December 2009 00:44:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:52:01 GMT