Closed Bug 1883023 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 44879 - Avoid forced layout when finished parsing an empty subframe

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Noam Rosenthal <nrosenthal@chromium.org> wrote:

Avoid forced layout when finished parsing an empty subframe

The exiting check for empty document doesn't take into account that
we force-load an empty document, which doesn't change the flag.

Added a more appropriate check, initially behind the existing
kAvoidForcedLayoutOnInitialEmptyDocumentInSubframe flag, which would
allow us to finch-test this together with the previous change.

These two changes together should prevent jank on many sites that use
empty iframes, e.g. sites that use GTM.

This forced layout was overlooked by the previous test because it
doesn't use the proper code path for forcing layout. Updated the test
to ensure that added nodes don't have their styled clean (they still need a style recalc) after adding the iframe to the DOM.

Bug: 324572951
Change-Id: Ib3b50e330e9a72c83b29d1e47f256b7ce33ae8ad
Reviewed-on: https://chromium-review.googlesource.com/5335144
WPT-Export-Revision: 42254649d459b1f495c0cb2e3dcdd512a8dbce0a

Component: web-platform-tests → Layout
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 42 subtests

Status Summary

Firefox

OK : 1
PASS: 42

Chrome

OK : 1
PASS: 42

Safari

OK : 1
PASS: 42

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e7440224702b [wpt PR 44879] - Avoid forced layout when finished parsing an empty subframe, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.