Closed Bug 1570618 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 18232 - Use To<Dynamic> for rebuild root to make sure we don't crash.

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Rune Lillesveen <futhark@chromium.org> wrote:

Use To<Dynamic> for rebuild root to make sure we don't crash.

We were able to SetNeedsReattachLayoutTree() on a Text node where none
of the ancestor elements had a LayoutObject and the Document had a \<br>
as a documentElement. The reason is that LayoutView does not allow a
LayoutBr child which meant we recomputed styles for the whole subtree,
but no LayoutObjects were created. Setting the text data on the text
node would mark it for re-attachment (in case it didn't have a
LayoutText because it used to be a non-rendered white-space). If it was
in a display:none subtree we wouldn't have reached the text node during
recalc, but because of LayoutView rejecting the LayoutBr, we already had
ComputedStyle all the way.

Bug: 989827
Change-Id: I72ae371466e607baf4caffad9ed634beb2a66bf5
Reviewed-on: https://chromium-review.googlesource.com/1731112
WPT-Export-Revision: 5f6d97bc8d38a35da4e2749c48211f06a55d05b7

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 1 tests and 1 subtests OK : 1 PASS : 1
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3a53a865fc40 [wpt PR 18232] - Use To<Dynamic> for rebuild root to make sure we don't crash., a=testonly
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.