[css-text] There is no shape-result when items overflow under break-word #20297
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.
When the overflow-wrap: 'break-word' feature is used, items overflowing
don't have an associated ShapeResult instance, since we deliberately set
the kNoResultIfOverflow to ignore it because it will be rewound in any
case.
However, in the RewindOverflow function, we incorrectly assumed that
when an item has no associated ShapeResult, it shouldn't be a trailable
text item.
Additionally, this CL removes the clause that implied that items formed
with all trailable spaces should be ignored. Such logic prevented such
kind of items to hang, which is what the spec mandates when pre-wrap is
being used.
Bug: 1003184
Change-Id: Iab930be3ecc8e4dc814be25d902ecedabc70a944
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919351
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734897}