mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibWeb: Return overflow rect width from Element::scroll_width()
Spec says that this function has to return "width of the element scrolling area" which is width of "scrolling overflow rect" in our model.
This commit is contained in:
parent
89319cd0c9
commit
9f581d0bc9
3 changed files with 28 additions and 1 deletions
|
@ -1394,7 +1394,7 @@ int Element::scroll_width() const
|
|||
return 0;
|
||||
|
||||
// 7. Return the width of the element’s scrolling area.
|
||||
return paintable_box()->border_box_width().to_int();
|
||||
return paintable_box()->scrollable_overflow_rect()->width().to_int();
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#dom-element-scrollheight
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue