web-platform-tests / wpt

Test suites for Web platform specs — including WHATWG, W3C, and others
https://web-platform-tests.org/
Other
4.79k stars 2.99k forks source link

Update the canvas state and the FontDescription to match #46919

Closed chromium-wpt-export-bot closed 5 days ago

chromium-wpt-export-bot commented 6 days ago

After a font is set in Canvas, users can change the font properties, such as FontKerning. One copy of the properties is saved in the FontDescription and the another copy is saved in the CanvasRenderingContext2DState. When font is updated, the copy in the FontDescription get updated automatically, and the copy in the State file stay unchanged. This inconsistency caused some properties settings to fail.

Bug: 338965374

Change-Id: Ic2e72f8d1a5e5007648dfa7da7698d836ef54c42 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5637432 Reviewed-by: Andres Ricardo Perez \andresrperez@chromium.org Reviewed-by: Aaron Krajeski \aaronhk@chromium.org Commit-Queue: Yi Xu \yiyix@chromium.org Cr-Commit-Position: refs/heads/main@{#1320435}