[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/khtml/html
From: Allan Sandfeld Jensen <kde () carewolf ! com>
Date: 2004-12-21 15:48:30
Message-ID: 20041221154830.4EC7F1CFB7 () office ! kde ! org
[Download RAW message or body]
CVS commit by carewolf:
Don't clean completely digitless "numbers".
BUG: 79731
M +5 -2 html_elementimpl.cpp 1.183
--- kdelibs/khtml/html/html_elementimpl.cpp #1.182:1.183
@@ -289,5 +289,5 @@ void HTMLElementImpl::addCSSLength(int i
if ( value.implementation() ) {
// match \s*[+-]?\d*(\.\d*)?[%\*]?
- unsigned i = 0;
+ unsigned i = 0, j = 0;
QChar* s = value.implementation()->s;
unsigned l = value.implementation()->l;
@@ -298,5 +298,8 @@ void HTMLElementImpl::addCSSLength(int i
++i;
while (i < l && s[i].isDigit())
- ++i;
+ ++i,++j;
+
+ // no digits!
+ if (j == 0) return;
int v = kClamp( QConstString(s, i).string().toInt(), -8192, 8191 ) ;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic