Closed Bug 1672914 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 26248 - Fix NGLineBreaker::RewindOverflow crash

Categories

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

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Koji Ishii <kojii@chromium.org>' wrote:

Fix NGLineBreaker::RewindOverflow crash

This patch is a re-fix of r819722 \<crrev.com/c/2489730>.

It turned out that |NGLineBreaker| hangs the attached test
case before r819722, and crashes after. This is because
|Rewind| may fail if the line has floats, and in that case,
the current item is not a text item.

This patch changes it to just setting the state to |kTrailing|
and return, so that, if |Rewind| succeeds, |BreakLine| will
call |HandleText|, which will call |HandleTrailingSpaces| when
the text item starts with spaces.

When |Rewind| fails, |BreakLine| can handle non-text items too.

Bug: 1141384
Change-Id: I96e428d2c9ff50b3685c2a83eafdcea509749594
Reviewed-on: https://chromium-review.googlesource.com/2492700
WPT-Export-Revision: 96fa4e2b220aaa389ffcec68f1a1e2409d876153

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

TIMEOUT: 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/0f79f4078ba6
[wpt PR 26248] - Fix NGLineBreaker::RewindOverflow crash, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.