Bug 90281 - Paddings are rounded to whole pixels
Summary: Paddings are rounded to whole pixels
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 90097
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-29 07:42 PDT by Behdad Esfahbod
Modified: 2022-12-16 02:31 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Behdad Esfahbod 2012-06-29 07:42:46 PDT
Test with Chrome that has SUBPIXEL_LAYOUT enabled.  While testing for bug 90097, I came across this bug:

According to https://trac.webkit.org/wiki/LayoutUnit paddings are supposed to have subpixel precision, but this sample shows that they are being rounded:

  http://jsfiddle.net/behdad/ALd5F/5/

Output:

span[position:static; padding-right:7.5px]: rect.width=7
span[position:fixed; padding-right:7.5px]: rect.width=7
span[position:absolute; padding-right:7.5px]: rect.width=7
span[position:relative; padding-right:7.5px]: rect.width=7


Applying patches in bug 90097 fixes the two middle cases, but no the other two:

span[position:static; padding-right:7.5px]: rect.width=7
span[position:fixed; padding-right:7.5px]: rect.width=7.5
span[position:absolute; padding-right:7.5px]: rect.width=7.5
span[position:relative; padding-right:7.5px]: rect.width=7
Comment 1 Rob Buis 2021-04-03 14:08:31 PDT
This works these days.
Comment 2 Ahmad Saleem 2022-12-16 02:31:50 PST
*** Safari Technology Preview 160 ***

span[position:static; padding-right:7.5px]: rect.width=7.5
span[position:fixed; padding-right:7.5px]: rect.width=7.5
span[position:absolute; padding-right:7.5px]: rect.width=7.5
span[position:relative; padding-right:7.5px]: rect.width=7.5

*** Chrome Canary 110 ***

span[position:static; padding-right:7.5px]: rect.width=7.5
span[position:fixed; padding-right:7.5px]: rect.width=7.5
span[position:absolute; padding-right:7.5px]: rect.width=7.5
span[position:relative; padding-right:7.5px]: rect.width=7.5

*** Firefox Nightly 110 ***

span[position:static; padding-right:7.5px]: rect.width=7.5
span[position:fixed; padding-right:7.5px]: rect.width=7.5
span[position:absolute; padding-right:7.5px]: rect.width=7.5
span[position:relative; padding-right:7.5px]: rect.width=7.5

_______

Since all browsers are matching each other, I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!