Closed Bug 1733211 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 30815 - Use the non-hangable-run-end when considering no first-safe position

Categories

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

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Javier Fernández García-Boente <jfernandez@igalia.com> wrote:

Use the non-hangable-run-end when considering no first-safe position

When executing the ShapeLineBreaker::ShapeLine logic we have a case for
when the first_safe position is bigger than the break_opportunity we
are considering. In that case, we must reshape the whole range.

However, since the change we landed in r873246, we've modified the
BreakIterator's logic to consider breaking opportunities after spaces,
aligning with how ICU is implemented, following the UAX#14 rules. In
order to keep the optimizations to avoid unnecessary reshapes, we also
hold the non-hangable-run-end position, so that we can use it,
depending on the different combinations of values for the CSS Text
properties.

The bug 1248710 is a violation of a DCHECK added to ensure the shaping
algorithm always move forward, to avoid potential infinite-loops.

This CL tries to solve the bug by considering the non-hangable-run-end
position to detected the previously mentioned case of a first-safe
position bigger than the current breaking opportunity's offset.

Bug: 1248710
Change-Id: I5fc2222142d648b74b33033e62270789a84beae3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3162058
Commit-Queue: Koji Ishii \<kojii@chromium.org>
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#925962}

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

CI Results

Ran 11 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/171789b0709a
[wpt PR 30815] - Use the non-hangable-run-end when considering no first-safe position, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.