Commit 9abf3025 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Chromium LUCI CQ

Allow layout tree changes in container query recalc

Bug: 1146097
Change-Id: I2fbb9d6f41d916fc85b6538f5a3d4545daac40fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2624654Reviewed-by: default avatarAnders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842695}
parent e4d48566
...@@ -1598,7 +1598,8 @@ void Node::AttachLayoutTree(AttachContext& context) { ...@@ -1598,7 +1598,8 @@ void Node::AttachLayoutTree(AttachContext& context) {
} }
void Node::DetachLayoutTree(bool performing_reattach) { void Node::DetachLayoutTree(bool performing_reattach) {
DCHECK(GetDocument().Lifecycle().StateAllowsDetach()); DCHECK(GetDocument().Lifecycle().StateAllowsDetach() ||
GetDocument().GetStyleEngine().InContainerQueryStyleRecalc());
DCHECK(!performing_reattach || DCHECK(!performing_reattach ||
GetDocument().GetStyleEngine().InRebuildLayoutTree()); GetDocument().GetStyleEngine().InRebuildLayoutTree());
DocumentLifecycle::DetachScope will_detach(GetDocument().Lifecycle()); DocumentLifecycle::DetachScope will_detach(GetDocument().Lifecycle());
......
...@@ -4523,7 +4523,8 @@ void LayoutObject::ClearPaintFlags() { ...@@ -4523,7 +4523,8 @@ void LayoutObject::ClearPaintFlags() {
} }
bool LayoutObject::IsAllowedToModifyLayoutTreeStructure(Document& document) { bool LayoutObject::IsAllowedToModifyLayoutTreeStructure(Document& document) {
return document.Lifecycle().StateAllowsLayoutTreeMutations(); return document.Lifecycle().StateAllowsLayoutTreeMutations() ||
document.GetStyleEngine().InContainerQueryStyleRecalc();
} }
void LayoutObject::SetSubtreeShouldDoFullPaintInvalidation( void LayoutObject::SetSubtreeShouldDoFullPaintInvalidation(
......
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