Open Bug 1646754 Opened 2 years ago Updated 1 year ago

New wpt failures in /html/canvas/element/ [text-styles/2d.text.font.parse.size.percentage.html, text-styles/2d.text.font.parse.size.percentage.default.html, text-styles/2d.text.font.relative_size.html, and 10 others]


(Core :: Canvas: 2D, defect)





(Reporter:, Unassigned)


(Depends on 1 open bug)


(Whiteboard: [wpt])

Syncing wpt PR 23998 found new untriaged test failures in CI

Tests Affected

Firefox-only failures

Canvas test: 2d.text.font.parse.size.percentage: FAIL
Canvas test: 2d.text.font.parse.size.percentage.default: FAIL
Canvas test: 2d.text.font.relative_size: FAIL
Testing fontBoundingBox: FAIL
Canvas test: 2d.drawImage.incomplete.reload: FAIL
Canvas test: 2d.composite.operation.clear: FAIL
System fonts must be computed to explicit values: FAIL
Canvas test: 2d.pattern.image.incomplete.reload: FAIL
Canvas test: 2d.text.font.parse.complex: FAIL

New Tests That Don't Pass

drawImage with zero-sized source rectangle draws nothing without exception: FAIL (Chrome: PASS, Safari: FAIL)
Testing width advances: FAIL (Chrome: PASS, Safari: FAIL)
Testing baselines: FAIL (Chrome: PASS, Safari: FAIL)
Testing emHeights: FAIL (Chrome: PASS, Safari: FAIL)

CI Results

Gecko CI (Treeherder)
GitHub PR Head


These updates will be on mozilla-central once bug 1643477 lands.

Note: this bug is for tracking fixing the issues and is not
owned by the wpt sync bot.

This bug is linked to the relevant tests by an annotation in These annotations
can be edited using the wpt interop dashboard

If this bug is split into multiple bugs, please also update the
annotations, otherwise we are unable to track which wpt issues are
already triaged. Resolving as duplicate or closing this issue should
be cause the bot to automatically update or remove the annotation.

Component: DOM: Core & HTML → Canvas: 2D

So there are a lot of tests tracked by this bug, so I think work should be done in dependent bugs. There are a few tests here that seem interesting:

  • html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html: This one interacts with image loading and thus doesn't seem super-easy.
  • html/canvas/element/text-styles/2d.text.font.parse.complex.html seems like a bug in the test that expects a particular serialization, so the test should be patched instead of Firefox changed.
  • html/canvas/element/pixel-manipulation/, this one seems trivial to fix, and is the first one I'd try.

Tests can be looked at in, where there are links to run the test and so on. Interesting tests are the one that pass in at least one other browser and that we fail.

It seems like, for example, for the last one CanvasRenderingContext2D::CreateImageData should check for zero after clamping to int, rather than before.

I checked the tests on
It seems that the following tests pass now:

  1. /html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html
  2. /html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.advances.html

Rest are all still failing, I'm starting work on them

Depends on: 1684689
Depends on: 1685141
You need to log in before you can comment on or make changes to this bug.