Closed Bug 1838641 Opened 1 year ago Closed 1 year ago

Adjust canvas2d text tests that incorrectly expect whitespace-collapsing behavior

Categories

(Core :: Graphics: Canvas2D, defect)

Unspecified
All
defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

There are a number of canvas2d text tests that expect CSS whitespace-collapsing behavior in canvas text processing, and we currently fail these.

However, the spec does not call for whitespace collapsing at all; rather, it says:

Replace all ASCII whitespace in text with U+0020 SPACE characters
...
Form a hypothetical infinitely-wide CSS line box containing a single inline box containing the text text, with its CSS properties set as follows:
...
'white-space' 'pre'

and white-space: pre preserves (not collapses) whitespace.

So our behavior (which also matches the other browsers) is correct here, and the tests need adjusting.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9f4038cc7295
Fix WPT canvas2d text tests that incorrectly expect CSS whitespace-collapsing behavior. r=gfx-reviewers,lsalzman
Summary: Adjust canvas2d text tests that incorrectly treat attributes as case-insensitive → Adjust canvas2d text tests that incorrectly expect whitespace-collapsing behavior
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/40586 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: