-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
ResizeObserver does not properly populate ResizeObserverEntry #38811
Copy link
Copy link
Labels
A-content/domInteracting with the DOM from web contentInteracting with the DOM from web contentC-has-manual-testcaseE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issVariable effort required; may require a mentor. Recommended solution is clearly described in the issI-wrongAn incorrect behaviour is observed.An incorrect behaviour is observed.
Description
servo/components/script/dom/resizeobserver.rs
Line 158 in a75f3fd
| &[], |
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>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-content/domInteracting with the DOM from web contentInteracting with the DOM from web contentC-has-manual-testcaseE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issVariable effort required; may require a mentor. Recommended solution is clearly described in the issI-wrongAn incorrect behaviour is observed.An incorrect behaviour is observed.