W3C home > Mailing lists > Public > public-html@w3.org > May 2008

Re: Ratios Do Not Return Errors (part of detailed review of common microsyntaxes)

From: Adam Barth <w3c@adambarth.com>
Date: Wed, 7 May 2008 23:08:22 -0700
Message-ID: <7789133a0805072308s4287a90bq88faf994c41e1063@mail.gmail.com>
To: "Ian Hickson" <ian@hixie.ch>
Cc: "Geoffrey Sneddon" <foolistbar@googlemail.com>, Smylers <Smylers@stripey.com>, public-html@w3.org
Hi Ian,

I think there is a bug in the processing rules for the <meter>
element.  The spec says:

"All of which should result in the following inequalities all being true:
[...]
minimum value  low boundary  high boundary  maximum value"

but it seems like <meter min=5 max=10 low=12 high=3 value=7> will result in

min=5
max=10
low=12
high=3
value=7

The issue is that the low boundary computation doesn't check against
max and the high boundary computation doesn't check against min or
low.

Adam


On Wed, May 7, 2008 at 10:42 PM, Ian Hickson <ian@hixie.ch> wrote:
>
>  On Wed, 11 Jul 2007, Geoffrey Sneddon wrote:
>  > On 11 Jul 2007, at 13:17, Smylers wrote:
>  > > Geoffrey Sneddon writes:
>  > >
>  > > > The rest of the numbers within common microsyntaxes return errors
>  > > > when they are unable to return anything else, yet ratios "return
>  > > > nothing" ... why do ratios return nothing and not false?
>  > >
>  > > Look at the definition of the <meter> element; getting numbers out of
>  > > a ratio is optional (since they can also be specified with attributes,
>  > > or default values used), so it is not an error for no numbers to be
>  > > returned when trying to parse a ratio:
>  > >
>  > >   http://www.whatwg.org/specs/web-apps/current-work/#meter
>  >
>  > However, you only ever try and parse the textContent if @value has been
>  > omitted. If @value has been omitted and the content parses to be
>  > nothing, @value is currently assumed to be zero. Surely we should
>  > require, when @value is missing, a value to be able to be found within
>  > |meter|?
>
>  No, the <meter> might just be idling at 0 until the author wants it to be
>  something else. I don't see why we would need to force the author to
>  include text or use the attributes.
>
>  --
>  Ian Hickson               U+1047E                )\._.,--....,'``.    fL
>  http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
>  Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>
>
Received on Friday, 9 May 2008 10:57:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:17 GMT