Commit a0e6cb4e authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Don't access body LayoutObject marked for reattach.

With the work for unified ComputedStyle storage on element, found that
we are accessing the LayoutObject from the old layout tree when the
viewport defining element changes and body is marked for re-attach.

TEST=external/wpt/cssom-view/scrollingElement-*

Change-Id: I5b8d8f8291d05d058af61779992c24381f3edba0
Reviewed-on: https://chromium-review.googlesource.com/c/1356479
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: default avatarAnders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613032}
parent be35fdc4
......@@ -2380,6 +2380,8 @@ void Document::ViewportDefiningElementDidChange() {
HTMLBodyElement* body = FirstBodyElement();
if (!body)
return;
if (body->NeedsReattachLayoutTree())
return;
LayoutObject* layout_object = body->GetLayoutObject();
if (layout_object && layout_object->IsLayoutBlock()) {
// When the overflow style for documentElement changes to or from visible,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment