[Webkit-unassigned] [Bug 102654] Zero size gradient should paint nothing on canvas

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 18 07:24:40 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=102654


Dirk Schulze <krit at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #181627|review?                     |review-
               Flag|                            |




--- Comment #26 from Dirk Schulze <krit at webkit.org>  2013-01-18 07:26:24 PST ---
(From update of attachment 181627)
View in context: https://bugs.webkit.org/attachment.cgi?id=181627&action=review

> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:2251
> +    // If gradient size is zero, then paint nothing.
> +    Gradient* gradient = c->strokeGradient();
> +    if (!fill && gradient && gradient->isZeroSize())
> +        return;
> +
> +    gradient = c->fillGradient();
> +    if (fill && gradient && gradient->isZeroSize())
> +        return;

Now I got it. You can just do one operation per call. Either fill or stroke. LGTM.

> LayoutTests/ChangeLog:23
> +        * canvas/philip/tests/2d.gradient.interpolate.zerosize.fill-expected.txt: Added.
> +        * canvas/philip/tests/2d.gradient.interpolate.zerosize.fill.html: Added.
> +        * canvas/philip/tests/2d.gradient.interpolate.zerosize.fillText-expected.txt: Added.
> +        * canvas/philip/tests/2d.gradient.interpolate.zerosize.fillText.html: Added.
> +        * canvas/philip/tests/2d.gradient.interpolate.zerosize.stroke-expected.txt: Added.
> +        * canvas/philip/tests/2d.gradient.interpolate.zerosize.stroke.html: Added.
> +        * canvas/philip/tests/2d.gradient.interpolate.zerosize.strokeRect-expected.txt: Added.
> +        * canvas/philip/tests/2d.gradient.interpolate.zerosize.strokeRect.html: Added.
> +        * canvas/philip/tests/2d.gradient.interpolate.zerosize.strokeText-expected.txt: Added.
> +        * canvas/philip/tests/2d.gradient.interpolate.zerosize.strokeText.html: Added.

Are you extending the test suite from philip here, or fixing it? I would rather not touch this folder if there is nothing obviously wrong in it. Can you write tests and put them to fast/canvas instead? Please avoid the test structure from this test suite and follow the other tests in fast/canvas.

-- 
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