Skip to content

Commit 0341e50

Browse files
lillesjmajnert
authored andcommitted
Run snapshot post-layout state every resizeObserver loop iteration
Aligning with proposal 1 in: whatwg/html#11613 (comment) Bug: 384523570 Change-Id: I22ac0bb9d9ab8cb5732207105ec61e9aceecd040 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7074836 Commit-Queue: Rune Lillesveen <[email protected]> Reviewed-by: Anders Hartvoll Ruud <[email protected]> Cr-Commit-Position: refs/heads/main@{#1534957}
1 parent 575838c commit 0341e50

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

third_party/blink/renderer/core/frame/local_frame_view.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2379,8 +2379,12 @@ void LocalFrameView::UpdateLifecyclePhasesInternal(
23792379
});
23802380
}
23812381
// Only run the rest of the steps here if resize observer is done.
2382-
if (needs_to_repeat_lifecycle)
2382+
if (needs_to_repeat_lifecycle) {
2383+
if (RuntimeEnabledFeatures::RunSnapshotPostLayoutStateStepsEnabled()) {
2384+
should_run_scroll_snapshot_client_steps = true;
2385+
}
23832386
continue;
2387+
}
23842388

23852389
// ViewTransition mutates the tree and mirrors post layout transform for
23862390
// transitioning elements to UA created elements. This may dirty
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This is a testharness.js-based test.
2+
[FAIL] Multiple style/layout passes occur when necessary
3+
assert_equals: expected 1 but got 2
4+
Harness: the test ran to completion.
5+

0 commit comments

Comments
 (0)