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
This commit is contained in:
Brandon Fairchild 2015-12-31 11:48:15 -05:00
parent 0f5c614609
commit 1ccab328f9
3 changed files with 5 additions and 11 deletions

View file

@ -1,5 +0,0 @@
[2d.pattern.repeat.empty.html]
type: testharness
[Canvas test: 2d.pattern.repeat.empty]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.pattern.repeat.null.html]
type: testharness
[Canvas test: 2d.pattern.repeat.null]
expected: FAIL