Skip to content

All frame CLS should use weighted score to account for frame size #12023

@anniesullie

Description

@anniesullie

I saw that @adamraine added support for CLS in all frames in #11713. Awesome!

But it looks like that code just adds up the individual layout shift scores for all frames? Iframes should use the weighted score, which accounts for their size. For example, if a 10x10 pixel iframe had a shift across its entire viewport, the score of the shift is 1, but the weighted score is much lower to take into account that the user only saw the shift in a tiny area of the viewport.

The weighted score was just added to the trace in chromium today in https://chromium-review.googlesource.com/c/chromium/src/+/2659157

It will be in M90; let us know if we should request a merge to M89!

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions