Implement ctx.strokeTextCluster() #50942
Draft
+2,660
−72
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.
This CL creates a new method for CanvasRenderingContext2d that strokes
a TextCluster object. Its fill counterpart, ctx.fillTextCluster(), was
merged in https://crrev.com/c/5854270.
This new method came to be from the discussion around the spec for the
TextMetrics additions: whatwg/html#11000
The existing tests for fillTextCluster() were renamed to include the
method name in the title, since before only "rendering" was mentioned.
The new tests are explicitly named using strokeTextCluster().
A line that was duplicated on the tests for fillTextCluster() was also
removed.
Bug: 341213359
Change-Id: Icd792b56e48f3ea5091e958671c19fcefe67fdec
Reviewed-on: https://chromium-review.googlesource.com/6282180
WPT-Export-Revision: c92ffa514b2a0bc920064d9bd5a199b558500777