mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +00:00
headless-browser: Update m_viewport_rect after changing scroll offset
This commit is contained in:
parent
c5d91dce8b
commit
fc9a8c77d5
1 changed files with 2 additions and 3 deletions
|
@ -112,9 +112,8 @@ private:
|
|||
HeadlessWebContentView()
|
||||
{
|
||||
on_scroll_to_point = [this](auto position) {
|
||||
auto new_viewport_rect = m_viewport_rect;
|
||||
new_viewport_rect.set_location(position);
|
||||
client().async_set_viewport_rect(new_viewport_rect.to_type<Web::DevicePixels>());
|
||||
m_viewport_rect.set_location(position);
|
||||
client().async_set_viewport_rect(m_viewport_rect.to_type<Web::DevicePixels>());
|
||||
};
|
||||
|
||||
on_scroll_by_delta = [this](auto x_delta, auto y_delta) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue