1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

LibWeb: Add ad-hoc implementation for Element::scroll(x, y)

Adds very naive implementation for js function to trigger scroll but
that is enough to start using it in tests :)
This commit is contained in:
Aliaksandr Kalenik 2023-08-06 21:36:05 +02:00 committed by Andreas Kling
parent 4160f13174
commit 433d3f988d

View file

@ -1779,7 +1779,8 @@ HashMap<DeprecatedFlyString, CSS::StyleProperty> const& Element::custom_properti
// https://drafts.csswg.org/cssom-view/#dom-element-scroll
void Element::scroll(double x, double y)
{
dbgln("FIXME: Implement Element::scroll(x: {}, y: {}", x, y);
// AD-HOC:
const_cast<Painting::PaintableBox*>(paintable_box())->scroll_by(x, y);
}
// https://drafts.csswg.org/cssom-view/#dom-element-scroll