Skip to content

Commit 6939c92

Browse files
committed
Bug 1979523 [wpt PR 53993] - canvas: Respect FillRule, a=testonly
Automatic update from web-platform-tests Add test for fill/clip with evenodd Signed-off-by: sagudev <16504129+sagudevusers.noreply.github.com> -- wpt-commits: 5a64c2271b227730463694024e0f7daeecfa319b wpt-pr: 53993 UltraBlame original commit: 70fbd4b46298d2584418b61eb1a12996ca530010
1 parent 7e3b877 commit 6939c92

13 files changed

+4096
-0
lines changed
Lines changed: 379 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,379 @@
1+
<
2+
!
3+
DOCTYPE
4+
html
5+
>
6+
<
7+
!
8+
-
9+
-
10+
DO
11+
NOT
12+
EDIT
13+
!
14+
This
15+
test
16+
has
17+
been
18+
generated
19+
by
20+
/
21+
html
22+
/
23+
canvas
24+
/
25+
tools
26+
/
27+
gentest
28+
.
29+
py
30+
.
31+
-
32+
-
33+
>
34+
<
35+
meta
36+
charset
37+
=
38+
"
39+
UTF
40+
-
41+
8
42+
"
43+
>
44+
<
45+
title
46+
>
47+
Canvas
48+
test
49+
:
50+
2d
51+
.
52+
path
53+
.
54+
clip
55+
.
56+
winding
57+
.
58+
evenodd
59+
.
60+
1
61+
<
62+
/
63+
title
64+
>
65+
<
66+
script
67+
src
68+
=
69+
"
70+
/
71+
resources
72+
/
73+
testharness
74+
.
75+
js
76+
"
77+
>
78+
<
79+
/
80+
script
81+
>
82+
<
83+
script
84+
src
85+
=
86+
"
87+
/
88+
resources
89+
/
90+
testharnessreport
91+
.
92+
js
93+
"
94+
>
95+
<
96+
/
97+
script
98+
>
99+
<
100+
script
101+
src
102+
=
103+
"
104+
/
105+
html
106+
/
107+
canvas
108+
/
109+
resources
110+
/
111+
canvas
112+
-
113+
tests
114+
.
115+
js
116+
"
117+
>
118+
<
119+
/
120+
script
121+
>
122+
<
123+
link
124+
rel
125+
=
126+
"
127+
stylesheet
128+
"
129+
href
130+
=
131+
"
132+
/
133+
html
134+
/
135+
canvas
136+
/
137+
resources
138+
/
139+
canvas
140+
-
141+
tests
142+
.
143+
css
144+
"
145+
>
146+
<
147+
body
148+
class
149+
=
150+
"
151+
show_output
152+
"
153+
>
154+
<
155+
h1
156+
>
157+
2d
158+
.
159+
path
160+
.
161+
clip
162+
.
163+
winding
164+
.
165+
evenodd
166+
.
167+
1
168+
<
169+
/
170+
h1
171+
>
172+
<
173+
p
174+
class
175+
=
176+
"
177+
desc
178+
"
179+
>
180+
evenodd
181+
winding
182+
number
183+
rule
184+
works
185+
in
186+
clip
187+
<
188+
/
189+
p
190+
>
191+
<
192+
p
193+
class
194+
=
195+
"
196+
output
197+
"
198+
>
199+
Actual
200+
output
201+
:
202+
<
203+
/
204+
p
205+
>
206+
<
207+
canvas
208+
id
209+
=
210+
"
211+
c
212+
"
213+
class
214+
=
215+
"
216+
output
217+
"
218+
width
219+
=
220+
"
221+
100
222+
"
223+
height
224+
=
225+
"
226+
50
227+
"
228+
>
229+
<
230+
p
231+
class
232+
=
233+
"
234+
fallback
235+
"
236+
>
237+
FAIL
238+
(
239+
fallback
240+
content
241+
)
242+
<
243+
/
244+
p
245+
>
246+
<
247+
/
248+
canvas
249+
>
250+
<
251+
ul
252+
id
253+
=
254+
"
255+
d
256+
"
257+
>
258+
<
259+
/
260+
ul
261+
>
262+
<
263+
script
264+
>
265+
var
266+
t
267+
=
268+
async_test
269+
(
270+
"
271+
evenodd
272+
winding
273+
number
274+
rule
275+
works
276+
in
277+
clip
278+
"
279+
)
280+
;
281+
_addTest
282+
(
283+
function
284+
(
285+
canvas
286+
ctx
287+
)
288+
{
289+
ctx
290+
.
291+
fillStyle
292+
=
293+
'
294+
#
295+
0f0
296+
'
297+
;
298+
ctx
299+
.
300+
fillRect
301+
(
302+
0
303+
0
304+
100
305+
50
306+
)
307+
;
308+
ctx
309+
.
310+
beginPath
311+
(
312+
)
313+
;
314+
ctx
315+
.
316+
rect
317+
(
318+
0
319+
0
320+
100
321+
50
322+
)
323+
;
324+
ctx
325+
.
326+
rect
327+
(
328+
0
329+
0
330+
100
331+
50
332+
)
333+
;
334+
ctx
335+
.
336+
fillStyle
337+
=
338+
"
339+
#
340+
f00
341+
"
342+
;
343+
ctx
344+
.
345+
clip
346+
(
347+
"
348+
evenodd
349+
"
350+
)
351+
;
352+
ctx
353+
.
354+
fillRect
355+
(
356+
0
357+
0
358+
100
359+
50
360+
)
361+
;
362+
_assertPixel
363+
(
364+
canvas
365+
50
366+
25
367+
0
368+
255
369+
0
370+
255
371+
)
372+
;
373+
}
374+
)
375+
;
376+
<
377+
/
378+
script
379+
>

0 commit comments

Comments
 (0)