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

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 UTC