LibWeb: Add missing check if scrollable overflow defined for paintable

With 6a549f6270 we need to check if
optional scrollable overflow exists for paintable box, because it's not
computed for inline nodes.

Fixes crashing after navigating into direct messages screen on Discord.
This commit is contained in:
Aliaksandr Kalenik 2024-10-21 15:11:21 +02:00 committed by Alexander Kalenik
commit 629a3ac61e
Notes: github-actions[bot] 2024-10-21 13:58:16 +00:00
3 changed files with 20 additions and 2 deletions

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<span id="empty-span"></span>
<script src="include.js"></script>
<script>
test(() => {
const hiddenDiv = document.getElementById('empty-span');
const scrollHeight = hiddenDiv.scrollHeight;
const scrollWidth = hiddenDiv.scrollWidth;
println(`Scroll Height: ${scrollHeight}px, Scroll Width: ${scrollWidth}px`);
});
</script>