mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +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:
parent
4160f13174
commit
433d3f988d
1 changed files with 2 additions and 1 deletions
|
@ -1779,7 +1779,8 @@ HashMap<DeprecatedFlyString, CSS::StyleProperty> const& Element::custom_properti
|
||||||
// https://drafts.csswg.org/cssom-view/#dom-element-scroll
|
// https://drafts.csswg.org/cssom-view/#dom-element-scroll
|
||||||
void Element::scroll(double x, double y)
|
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
|
// https://drafts.csswg.org/cssom-view/#dom-element-scroll
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue