some fixes you might want in Safari and two questions

Darin Adler darin at apple.com
Thu Apr 17 12:28:15 CEST 2003


On Thursday, April 17, 2003, at 9:29 AM, Lars Knoll wrote:

> I noticed, that there are two crash fixes we made in khtml's css code, 
> that
> are still not part of Safari as far as I can tell. They are attached 
> below.

Thanks!

> I also noticed, that you allow "foo { color: 0000ff }" (without the 
> required
> hash) even in strict parsing mode, while you forbid "color: 123456". 
> IMO the
> first one should be forbidden aswell. (ie. in cssparser.cpp:parseColor 
> allow
> tokens of type DIMENSION only in non strict parsing mode).

Sounds right. Just an oversight on our part.

> Another thing I noticed is this diff in the css tokenizer (in v73):
>
>  {num}{ident}            {yyTok = DIMEN; return yyTok;}
> -{num}%                  {yyTok = PERCENTAGE; return yyTok;}
> +{num}%+                 {yyTok = PERCENTAGE; return yyTok;}
>  {num}                   {yyTok = NUMBER; return yyTok;}
>
> Any reason for this?

This was a last minute fix for compatibility with a site 
(forums.macnn.com) that had a table with a width of width="90%%". We 
didn't do the best solution we could think of because it was so close 
to our deadline. One possibility Dave favored was to parse HTML widths 
separately as we do for colors rather than using the CSS parser.

> it would IMO be better to add another token BROKEN_PERCENTAGE to
> the tokenizer [and allow it only in quirks mode]

Sure, that sounds fine.

     -- Darin



More information about the Khtml-devel mailing list