1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +00:00

LibWeb: Ensure DOMRect top, bottom, left and right handle NaN correctly

This commit is contained in:
Tim Ledbetter 2024-02-17 08:09:53 +00:00 committed by Jelle Raaijmakers
parent b03c94c26e
commit 1560bfc6c9
3 changed files with 47 additions and 4 deletions

View file

@ -26,6 +26,18 @@
// 4. Creating a DOMRect with DOMRect.fromRect()
testPart(() => Rect.fromRect({ x: 10, y: 20, width: 30, height: 40 }));
// 5. Creating a DOMRect with NaN x value
testPart(() => new Rect(NaN, 20, 30, 40));
// 6. Creating a DOMRect with NaN y value
testPart(() => new Rect(10, NaN, 30, 40));
// 7. Creating a DOMRect with NaN width value
testPart(() => new Rect(10, 20, NaN, 40));
// 8. Creating a DOMRect with NaN height value
testPart(() => new Rect(10, 20, 30, NaN));
testCounter = 1;
}
});