mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibWeb: Clamp paintable box maximum scroll offset to 0
Previously calling `PaintableBox::set_scroll_offset()` with a PaintableBox whose content size was larger than its scrollble overflow rect would cause a crash. Found by Domato.
This commit is contained in:
parent
6b88e43b3b
commit
604f6040a1
Notes:
github-actions[bot]
2024-07-22 07:14:27 +00:00
Author: https://github.com/tcl3
Commit: 604f6040a1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/758
3 changed files with 20 additions and 2 deletions
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
#test {
|
||||
height: 0;
|
||||
}
|
||||
</style>
|
||||
<script src="include.js"></script>
|
||||
<div id="test">test</div>
|
||||
<script>
|
||||
test(() => {
|
||||
const divElement = document.getElementById("test");
|
||||
divElement.scrollBy(1, 1);
|
||||
divElement.remove();
|
||||
println("PASS (didn't crash)");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue