mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 20:32:56 +03: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
Notes:
sideshowbarker
2024-07-17 02:06:40 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/433d3f988d Pull-request: https://github.com/SerenityOS/serenity/pull/20395 Reviewed-by: https://github.com/MacDue
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user