mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
LibWeb: Use is_scroll_container instead of is_scrollable in JS APIs
is_scroll_container() returns true for "overflow: hidden" which allows programmable scrolling while is_scrollable() returns true only for "overflow: scroll" and "overflow: auto" which allow scrolling only by user interactions.
This commit is contained in:
parent
869bef523e
commit
491da2a810
1 changed files with 2 additions and 2 deletions
|
@ -1041,7 +1041,7 @@ void Element::set_scroll_left(double x)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto* box = static_cast<Layout::Box*>(layout_node());
|
auto* box = static_cast<Layout::Box*>(layout_node());
|
||||||
if (!box->is_scrollable())
|
if (!box->is_scroll_container())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// FIXME: or the element has no overflow.
|
// FIXME: or the element has no overflow.
|
||||||
|
@ -1109,7 +1109,7 @@ void Element::set_scroll_top(double y)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto* box = static_cast<Layout::Box*>(layout_node());
|
auto* box = static_cast<Layout::Box*>(layout_node());
|
||||||
if (!box->is_scrollable())
|
if (!box->is_scroll_container())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// FIXME: or the element has no overflow.
|
// FIXME: or the element has no overflow.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue