[wpt-sync] Sync PR 27631 - [TablesNG] clusterfuzz multicol causes illegal table layout trees
Categories
(Core :: Layout: Tables, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox87 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 27631 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/27631
Details from upstream follow.
b'Aleks Totic <atotic@chromium.org>' wrote:
[TablesNG] clusterfuzz multicol causes illegal table layout trees
The cause of the crash is legacy LayoutTableColumn inside
LayoutNGTable. This triggers bad typecast, wrong methods get called...I am not sure what the correct fix is,
my knowledge of usage of flags that force Legacy layout is
limited, and that code seems very unforgiving.I've added a DCHECK that traps the error before random
memory overwrite.I've minimized a testcase. This is my understanding of what went wrong:
The dom tree looks like this at start.
START IN MULTICOL
fieldset MC (Multicol)
span MC
embed
table MC
colgroupMUTATION:
Span gets cloned and insterted into colgroup.colgroup
span.clonedspan.cloned Element::UpdateForceLegacyLayout gets called.
This calls ForceLegacyLayoutInFormattingContext, which traverses
ancestors, and calls:
colgroup.SetShouldForceLegacyLayoutForChild()END WITHOUT MULTICOL
Multicol styles get removed from the document.
Colgroup still has SetShouldForceLegacyLayoutForChild set to true.But, COLGROUP did not force legacy originally because its SpecifiesColumns()
was false. So it never calls UpdateForceLegacyLayout(), and its flag
SetShouldForceLegacyLayoutForChild never gets reset.When COLGROUP LayoutObject gets created, it is forced to Legacy because
of this flag, gets inserted into LayoutNGTable and asserts.My "fix" is really just a hack because I do not understand the framework.
I believe mstensho might know the correct way to fix this.Bug: 1178263
Change-Id: Ifebaaccbad4006819ca66fed8310ddeb59e1aa64
Reviewed-on: https://chromium-review.googlesource.com/2692390
WPT-Export-Revision: d7f5b3e6e21fcf52411929148db52f84c3a0b209
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Comment 2•5 years ago
|
||
CI Results
Ran 14 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•5 years ago
|
||
| bugherder | ||
Description
•