[Webkit-unassigned] [Bug 119324] [CSS Masking] -webkit-mask-repeat: space does not work
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 5 04:27:29 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=119324
--- Comment #7 from Andrei Parvu <parvu at adobe.com> 2013-08-05 04:27:09 PST ---
> > Source/WebCore/platform/graphics/cg/ImageCG.cpp:136
> > + // On Leopard and newer, this code now only runs for partially decoded images whose buffers do not yet match the overall size of the image.
> > + static const CGPatternCallbacks patternCallbacks = { 0, drawPatternCallback, 0 };
> > + CGAffineTransform matrix = CGAffineTransformMake(narrowPrecisionToCGFloat(patternTransform.a()), 0, 0, narrowPrecisionToCGFloat(patternTransform.d()), adjustedX, adjustedY);
> > + matrix = CGAffineTransformConcat(matrix, CGContextGetCTM(context));
> > + // The top of a partially-decoded image is drawn at the bottom of the tile. Map it to the top.
> > + matrix = CGAffineTransformTranslate(matrix, 0, size().height() - h);
> > + RetainPtr<CGPatternRef> pattern = adoptCF(CGPatternCreate(subImage.get(), CGRectMake(0, 0, tileRect.width(), tileRect.height()),
> > + matrix, tileRect.width() + spaceSize().width(), tileRect.height() + spaceSize().height(),
> > + kCGPatternTilingConstantSpacing, true, &patternCallbacks));
> > + if (!pattern)
> > + return;
> > +
>
> It would be great if you can use the Pattern class already in WebKit to do that, so that it works in all ports, not just Mac. You may need to add some more code to Pattern to make that possible. Can you check this first please? Resetting review flag for now.
That code was already there (except the adding of 'spaceSize'). I will try using the Pattern class but it would require some changes (you have to pass a CGImageRef to it which you currently cannot).
> > LayoutTests/css3/background/background-repeat-border-expected.html:16
> > + var urls = Array(), size = Array(), position = Array(), repeat = Array(),
> > + origin = Array(), clip = Array();
>
> Does that all need to be JS? Can't you just write a simple test case to make sure that it works?
I wanted some tests with masks which are being repeated a bigger number of times - adding 12 masks manually seemed ugly :). Though I can get rid of the repeat, origin and clip arrays, apparently I only need to specifiy them once.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list