Re: Microsyntax parsing rules for numbers

On Thu, 04 Dec 2008 17:15:18 +0100, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> Simon Pieters wrote:
>> Mozilla checks if the next character is [a-fA-F] and if so, act as if  
>> the attribute was absent. It does this for maxlength, hspace, vspace,  
>> border, cols, rows, size, span, colspan, rowspan, cellpadding,  
>> cellspacing, topmargin, leftmargin, marginwidth, marginheight,  
>> scrollamount, scrolldelay, start, value.
>>  For other attributes (e.g. width and height) IE and Mozilla match  
>> HTML5.
>
> Odd.  We do the same thing for width and height that we do for  
> everything else, as far as I can tell...

Um. Yeah. Sorry. I was confused. IE treats them differently though.


> So <input width="500f"> will look just like <input> in Mozilla  
> (certainly does over here).

So does <input width=500> since width isn't an attribute for input. But  
<img width=1a> and <img> (in quirks mode) render the same (and different  
 from <img width=1>).


> I do agree that treating a-fA-F garbage as special is a bit weird; it's  
> an artifact of using a general-purpose string-to-integer function which  
> treats this case as a hex number where a decimal one was expected and  
> returns an "unable to parse string" error.

Ok.

-- 
Simon Pieters
Opera Software

Received on Thursday, 4 December 2008 17:00:20 UTC