Fix ellipsis position for RTL elements #22380
Merged
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.
In ShapeResult::OffsetToFit() when the size to fit
matches result.origin_x we were returning
the left_character_index only if Direction() was RTL.
However if line_direction is RTL we also want that index.
With this change css/css-ui/text-overflow-028.html starts to pass
on Linus and Windows, we add new tests here too
(the RTL ones were failing before this patch).
BUG=1063319
TEST=css/css-overflow/text-overflow-ellipsis-001.html
TEST=css/css-overflow/text-overflow-ellipsis-rtl-001.html
TEST=css/css-overflow/text-overflow-ellipsis-vertical-001.html
TEST=css/css-overflow/text-overflow-ellipsis-vertical-ltr-001.html
Change-Id: Idbaed07a63d4ec6335e722b7fb7b4e91f4076564
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2111152
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#752380}