[wpt-sync] Sync PR 44564 - Fix min-content related crash in `LineBreaker::SplitTrailingBidiPreservedSpace`
Categories
(Core :: Layout: Text and Fonts, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox125 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 44564 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/44564
Details from upstream follow.
Andreu Botella <abotella@igalia.com> wrote:
Fix min-content related crash in
LineBreaker::SplitTrailingBidiPreservedSpaceIn crrev.com/c/5199988, the
SplitTrailingBidiPreservedSpacemethod
was added to theLineBreakerclass, which is called right at the end
of line breaking. This method fixes a bidi bug where trailing spaces
were not being reset to the paragraph's bidi direction, and it does so
by splitting some item results (and their shape results) into two
after their construction.This method assumes that non-empty item results always have a non-null
shape result. This is usually the case, but when computing the minimum
and maximum sizes of an inline node (e.g. for{min,max}-content), a
fast path is used (LineBreak::HandleTextForFastMinContent) which
creates inline item results with a null shape result. This caused a
crash when trying to create aShapeResultViewwithout a source shape
result.This patch fixes this by adding an early return from
LineBreaker::SplitTrailingBidiPreservedSpaceif the line breaker
mode iskMinContent. This is incorrect, but it can only affect the
hanging behavior of trailing other space separators, which is already
incorrect with{min,max}-contenteven in non-bidi text. We are
already working on fixing this behavior, and we don't expect any
breakage resulting from this early return.Bug: 324684931
Change-Id: I6a5a7aae06a0aafdb34b5836030921041d50dfb3
Reviewed-on: https://chromium-review.googlesource.com/5291239
WPT-Export-Revision: 81a9e2b3e4b14995c912d47dab46661825605fbb
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
CI Results
Ran 0 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
Comment 4•2 years ago
|
||
| bugherder | ||
Description
•