Bug 28804

Summary: Decimal CSS px dimensions round down to nearest pixel
Product: WebKit Reporter: Daniel Wagner-Hall <dawagner>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: davidbarr, dawagner, eae, jasneet, leviw
Priority: P4    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 60318    
Bug Blocks:    
Attachments:
Description Flags
Page showing bug none

Description Daniel Wagner-Hall 2009-08-28 06:06:46 PDT
Created attachment 38727 [details]
Page showing bug

The CSS spec (http://www.w3.org/TR/CSS21/syndata.html#value-def-length) says "The format of a length value (denoted by <length> in this specification) is a <number> (with or without a decimal point) immediately followed by a unit identifier (e.g., px, em, etc.)".  In WebKit, if the <length> has a decimal point, anything following it before the unit is ignored.

This behaviour is consistent with Internet Explorer but not with Firefox or the CSS spec.
Comment 1 Alexey Proskuryakov 2009-09-01 10:58:29 PDT
This looks closely related to bug 18978.
Comment 2 Levi Weintraub 2012-02-03 12:57:25 PST
*** Bug 18978 has been marked as a duplicate of this bug. ***
Comment 3 David Barr 2012-02-08 20:13:55 PST
As noted in the metadata, the bug is blocked on sub-pixel layout support:
https://bugs.webkit.org/show_bug.cgi?id=60318

Confirmed in WebKit Nightly r107164.
Comment 4 Emil A Eklund 2012-10-08 16:16:57 PDT
This has been fixed by subpixel layout and works as expected on ports that enable the SUBPIXEL_LAYOUT flag. Marking as fixed.

Bug 85532 tracks the ports that have turned on the flag.