Bug 175033 - Incorrect border clipping caused by border-radius on container element w/ fractional pixel width (Retina only)
Summary: Incorrect border clipping caused by border-radius on container element w/ fra...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 10
Hardware: Mac macOS 10.12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-01 10:22 PDT by Marco
Modified: 2017-08-01 11:20 PDT (History)
5 users (show)

See Also:


Attachments
Test case that reproduces the bug (381 bytes, text/html)
2017-08-01 10:22 PDT, Marco
no flags Details
Screenshot comparing the rendering of the testcase page on Chrome, Firefox and Safari (110.74 KB, image/png)
2017-08-01 10:23 PDT, Marco
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco 2017-08-01 10:22:24 PDT
Created attachment 316867 [details]
Test case that reproduces the bug

On Retina Displays, Webkit is incorrectly clipping the right border of a nested element when its parent:

1- Has `border-radius` set to a value other than 0;
2- Has a non-integer computed pixel width (Caused, for instance by setting its width to something like 33.3333%, and resizing the window to a width that's not a multiple of 3)

I can reproduce the error on both Safari 10 and on the Nightly Webkit builds. I've found other bugs related to clipping, but couldn't find one with the exact repro steps of this one, so sorry if it's a duplicate.

I've attached a testcase that triggers the bug.

Instructions:

1. Open testcase.html on Safari on a Mac with a Retina display. 
2. The page should render a rectangle with a red 1px border (= 2 device pixels on the retina display).
3. Slowly resize the Safari window horizontally
4. For some window sizes, the right border of the rectangle will get incorrectly clipped to 0.5px (= 1 device pixel on the retina display)

Thanks.
Comment 1 Marco 2017-08-01 10:23:57 PDT
Created attachment 316868 [details]
Screenshot comparing the rendering of the testcase page on Chrome, Firefox and Safari
Comment 2 Radar WebKit Bug Importer 2017-08-01 11:20:06 PDT
<rdar://problem/33658068>