Bug 133184

Summary: Subpixel rendering: Non-compositing transforms with subpixel coordinates paint to wrong position.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, simon.fraser
Priority: P2 Keywords: InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test reduction
none
Patch none

Description zalan 2014-05-22 10:06:57 PDT
<rdar://problem/16745606>
Comment 1 zalan 2014-05-22 10:07:28 PDT
Created attachment 231893 [details]
Test reduction
Comment 2 zalan 2014-05-22 10:30:14 PDT
With render layer on (2x display)
1. container positioned at (10, 10) 
2. child box with (non-compositing transform) negative top/left: (-0.25, -0.25)
-> painting coordinates (-0.25, -0.25 round-> -0.5, -0.5) -> in absolute coordinates -> (9.5, 9.5)

without render layer
1. container positioned at (10, 10) 
2. child box with negative top/left: (-0.25, -0.25)
-> painting coordinates ((-0.25, -0.25) -> (10 - 0.25, 10 - 0.25) -> (9.75, 9.75)  round-> (10, 10). final painting coords (10, 10)

This happens only on halfway values as the rounding direction is different for negative and positive values. (always away from zero). 

-non halfway values 
container at (10, 10)

child (RenderLayer on): (-0.1, -0.1) round-> (-0, -0) -> in absolute coords (10, 10)
child (RenderLayer off): (-0.1, -0.1) -> (10 - 0.1, 10 - 0.1) -> (9.9, 9.9) round-> (10, 10)

child (RenderLayer on): (-0.3, -0.3) round-> (-0.5, -0.5) -> in absolute coords (9.5, 9.5)
child (RenderLayer off): (-0.3, -0.3) -> (10 - 0.3, 10 - 0.3) -> (9.7, 9.7) round-> (9.5, 9.5)
Comment 3 zalan 2014-05-23 16:33:45 PDT
*** Bug 133241 has been marked as a duplicate of this bug. ***
Comment 4 zalan 2014-05-23 16:38:49 PDT
Created attachment 232002 [details]
Patch
Comment 5 WebKit Commit Bot 2014-05-23 16:40:00 PDT
Attachment 232002 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/LayoutUnit.h:940:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 WebKit Commit Bot 2014-05-24 07:51:12 PDT
Comment on attachment 232002 [details]
Patch

Clearing flags on attachment: 232002

Committed r169309: <http://trac.webkit.org/changeset/169309>
Comment 7 WebKit Commit Bot 2014-05-24 07:51:16 PDT
All reviewed patches have been landed.  Closing bug.