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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 2 15:48:43 PST 2013


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


Dirk Schulze <krit at webkit.org> changed:

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




--- Comment #22 from Dirk Schulze <krit at webkit.org>  2013-01-02 15:50:42 PST ---
(From update of attachment 177980)
View in context: https://bugs.webkit.org/attachment.cgi?id=177980&action=review

Given that we already have this check for fillRect and Opera and IE are compatible with the spec, I think we should go ahead with this.

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

I am not sure about this part. Why shouldn't we fill, if just the stroke gradient is bogus? (Same the other way around.)

> LayoutTests/canvas/philip/tests.js:195
> +
> +

remove these extra lines.

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