TextOverflow: Implement bidi text support for string values#57478
Merged
Conversation
This CL modifies the ellipsis functionality to handle cases where the ellipsis string value is bidirectional text. The `EllipsisShapeResult` class has been introduced since bidi runs require multiple ShapeResult objects along with their corresponding text and bidi levels. Additionally, the `ellipsis_shape_results_` has been changed to a vector to store these objects. Bug: 41492459, 479257822 Change-Id: I2ad35a55e780b7842936fee5f811edab213eecf2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6817921 Reviewed-by: Andreu Botella <abotella@igalia.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Minseong Kim <jja08111@gmail.com> Cr-Commit-Position: refs/heads/main@{#1577949}
912b52b to
8221a7f
Compare
wpt-pr-bot
approved these changes
Feb 2, 2026
wpt-pr-bot
left a comment
Collaborator
There was a problem hiding this comment.
The review process for this patch is being conducted in the Chromium project.
andreubotella
added a commit
that referenced
this pull request
Jun 8, 2026
In w3c/csswg-drafts#12617 it was resolved that the `text-overflow` ellipsis text is treated as a bidi isolate, with the same directionality as the containing bidi paragraph. There were previously WPT tests for this, added in #57478. However, although a bidi paragraph's directionality tends to be the same as its value of the `direction` property, this is not the case with `unicode-bidi: plaintext`, in which case the directionality is determined by the the paragraph's context. This patch adds a test for this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 modifies the ellipsis functionality to handle cases where the
ellipsis string value is bidirectional text. The
EllipsisShapeResultclass has been introduced since bidi runs require multiple ShapeResult
objects along with their corresponding text and bidi levels.
Additionally, the
ellipsis_shape_results_has been changed to a vectorto store these objects.
Bug: 41492459, 479257822
Change-Id: I2ad35a55e780b7842936fee5f811edab213eecf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6817921
Reviewed-by: Andreu Botella <abotella@igalia.com>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Minseong Kim <jja08111@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1577949}