Skip to content

ResizeObserver does not properly populate ResizeObserverEntry #38811

@arihant2math

Description

@arihant2math

Spec: https://drafts.csswg.org/resize-observer/#create-and-populate-a-resizeobserverentry
See:

The box size is not calculated at all for borderBoxSize.

Testcase (there probably are some WPT ones as well):

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Test ResizeObserver</title>
</head>
<body>
    <div id="someElement" style="min-width: 100px; min-height: 100px; background: red;"></div>
    <script>
        var ro = new ResizeObserver(entries => {
        for (let entry of entries) {
            const cr = entry.contentRect;
            console.log(entry.borderBoxSize);
        }
        });

        let someElement = document.querySelector('#someElement');
        console.log(someElement);
        // Observe one or multiple elements
        ro.observe(someElement);
    </script>
</body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domInteracting with the DOM from web contentC-has-manual-testcaseE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issI-wrongAn incorrect behaviour is observed.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions