6 failing web-platform-tests for 2d canvas that pass in Firefox and Edge |
||||
Issue descriptionhttp://w3c-test.org/2dcontext/compositing/2d.composite.operation.clear.html http://w3c-test.org/2dcontext/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html http://w3c-test.org/2dcontext/drawing-images-to-the-canvas/2d.drawImage.zerosource.html http://w3c-test.org/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html http://w3c-test.org/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html http://w3c-test.org/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html These failures need analysis, but may point to low-hanging fruit for improving interop. Judgement is required, the failures may be entangled with spec issues. Note: Results may have changed in the interim.
,
Sep 30 2016
Will check these against specs first. Thanks for the report.
,
Sep 30 2016
Some initial investigation: Chrome follows the specs on these two tests: http://w3c-test.org/2dcontext/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html http://w3c-test.org/2dcontext/drawing-images-to-the-canvas/2d.drawImage.zerosource.html The link for the spec is here: https://html.spec.whatwg.org/multipage/scripting.html#drawing-images More specifically, 2d.drawImage.zerocanvas.html falls into step 1, which says "returns bad, then abort these steps without drawing anything", so no exception should be thrown. 2d.drawImage.zerosource.html falls into step 3, "If one of the sw or sh arguments is zero, abort these steps. Nothing is painted.", so no exception should be thrown. In both cases, chrome does not throw exception.
,
Sep 30 2016
It looks like Safari also passes those tests. Does it matter at all to web developers what the behavior is here? If it's minor, I'd suggest filing a bug at https://github.com/whatwg/html/issues to make the spec match the test and Edge/Gecko/WebKit.
,
Sep 30 2016
Good point, if all other browser are breaking the specs, then maybe we should change the spec to match the behavior that majority browsers follow. Will have a discussion with junov@.
,
Sep 30 2016
I disagree. The preferred behavior for canvas APIs has always been to silently fail except in cases of blatant misuse of the API. In particular we want to avoid throwing exceptions under conditions that could be the result of a non-deterministic behavior (like a network error, or a resource load race). I speculate that other implementations may be behaving the way they do simply because of this incorrect test. Going from throwing to non-throwing won't break anything, but the opposite could (uncaught exceptions will halt script execution).
,
Sep 30 2016
Based on comment #6, I will file a bug on Mozilla bugzilla. The last 3 tests: http://w3c-test.org/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html http://w3c-test.org/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html http://w3c-test.org/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html pass on ToT but breaks on stable, still investigating the first one...
,
Sep 30 2016
#6, maybe a web-platform-tests PR to change the test, inviting comments from those who would then come to fail it, would be a good path forward?
,
Nov 29 2016
Pull request is here: https://github.com/w3c/web-platform-tests/pull/4234
,
Nov 30 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by foolip@chromium.org
, Sep 30 2016