WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 52699
53836
Webkit is ignoring fractional point values when using units in CSS
https://bugs.webkit.org/show_bug.cgi?id=53836
Summary
Webkit is ignoring fractional point values when using units in CSS
Rik Cabanier
Reported
2011-02-04 19:39:58 PST
The webkit parser casts units to integer instead of keeping them as double or float. This causes imprecise placing of objects if they use webkit-transforms with transform(px, px) notation. In order to fix this, I think we need to fix CSSStyleSelector.cpp line 3051-3052 from: } else if (CSSPrimitiveValue::isUnitTypeLength(type)) l = Length(primitiveValue->computeLengthIntForLength(style, rootStyle, multiplier), Fixed); to: } else if (CSSPrimitiveValue::isUnitTypeLength(type)) l = Length(primitiveValue->computeLengthFloat(style, rootStyle, multiplier, false), Fixed); Attached is a iip file that contains a page that uses transforms with px notation.
Attachments
zip with HTML sample
(18.58 KB, application/octet-stream)
2011-02-04 19:41 PST
,
Rik Cabanier
no flags
Details
correct zip with html. Please ignore the first one
(18.57 KB, application/octet-stream)
2011-02-04 20:24 PST
,
Rik Cabanier
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Rik Cabanier
Comment 1
2011-02-04 19:41:15 PST
Created
attachment 81339
[details]
zip with HTML sample
Rik Cabanier
Comment 2
2011-02-04 20:24:31 PST
Created
attachment 81343
[details]
correct zip with html. Please ignore the first one
Rik Cabanier
Comment 3
2011-02-04 20:25:29 PST
(In reply to
comment #0
)
> The webkit parser casts units to integer instead of keeping them as double or float. > This causes imprecise placing of objects if they use webkit-transforms with transform(px, px) notation. > > In order to fix this, I think we need to fix CSSStyleSelector.cpp line 3051-3052 > from: > } else if (CSSPrimitiveValue::isUnitTypeLength(type)) > l = Length(primitiveValue->computeLengthIntForLength(style, rootStyle, multiplier), Fixed); > to: > } else if (CSSPrimitiveValue::isUnitTypeLength(type)) > l = Length(primitiveValue->computeLengthFloat(style, rootStyle, multiplier, false), Fixed); > > Attached is a iip file that contains a page that uses transforms with px notation.
My proposal doesn't work because length always wants to be an integer. It seems that it needs to be expanded to accept a float...
Rik Cabanier
Comment 4
2011-02-08 09:07:14 PST
*** This bug has been marked as a duplicate of
bug 52699
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug