[Gecko Bug 1778908] Implement the fontKerning attribute for Canvas2d text. #34838
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per spec, the value of fontKerning should be an enum, not a string, but currently we handle
all the keyword-valued canvas attributes in this way. We may want to convert them to enums
(which will mean that unrecognized values throw an error instead of being ignored), but I
think that should be done for all the attributes together as a separate bug. For now, using
a string here provides consistency with the rest of the canvas APIs.
Note that Blink's current implementation and the existing WPT tests have some problems:
they treat the values of fontKerning as case-insensitive, which is wrong. I have filed
https://bugs.chromium.org/p/chromium/issues/detail?id=1343333 about this.
Differential Revision: https://phabricator.services.mozilla.com/D151755
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1778908
gecko-commit: 28bb76d444f5be41d2a112e7073ea1d0b0a343ec
gecko-reviewers: gfx-reviewers, aosmond, emilio