some fixes you might want in Safari and two questions
Dirk Mueller
mueller at kde.org
Fri Apr 18 19:04:47 CEST 2003
On Fre, 18 Apr 2003, Lars Knoll wrote:
> > I don't see right now where this code went .. it seems like it was
> > simply removed during the parser rewrite. Lars?
> HTMLElementImpl::addCSSLength() is still there if that's what you mean.
Hmm, no, I was looking for DOMStringImpl::toLength(). This method deals
properly with all the crap stuff like "5*%" or "+99.9%" and other
obscurities.
It seems toLength() is now unused, which is probably why this bug creeped up
again. I'll see about merging that code into addCSSLength, which will fix
the %% issue as well.
>
> for ( ;l < v->l; l++ ) {
> char cc = v->s[l].latin1();
> - if ( cc > '9' || ( cc < '0' && ( numOnly || (cc != '%' && cc
> != '.' &&
> - !( multiLength &&
> cc == '*') ) ) ) )
> + if (!numOnly && (cc == '%' || cc != '.' ||
> + (multiLength && cc == '*') ) ) {
> + ++l;
> + break;
> + }
> + if ( cc > '9' || cc < '0' )
> break;
Ok, but this still doesn't deal with + / - or whitespaces in weird places
(or duplicate * / %, I remember that * always takes precedence over % during
parsing).
--
Dirk
More information about the Khtml-devel
mailing list