Bug 19179

Summary: Edge fringe artifact with transformed, masked elements (including reflections)
Product: WebKit Reporter: CJ Yetman <cj>
Component: CSSAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, bugs.webkit.org, cabel, darin, dino, mail, mitz, rik, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
testcase
none
more dramatic demonstration
none
Screenshot
none
Patch bdakin: review+

CJ Yetman
Reported 2008-05-21 20:37:33 PDT
When adding a reflection with -webkit-box-reflect that has a gradient mask... if you also use -webkit-transform: skew, you will see a line at the edge of the reflected image. You will not see the line if the skew is removed or set to 0 degrees. Probably just something to do with the anti-aliasing of the gradient or the skewed image, but there should be some way to resolve it. Sorry, I don't know all the proper terminology, so I'll just attach a test case. (Tested on latest nightly r33980)
Attachments
testcase (610 bytes, text/html)
2008-05-21 20:39 PDT, CJ Yetman
no flags
more dramatic demonstration (646 bytes, text/html)
2008-05-22 11:48 PDT, CJ Yetman
no flags
Screenshot (9.80 KB, image/png)
2009-01-03 19:50 PST, Simon Fraser (smfr)
no flags
Patch (40.01 KB, patch)
2010-10-07 13:43 PDT, Simon Fraser (smfr)
bdakin: review+
CJ Yetman
Comment 1 2008-05-21 20:39:54 PDT
Created attachment 21282 [details] testcase
CJ Yetman
Comment 2 2008-05-22 11:48:34 PDT
Created attachment 21298 [details] more dramatic demonstration
mitz
Comment 3 2008-05-22 12:09:01 PDT
Great test cases. Thanks!
mitz
Comment 4 2008-05-22 12:46:07 PDT
This can probably happens when applying any mask to any transformed box.
Simon Fraser (smfr)
Comment 5 2009-01-03 19:50:58 PST
Created attachment 26404 [details] Screenshot
David Harrison
Comment 6 2009-02-21 08:54:05 PST
mitz
Comment 7 2009-10-04 22:41:49 PDT
*** Bug 30040 has been marked as a duplicate of this bug. ***
Simon Fraser (smfr)
Comment 8 2009-12-16 10:25:02 PST
Simon Fraser (smfr)
Comment 9 2009-12-16 10:27:17 PST
*** Bug 27832 has been marked as a duplicate of this bug. ***
Darin Adler
Comment 10 2009-12-16 10:33:08 PST
rdar://6608800 is a different issue. We need a new Radar report.
mitz
Comment 11 2010-02-16 15:45:08 PST
Simon Fraser (smfr)
Comment 12 2010-07-07 17:52:56 PDT
*** Bug 39248 has been marked as a duplicate of this bug. ***
Simon Fraser (smfr)
Comment 13 2010-10-07 11:39:22 PDT
Maybe fix: diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp index d54af1f..8b643b4 100644 --- a/WebCore/rendering/RenderBox.cpp +++ b/WebCore/rendering/RenderBox.cpp @@ -814,6 +814,11 @@ void RenderBox::paintMaskImages(const PaintInfo& paintInfo, int tx, int ty, int bool allMaskImagesLoaded = true; if (!compositedMask) { + // If the context has a rotation, scale or skew, then use a transparency layer to avoid + // pixel cruft around the edge of the mask. + AffineTransform currentCTM = paintInfo.context->getCTM(); + pushTransparencyLayer = !currentCTM.isIdentityOrTranslationOrFlipped();; + StyleImage* maskBoxImage = style()->maskBoxImage().image(); const FillLayer* maskLayers = style()->maskLayers();
Simon Fraser (smfr)
Comment 14 2010-10-07 13:43:14 PDT
Simon Fraser (smfr)
Comment 15 2010-10-07 13:49:39 PDT
Note You need to log in before you can comment on or make changes to this bug.