Closed Bug 1693544 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 27677 - Consider the hyhen size in the available width when evaluating overflow

Categories

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

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

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

Consider the hyhen size in the available width when evaluating overflow

The logic in NGLineBreaker::BreakText completes the algorithm by
evaluating whether the NGInlineItem inline size fits in the available
width, received in the function argument "available_width".

However, when hyphenation is applied, we reduce this initial available
width, subtracting the hyphen inline size, and run another iteration of
the ShapeLine() function. The new item's inline size is evaluated again
to check whether it overflows or not.

The root case of the issue described in the bug is that we are using the
value stored in the available_width variable, which we've just reduced
because of hyphenation. We should use the available_width_with_hyphens
variable instead.

Bug: 1175716
Change-Id: I3ecac2362f7cf9951cd0d323a7b163385d240f89
Reviewed-on: https://chromium-review.googlesource.com/2704079
WPT-Export-Revision: 7c2547e30e98fc1f6734621bdd8dc477e6d9b9e2

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

CI Results

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

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

FAIL: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/df0796f65965 [wpt PR 27677] - Consider the hyhen size in the available width when evaluating overflow, a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/030a54e53c32 [wpt PR 27677] - Consider the hyhen size in the available width when evaluating overflow, a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e338d9c35879 [wpt PR 27677] - Consider the hyhen size in the available width when evaluating overflow, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.