[webkit-reviews] review denied: [Bug 102654] Zero size gradient should paint nothing on canvas : [Attachment 181627] Patch

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


Dirk Schulze <krit at webkit.org> has denied Rashmi Shyamasundar
<rashmi.s2 at samsung.com>'s request for review:
Bug 102654: Zero size gradient should paint nothing on canvas
https://bugs.webkit.org/show_bug.cgi?id=102654

Attachment 181627: Patch
https://bugs.webkit.org/attachment.cgi?id=181627&action=review

------- Additional Comments from Dirk Schulze <krit at webkit.org>
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.


More information about the webkit-reviews mailing list