Bug 139377 - Subpixel rendering(non-retina only): Half-pixel margin causes incorrect border-bottom rendering.
Summary: Subpixel rendering(non-retina only): Half-pixel margin causes incorrect borde...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.9
: P2 Normal
Assignee: Nobody
URL: http://buzzera.com/border-bottom-rend...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-07 16:19 PST by jonathan
Modified: 2023-06-29 00:28 PDT (History)
3 users (show)

See Also:


Attachments
Reduced test case (1.02 KB, text/html)
2014-12-07 16:19 PST, jonathan
no flags Details
Screenshot (showing bug and expected result) (29.32 KB, image/png)
2014-12-07 16:20 PST, jonathan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jonathan 2014-12-07 16:19:33 PST
Created attachment 242773 [details]
Reduced test case

With some specific CSS rules, the border-bottom of an element is rendered too light or not at all. See the attached test page and screenshot.

Requirements to trigger:
* margin-top: half-pixel value (i.e., 10.5px, or 0.65625em which is 10.5px if 1em=16px)
* border: 1px solid with some color
* border-[left/right]-width: 0px
* border-bottom-[left/right]-radius: >= 2px

Two elements with these rules should be placed after each other. Depending on the elements above it, one of these will have the rendering issue:

If one of border-bottom-[left/right]-radius is set, the border-bottom is rendered only half visible; if both are set, the border-bottom is not rendered at all.

The issue might seem far-fetched, but I encountered it in a real project I'm working on. Especially when using em's for margins you can't foresee half-pixel margin values, and thus trigger this issue.

Tested in:
* Safari 7.1 (9537.85.10.17.1) with WebKit 600.1.17
* Nightly: Safari 7.1 (9537.85.10.17.1, r176637) with WebKit 601.1.11+
Comment 1 jonathan 2014-12-07 16:20:22 PST
Created attachment 242774 [details]
Screenshot (showing bug and expected result)
Comment 2 zalan 2014-12-09 07:03:59 PST
Works fine on retina display. (1x display issue only)