* khtml/xml/dom_stringimpl.cpp:
(DOM::parseLength):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6627
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2004-05-18 Decker Kevin <kdecker@apple.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ * khtml/xml/dom_stringimpl.cpp:
+ (DOM::parseLength):
+
2004-05-18 Richard Williamson <rjw@apple.com>
Added stubs to get the WebScriptObject for the window
return new DOMStringImpl(s + pos, len);
}
-static Length parseLength(QChar *s, unsigned int l)
+static Length parseLength(QChar *s, unsigned int l) //kevin was here
{
const QChar* last = s+l-1;
-
+
+ if(!s->isDigit()) {
+ return Length(1,Relative);
+ }
+
if ( *last == QChar('%')) {
// CSS allows one decimal after the point, like
// 42.2%, but not 42.22%