Bug 59213

Summary: rounded corners don't looks smooth when background-image is a gradient
Product: WebKit Reporter: Vicki Murley <vicki>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.6   
Attachments:
Description Flags
test cases for buttons with gradients as background images
none
Reduction
none
Patch mitz: review+

Vicki Murley
Reported 2011-04-22 11:20:50 PDT
Created attachment 90729 [details] test cases for buttons with gradients as background images Follow up to https://bugs.webkit.org/show_bug.cgi?id=21819 When an element has rounded corners and the uses a gradient as the background image, the rounded edges don't look smooth. Some color, from the gradient or the background color, is bleeding through the edges. Attached two examples. The first is the same example attached to https://bugs.webkit.org/show_bug.cgi?id=21819, plus a gradient. The second is a slightly more complicated mock-up of iPhone-style buttons.
Attachments
test cases for buttons with gradients as background images (160.42 KB, application/zip)
2011-04-22 11:20 PDT, Vicki Murley
no flags
Reduction (359 bytes, text/html)
2011-04-22 11:23 PDT, Simon Fraser (smfr)
no flags
Patch (14.35 KB, patch)
2011-04-22 11:59 PDT, Simon Fraser (smfr)
mitz: review+
Simon Fraser (smfr)
Comment 1 2011-04-22 11:23:17 PDT
Created attachment 90730 [details] Reduction
Simon Fraser (smfr)
Comment 2 2011-04-22 11:59:04 PDT
mitz
Comment 3 2011-04-22 12:06:43 PDT
Comment on attachment 90736 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=90736&action=review > Source/WebCore/rendering/RenderBoxModelObject.cpp:584 > + adjustedRect.inflateX(-ceilf(1.0f / contextScale.width())); > + adjustedRect.inflateY(-ceilf(1.0f / contextScale.height())); Drop the .0f
Simon Fraser (smfr)
Comment 4 2011-04-22 12:54:47 PDT
Note You need to log in before you can comment on or make changes to this bug.