[wpt-sync] Sync PR 46057 - Implement getSelectionRects feature for TextMetrics
Categories
(Core :: Graphics: Canvas2D, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 46057 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/46057
Details from upstream follow.
Andres Ricardo Perez <andresrperez@chromium.org> wrote:
Implement getSelectionRects feature for TextMetrics
This change creates a new API method for TextMetrics objects in canvas
that uses font data and precalculated text runs, to calculate the
selection rects for an interval of characters. This interval is defined
by character positions in the input text.The selection rects are calculated using the existing
Font::SelectionRectForText
method, but on a logical run by run
basis to ensure correct management of bidi text inputs.The target is to match the rects that would be obtained by using the DOM
from selecting this same interval using
Selection.getRangeAt(0).getClientRects()
after having set the selection
with a range.The new API was enabled under the
ExtendedTextMetrics
flag.Change-Id: Ia05ce8e55e3e73a491354293502b457ad712026e
Reviewed-on: https://chromium-review.googlesource.com/5353031
WPT-Export-Revision: 8c3c3e8d1a3690d821675f6ac0985631b8c84d6b
Assignee | ||
Updated•14 days ago
|
Assignee | ||
Comment 1•3 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=b16424658a81161b22020cf027a824d4176674c8
Assignee | ||
Comment 2•3 days ago
|
||
CI Results
Ran 6 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 8 tests and 1 subtests
Status Summary
Firefox
OK
: 8
FAIL
: 8
Chrome
OK
: 8
FAIL
: 8
Safari
OK
: 8
FAIL
: 8
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/canvas/element/text/2d.text.measure.selection-rects-baselines.tentative.html [wpt.fyi]
- Check that TextMetrics::getSelectionRects() works correctly with textBaseline.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Check that TextMetrics::getSelectionRects() works correctly with textBaseline.:
- /html/canvas/element/text/2d.text.measure.selection-rects-exceptions.tentative.html [wpt.fyi]
- Check that TextMetrics::getSelectionRects() throws when using invalid indexes.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Check that TextMetrics::getSelectionRects() throws when using invalid indexes.:
- /html/canvas/element/text/2d.text.measure.selection-rects.tentative.html [wpt.fyi]
- Check that TextMetrics::getSelectionRects() matches its DOM equivalent.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Check that TextMetrics::getSelectionRects() matches its DOM equivalent.:
- /html/canvas/offscreen/text/2d.text.measure.selection-rects-baselines.tentative.html [wpt.fyi]
- Check that TextMetrics::getSelectionRects() works correctly with textBaseline.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Check that TextMetrics::getSelectionRects() works correctly with textBaseline.:
- /html/canvas/offscreen/text/2d.text.measure.selection-rects-baselines.tentative.worker.html [wpt.fyi]
- Check that TextMetrics::getSelectionRects() works correctly with textBaseline.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Check that TextMetrics::getSelectionRects() works correctly with textBaseline.:
- /html/canvas/offscreen/text/2d.text.measure.selection-rects-exceptions.tentative.html [wpt.fyi]
- Check that TextMetrics::getSelectionRects() throws when using invalid indexes.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Check that TextMetrics::getSelectionRects() throws when using invalid indexes.:
- /html/canvas/offscreen/text/2d.text.measure.selection-rects-exceptions.tentative.worker.html [wpt.fyi]
- Check that TextMetrics::getSelectionRects() throws when using invalid indexes.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Check that TextMetrics::getSelectionRects() throws when using invalid indexes.:
- /html/canvas/offscreen/text/2d.text.measure.selection-rects.tentative.html [wpt.fyi]
- Check that TextMetrics::getSelectionRects() matches its DOM equivalent.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Check that TextMetrics::getSelectionRects() matches its DOM equivalent.:
Description
•