- From: Ian Hickson <ian@hixie.ch>
- Date: Thu, 21 Aug 2008 23:33:22 +0000 (UTC)
On Thu, 12 Jul 2007, Smylers wrote: > > <meter> in the current spec refers to 'the steps for finding one or two > numbers of a ratio in a string', and the user-agent requirements for > determining the maximum value explicitly allow for the textContent to > contain just one number (and no denominator punctuation character) -- > for example if the maximum is specified in the attribute, or if the > default max of 1 is desired: > > http://www.whatwg.org/specs/web-apps/current-work/#meter > > So these should be allowed: > > <meter max="5">3</meter> > > <meter>0.59</meter> > > However the steps referred to don't, despite their name, seem to have > any way of returning just 1 number: > > http://www.whatwg.org/specs/web-apps/current-work/#ratios > > The only places where the steps return something (as distinct from > nothing) are step 8, which returns a number and a denominator character, > and step 14, which returns two numbers. > > In particular for a <meter> like either of the above, the number will be > parsed as number1 in step 4, then steps 6-8 will have no affect (because > there is no denominator character), step 9 will fail to find a second > number, and therefore step 10 will return nothing. > > I think that making step 10 instead return number1 will yield the > desired behaviour. Good catch, thanks. Fixed. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 21 August 2008 16:33:22 UTC