Implement Layout Instability API ("layout shift")
Categories
(Core :: Layout, enhancement, P3)
Tracking
()
| Size Estimate | L |
People
(Reporter: dholbert, Assigned: bas.schouten)
References
(Depends on 1 open bug, Blocks 1 open bug, )
Details
(Keywords: dev-doc-needed, parity-chrome, web-feature, Whiteboard: [platform-feature])
User Story
web-feature:layout-instability webcompat-risk:low
Attachments
(8 external files)
This bug tracks the implementation of the Layout Instability API (for computing "layout shift" / "cumulative layout shift").
Spec: https://wicg.github.io/layout-instability/
(Not sure about timeline/priority at this point; just filing this as a placeholder bug for now.)
Updated•6 years ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•4 months ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 2•12 days ago
|
||
The position written there is tentative and overwritten by block-direction
alignment, so every inline frame of a reflowed line moved twice, which marks it
modified for retained display lists even when it ends up where it was. The ruby
base container's inline position is read before alignment, so it keeps the full
write, and the frames that SetSpanForEmptyLine skips get their position there.
| Assignee | ||
Comment 3•12 days ago
|
||
Behind layout.layout_shift.enabled, which is off by default. Nothing creates
entries yet.
| Assignee | ||
Comment 4•12 days ago
|
||
Frames store their rect from before their first change since the last rendering
update in a table on the PresShell, which costs one bit test when the rect
changes and nothing otherwise. A new rendering phase after intersection
observations scores the recorded moves, ignoring those explained by scrolling
or scroll anchoring, and queues an entry.
| Assignee | ||
Comment 5•12 days ago
|
||
Key and mouse button presses count as recent input right away. Shifts while a
pointer is down are held back until it is released, which makes them excluded,
or canceled because it became a scroll, which doesn't.
| Assignee | ||
Comment 6•12 days ago
|
||
When content is inserted into a long block, nsBlockFrame slides every following
line, and adding each of their frames to the hash table dominated the cost of
tracking. Keep them in one list per block instead, which reporting can cull
cheaply.
Updated•6 days ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
| Assignee | ||
Comment 7•1 day ago
|
||
The spec defines the visual representation of a node as the bounds of its own
boxes, and the impact region as the union of the visual representations of the
unstable nodes. These tests expected the bounding box of the parent and its
overflowing child instead (300x500), which is what Chrome computes from the
parent's visual overflow. Per node, the impact region is the parent's 300x400
plus the 100x100 where the child overflows below it.
child-shift-with-parent.html also gets a background on the child, so that the
expected score doesn't depend on whether boxes that don't paint anything count,
which the spec and implementations disagree on.
| Assignee | ||
Comment 8•1 day ago
|
||
Previous clip geometry, transient visibility changes, source pruning across
both rectangles, new descendants of a moving parent, resizes that move or keep
the starting corner, scroll containers that move while resizing, detached
attribution nodes, input timestamps of held-back shifts, and the entry type not
being supported in workers.
| Assignee | ||
Comment 9•1 day ago
|
||
Still failing:
- body-display-change.html: reconstructing a frame loses its old position.
- transform-counter-layout-shift.html, translate-counter-layout-shift.html,
shift-with-counter-scroll-and-transform.html,
shift-with-counter-scroll-and-translate.html: transform changes in the same
rendering update aren't accounted for. - pointerdown-becomes-scroll.html: no pointercancel reaches content when the
touch becomes a scroll. - inline-flow-shift.html: text boxes are shorter than the test assumes.
Updated•9 hours ago
|
Updated•9 hours ago
|
Updated•9 hours ago
|
Updated•9 hours ago
|
Updated•9 hours ago
|
Updated•9 hours ago
|
Updated•9 hours ago
|
Updated•9 hours ago
|
| Reporter | ||
Updated•7 hours ago
|
Description
•