mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:57:35 +00:00
LibWeb: Return a scroll offset of 0 for colgroup elements
Ideally we would not create a layout node at all for these elements so that every layout node would always have a paintable associated with it. But for now, to fix the crash, just leave a FIXME and special case this element. Also leave a VERIFY to make it easier to debug this type of crash in the future. Fixes a crash seen on codecov.io for my 'patch' project.
This commit is contained in:
parent
eb1c99bd72
commit
decc071060
3 changed files with 31 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
scroll left = 0
|
||||
scroll top = 0
|
13
Tests/LibWeb/Text/input/scroll-left-and-top-on-colgroup.html
Normal file
13
Tests/LibWeb/Text/input/scroll-left-and-top-on-colgroup.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<table>
|
||||
<colgroup id="my-group">
|
||||
<col width="40">
|
||||
<col></colgroup>
|
||||
<tbody>
|
||||
<script src="include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const element = document.getElementById('my-group');
|
||||
println(`scroll left = ${element.scrollLeft}`);
|
||||
println(`scroll top = ${element.scrollTop}`);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue