[webkit-reviews] review granted: [Bug 130236] Refactor Path to Path2D and remove currentPath : [Attachment 226757] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 14 13:34:04 PDT 2014


Dean Jackson <dino at apple.com> has granted Dirk Schulze <krit at webkit.org>'s
request for review:
Bug 130236: Refactor Path to Path2D and remove currentPath
https://bugs.webkit.org/show_bug.cgi?id=130236

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

------- Additional Comments from Dean Jackson <dino at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=226757&action=review


> LayoutTests/fast/canvas/script-tests/canvas-clip-path.js:18
> +	if (!data.length)
> +		return true;
> +	var c = {r:0,g:0,b:0,a:0};
> +	for (var i = 0; i < data.length; i += 4) {
> +		c.r += data[i];
> +		c.g += data[i+1];
> +		c.b += data[i+2];
> +		c.a += data[i+3];
> +	}
> +	if (refColor.r == Math.round(c.r/data.length*4)
> +		&& refColor.g == Math.round(c.g/data.length*4)
> +		&& refColor.b == Math.round(c.b/data.length*4)
> +		&& refColor.a == Math.round(c.a/data.length*4))
> +		return true;
> +	return false;

So much indent!!

> LayoutTests/fast/canvas/script-tests/canvas-stroke-path.js:19
> +function areaColor(data, refColor) {
> +	if (!data.length)
> +		return true;
> +	var c = {r:0,g:0,b:0,a:0};
> +	for (var i = 0; i < data.length; i += 4) {
> +		c.r += data[i];
> +		c.g += data[i+1];
> +		c.b += data[i+2];
> +		c.a += data[i+3];
> +	}
> +	if (refColor.r == Math.round(c.r/data.length*4)
> +		&& refColor.g == Math.round(c.g/data.length*4)
> +		&& refColor.b == Math.round(c.b/data.length*4)
> +		&& refColor.a == Math.round(c.a/data.length*4))
> +		return true;
> +	return false;
> +}

So much indent here too!

> Source/WebCore/html/canvas/CanvasRenderingContext2D.h:141
> +    void fill(DOMPath* , const String& winding = "nonzero");
> +    void stroke(DOMPath*);
> +    void clip(DOMPath* , const String& winding = "nonzero");

Nit: extra space between * and ,


More information about the webkit-reviews mailing list