Bug 28804 - Decimal CSS px dimensions round down to nearest pixel
Summary: Decimal CSS px dimensions round down to nearest pixel
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P4 Normal
Assignee: Nobody
: 18978 (view as bug list)
Depends on: 60318
  Show dependency treegraph
Reported: 2009-08-28 06:06 PDT by Daniel Wagner-Hall
Modified: 2012-10-08 16:16 PDT (History)
5 users (show)

See Also:

Page showing bug (469 bytes, text/html)
2009-08-28 06:06 PDT, Daniel Wagner-Hall
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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:

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.