Commit Graph

83 Commits

Author SHA1 Message Date
Ms2ger
079092dfea Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0 2016-09-09 16:17:14 +02:00
David Raifaizen
b5159dc7ff Setting current color to black if canvas is not rendered in document 2016-04-22 09:59:49 -04:00
Ms2ger
c1ccf9d74b Note bugs for some 2dcontext test failures. 2016-04-14 13:00:44 +02:00
Paul Padier
30555812dc Skip failing test 2016-03-31 14:20:36 +09:00
bors-servo
ee6c5ae2fb Auto merge of #9138 - nox:enable-canvas-linestyles-linecap-001, r=frewsxcv
Enable /canvas_linestyles_linecap_001.htm (fixes #5714)

CanvasDrawingStyles.lineCap was implemented and the test passes now.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9138)
<!-- Reviewable:end -->
2016-01-04 02:30:15 +05:30
bors-servo
efb145e744 Auto merge of #9139 - nox:enable-canvas-compositing-globalcompositeoperation-001, r=frewsxcv
Enable canvas_compositing_globalcompositeoperation_001.htm (fixes #5803)

This always pass now.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9139)
<!-- Reviewable:end -->
2016-01-03 20:32:34 +05:30
bors-servo
336bbd67ba Auto merge of #9141 - nox:enable-canvas-complexshapes, r=jdm
Enable canvas_complexshapes_*_001.htm (fixes #6748, #6780)

Serde landed bincode support, so we can probably enable these again.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9141)
<!-- Reviewable:end -->
2016-01-03 13:56:04 +05:30
Anthony Ramine
8625ff555b Enable canvas_complexshapes_*_001.htm (fixes #6748, #6780)
Serde landed bincode support, so we can probably enable these again.
2016-01-03 04:28:21 +01:00
Anthony Ramine
88a3dde3c4 Enable canvas_state_restore_001.htm (fixes #5764)
The test now always pass.
2016-01-03 03:01:39 +01:00
Anthony Ramine
ad45043ddf Enable canvas_compositing_globalcompositeoperation_001.htm (fixes #5803) 2016-01-03 02:54:09 +01:00
Anthony Ramine
8727412e3f Enable /canvas_linestyles_linecap_001.htm (fixes #5714)
CanvasDrawingStyles.lineCap was implemented and the test passes now.
2016-01-03 02:48:31 +01:00
Brandon Fairchild
1ccab328f9 Support empty strings as the repeat argument (CreatePattern)
According to the third step in the specification [1], createPattern
should let the repetition argument be "repeat" when it is the empty
string.

The code in CanvasRenderingContext2D::CreatePattern did not implement
this step and instead threw a SyntaxError exception when an empty
string was supplied as the repetition argument.

Fixes #9079.

[1] https://html.spec.whatwg.org/multipage/#dom-context-2d-createpattern
2015-12-31 11:48:15 -05:00
David Zbarsky
789a90a82f Implement IsPointInPath 2015-12-05 17:49:49 -08:00
David Zbarsky
8408891ec5 Parse currentColor as Canvas2D color 2015-11-21 11:59:19 -08:00
David Zbarsky
a63c98c24a Implement HTMLCanvasElement#toDataURL 2015-10-26 21:24:21 -07:00
Nathan Froyd
9e348e2e8e add premultiply table for PutImageData 2015-10-21 18:30:35 -04:00
Emilio Cobos Álvarez
e2b7a01055 webgl: texImage2D with a canvas argument 2015-09-25 16:20:31 +02:00
Ms2ger
163009575a Update web-platform-tests to revision 71a0d51d14d8b0f1b53cda3a7d39ef8765164485 2015-09-17 18:32:13 +02:00
David Zbarsky
7315b50973 CanvasGradient#addColorStop should throw for invalid colors and offsets 2015-08-09 23:19:56 -04:00
bors-servo
6a8bc85284 Auto merge of #7092 - dzbarsky:putimagedata, r=jdm
Clean up and fix PutImageData



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7092)
<!-- Reviewable:end -->
2015-08-09 07:00:56 -06:00
bors-servo
dbce4c5bd8 Auto merge of #6975 - dzbarsky:get-tiny, r=jdm
Fix getImageData with sizes < 1 pixel



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6975)
<!-- Reviewable:end -->
2015-08-09 06:32:30 -06:00
David Zbarsky
2f47bdff4b Fix getImageData with sizes < 1 pixel 2015-08-08 15:43:22 -04:00
David Zbarsky
51938d579f Switch PutImageData to using CopySurface 2015-08-08 15:35:08 -04:00
Simon Sapin
90d7d11a23 Upgrade cssparser
Pick up the fix for https://github.com/servo/rust-cssparser/issues/76
2015-08-07 18:34:16 +02:00
David Zbarsky
fee8abe5a2 GetImageData should return un-premultiplied alpha values 2015-08-06 05:14:53 -04:00
David Zbarsky
1d02239804 Respect the composition op when drawing images 2015-08-05 20:38:48 -04:00
bors-servo
debd7d87d6 Auto merge of #6974 - dzbarsky:tiny-create, r=jdm
Fix createImageData with sizes < 1 pixel



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6974)
<!-- Reviewable:end -->
2015-08-05 11:40:20 -06:00
bors-servo
95269bba39 Auto merge of #6971 - dzbarsky:negative-radius, r=Ms2ger
Make createRadialGradient throw for negative radii



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6971)
<!-- Reviewable:end -->
2015-08-05 10:42:57 -06:00
David Zbarsky
9fbe33b6f2 Implement strokeRect with zero-width or zero-height rects 2015-08-04 17:44:18 -04:00
David Zbarsky
2fb5fda5d0 Fix createImageData with sizes < 1 pixel 2015-08-04 15:45:38 -04:00
David Zbarsky
75e444c3b2 Make createRadialGradient throw for negative radii 2015-08-04 15:08:37 -04:00
David Zbarsky
9e5c2e22d8 Clean up some methods in CanvasRendeingContext2D 2015-08-03 23:32:11 -04:00
Ms2ger
89735bac80 Disable canvas_complexshapes_arcto_001.htm. 2015-07-29 12:47:34 +02:00
Ms2ger
1b897abf98 Disable canvas_complexshapes_beziercurveto_001.htm. 2015-07-29 10:06:05 +02:00
Ms2ger
c66c6af0ba Update web-platform-tests to revision 4d96cccabc2feacd48e1dab9afc22b8af2225572 2015-06-28 22:52:24 +02:00
Ms2ger
9b270f6238 Disable the upstream tests. 2015-06-28 20:36:33 +02:00
Hyowon Kim
0e8491fb8c Create pattern from HTMLCanvasElement or CanvasRenderingContext2D. 2015-06-24 09:56:28 +09:00
Hyowon Kim
cc55e2e426 Check invalid values for the shadow attributes. 2015-06-18 16:54:12 +09:00
Hyowon Kim
2e230bdb93 Implement fill and stroke functions for all pattern types and check the zero size gradient. 2015-06-17 09:46:38 +09:00
Hyowon Kim
465cea8db5 Implement drawing shadows in canvas. 2015-06-16 08:57:00 +09:00
Hyowon Kim
00240e5550 Implementation of pattern fill style for canvas. 2015-06-13 14:35:13 +09:00
Hyowon Kim
473afdb196 Add attributes for canvas shadows. 2015-06-12 09:40:00 +09:00
Hyowon Kim
5bbfb42e90 Replace fill_color and stroke_color with fill_style and stroke_style in CanvasContextState.
The fillStyle and strokeStyle attributes can be either
strings(color), CanvasGradients, or CanvasPatterns.
2015-06-06 16:15:11 +09:00
Hyowon Kim
5d05ffc417 Serialize colors for fill and stroke styles in canvas. 2015-06-03 09:11:24 +09:00
Hyowon Kim
a512e9e507 Correct the calculation of rects for drawimage. 2015-06-01 15:58:38 +09:00
Ms2ger
881fe95cd1 Update web-platform-tests to revision 075802c1d3387d07e31cd5887459d539b1297c8d. 2015-05-29 17:53:09 +02:00
bors-servo
c97c0a9f94 Auto merge of #6065 - mmatyas:canvas_antialias, r=jdm
This patch turns on antialiasing for the canvas, and updates the painting code to use the updated Azure DrawOptions defined in servo/rust-azure#158.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6065)
<!-- Reviewable:end -->
2015-05-28 14:59:36 -05:00
Mátyás Mustoha
f4c0bd3b80 Turn off default antialiasing for most DrawOptions. 2015-05-28 18:42:16 +02:00
Anthony Ramine
2c6d2d3abe Make throw_not_in_union() throw a TypeError (fixes #6194) 2015-05-28 13:03:28 +02:00
James Graham
a884237f9f Update web-platform-tests expected data to revision 41a7d8732d8e5c65728c153d29a34fe9d5192b29 2015-05-14 13:45:29 +01:00