-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2d.pattern.image.broken test prints FAIL because /images/broken.png is not Broken per HTML Standard #21685
Comments
Interestingly Firefox 72 and Nightly 74 do not throw a DOM exception for the same code that Chromium 81 throws an exception for. Instead,
That is precisely the case where the exception should be thrown, not |
Safari returns a CanvasPattern for the posted example, differing from both Firefox and Chrome. |
Ok. Objectively, currently only Chromium outputs the expected result per the current iteration of the specification. Is there any reason or use case for not throwing an exception (Firefox, Safari behaviour) per the specification? |
Are we 100% sure that we want to treat that image as broken? It comes from calling toDataURL() on a valid canvas, that would seem to indicate that it is valid. All of Chrome, Firefox, and Safari determine that correct dimensions for the image. |
The result of Have not reviewed the blame as to why the current specification states "no data" and refers to dimensions as being relevant to an image being "broken". "0 width" and "0 height" are two criteria mentioned, although the image in WPT repository used for the test appears to be designed to be "broken" due to |
This test https://wpt.fyi/results/2dcontext/fill-and-stroke-styles/2d.pattern.image.broken.html?label=master&label=experimental&aligned&q=2d.pattern.image.broken.html fails for all browsers because the /images/broken.png is not "Broken" per HTML Standard https://html.spec.whatwg.org/multipage/images.html#img-error (see #21683 (comment).)
The code at the test expects an exception to be thrown
which references https://heycam.github.io/webidl/#dom-domexception-invalid_state_err by way of MDN.
width
andheight
is decoded for the image in the repository at Firefox 72, Nightly 74, Chromium 81.Why is an
INVALID_STATE_ERR
expected to be thrown for that test?The text was updated successfully, but these errors were encountered: