[wpt-sync] Sync PR 49593 - Add options to fillTextCluster to override some cluster values
Categories
(Core :: Graphics: Canvas2D, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox135 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 49593 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/49593
Details from upstream follow.
Andres Ricardo Perez <andresrperez@chromium.org> wrote:
Add options to fillTextCluster to override some cluster values
The current implementation of ctx.fillTextCluster() always renders the
cluster with the align, baseline, X, and Y values stored in the cluster
itself. This means that once a cluster is generated, there is no way to
render them with a different align or baseline, and that there is no way
to override the stored X and Y values.This CL adds an options dictionary parameter to ctx.fillTextCluster(),
that enables users to override these values.For the X and Y values, this means that it is possible use the values
stored in the cluster for calculations (like where on a circle should a
cluster go), and then render them exactly in a specified position by
overriding this values to (0, 0). In practice, this means that calling
ctx.fillTextCluster(cluster, pos_x, pos_y, {x: 0, y:0})
renders the
cluster and exactly (pos_x, pos_y), instead of offsetting it by the
values stored in the cluster.For align and baseline, this allows to decouple the setting used for
measuring the clusters from the ones used to render if desired.Bug: 341213359
Change-Id: Ie9d64dc7534c4deb8ae72472eeaea8df7e41c19a
Reviewed-on: https://chromium-review.googlesource.com/6006496
WPT-Export-Revision: cfb90398b3592ba8332a9dbe77a3d7f5e10fdb32
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 1•2 months ago
|
||
Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 6 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 3 tests and 1 subtests
Status Summary
Firefox
OK
: 3
FAIL
: 3
Chrome
OK
: 3
FAIL
: 3
Safari
OK
: 3
FAIL
: 3
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/canvas/element/text/2d.text.measure.text-clusters-rendering-options.tentative.html [wpt.fyi]
- Test that fillTextCluster() correctly applies the options passed as a dictionary.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Test that fillTextCluster() correctly applies the options passed as a dictionary.:
- /html/canvas/offscreen/text/2d.text.measure.text-clusters-rendering-options.tentative.html [wpt.fyi]
- Test that fillTextCluster() correctly applies the options passed as a dictionary.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Test that fillTextCluster() correctly applies the options passed as a dictionary.:
- /html/canvas/offscreen/text/2d.text.measure.text-clusters-rendering-options.tentative.worker.html [wpt.fyi]
- Test that fillTextCluster() correctly applies the options passed as a dictionary.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Test that fillTextCluster() correctly applies the options passed as a dictionary.:
https://hg.mozilla.org/mozilla-central/rev/27534812d693
https://hg.mozilla.org/mozilla-central/rev/b037a59b347e
Description
•