Skip to content

ResizeObserver depth calculation isn't correct #40111

@jdm

Description

@jdm

Spec: https://drafts.csswg.org/resize-observer/#calculate-depth-for-node

Implementation:

let depth = node.inclusive_ancestors_in_flat_tree().count() - 1;

This is almost correct, but I think the spec actually wants the inclusive ancestor path. The - 1 was attempting to give us the noninclusive ancestor path, and removing it allows /resize-observer/notify.html to run to completion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions