Closed Bug 1667452 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 25795 - Reset trailing space structure when rewinding due to overflow handling

Categories

(Core :: Layout: Text and Fonts, task, P4)

task

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 25795 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/25795
Details from upstream follow.

b'Javier Fern\xc3\xa1ndez Garc\xc3\xada-Boente <jfernandez@igalia.com>' wrote:

Reset trailing space structure when rewinding due to overflow handling

During the HandleOverflow we consider the possibility of breaking at
previous opportunity. The logic for this case is implemented in the
BreakTextAtPreviousBreakOpportunity function.

In case that there is such suitable previous opportunity, we modify the
ItemResult that includes this opportunity in its offset range. We also
create a new ShapeResultView associated to this item_result, using the
new offset range.

However, it's possible that the trailing_collapsible_space_ structure
already has this ItemResult instance, that we are now altering as part
of the HandleOverflow logic.

The problem described in the issue 1131470 is caused by this situation,
where an ItemResult instance hold by the trailing_collapsible_space_ is
modified. During the computation of the trailing spaces size, as part
of the RemoveTrailingCollapsibleSpace function, we avoid calling to the
TruncateLineEndResult, which will reshape again, in case the item_result
considered is already present in the trailing_collapsible_space_
structure. This causes that we end up with an ItemREsult of a different
size than the previously computed collapsed_shape_result.

Bug: 1131470
Change-Id: I15b31303fb8ec52b6d7359880f2785d16e1a0c59

Reviewed-on: https://chromium-review.googlesource.com/2429411
WPT-Export-Revision: f48c8ff98d314521f9facf1431bd15f583ab48e5

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core

CI Results

Ran 12 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d96bfb74e397
[wpt PR 25795] - Reset trailing space structure when rewinding due to overflow handling, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.