[wpt-sync] Sync PR 16847 - [LayoutNG] Fix crash for very long line with `break-word`
Categories
(Core :: CSS Parsing and Computation, defect, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync upstream])
Sync web-platform-tests PR 16847 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/16847
Details from upstream follow.
Koji Ishii <kojii@chromium.org> wrote:
[LayoutNG] Fix crash for very long line with
break-word
This patch fixes NGLineBreaker crash when handling a very
long line.Because line breaker determines overflow by the position
being larger than the available width, it cannot stop if the
available width is |LayoutUnit::Max()|. This patch clamps the
available width by |LayoutUnit::NearlyMax()| to prevent that.The
word-wrap: break-word
is not necessary to cause the
failure, but it makes things worse by setting |ShapeResult|
to |nullptr| when overflow occurs for the performance reason.This patch also changes |BreakText| to return whether the
overflow occurred or not, rather than callers to determine it
from the position. Doing so helps clearer communication with
the callers.Bug: 961987
Change-Id: I17eb758aca8b9b6d3e2f328e5b1b49acb83c0a5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1613138
Commit-Queue: Koji Ishii \<kojii@chromium.org>
Reviewed-by: Emil A Eklund \<eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660871}
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=a2aca41597f6ebd98de962e02cfa0e8424d067ad
Assignee | ||
Comment 2•5 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=400da3cb071074d4b7d59392a5cc64c4f9851053
Assignee | ||
Comment 3•5 years ago
|
||
Failed to get results from try push
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/15d10f4461d1 [wpt PR 16847] - [LayoutNG] Fix crash for very long line with `break-word`, a=testonly
Comment 5•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Description
•