mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 21:45:20 +00:00
Android: Provide viewport_size instead of viewport_rect
This updates the Android WebViewImplementationNative to match changes
made in commit 5285e22f2a
.
We remove the async_set_viewport_rect call because the parent
ViewImplementation::handle_resize call does that for us.
This commit is contained in:
parent
85a92fb4d7
commit
ebc92dee93
Notes:
sideshowbarker
2024-07-16 16:23:32 +09:00
Author: https://github.com/thatoddmailbox Commit: https://github.com/LadybirdBrowser/ladybird/commit/ebc92dee93 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/402 Issue: https://github.com/LadybirdBrowser/ladybird/issues/220 Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 3 additions and 4 deletions
|
@ -93,8 +93,7 @@ void WebViewImplementationNative::paint_into_bitmap(void* android_bitmap_raw, An
|
|||
|
||||
void WebViewImplementationNative::set_viewport_geometry(int w, int h)
|
||||
{
|
||||
m_viewport_rect = { { 0, 0 }, { w, h } };
|
||||
client().async_set_viewport_rect(0, m_viewport_rect);
|
||||
m_viewport_size = { w, h };
|
||||
handle_resize();
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ class WebViewImplementationNative : public WebView::ViewImplementation {
|
|||
public:
|
||||
WebViewImplementationNative(jobject thiz);
|
||||
|
||||
virtual Web::DevicePixelRect viewport_rect() const override { return m_viewport_rect; }
|
||||
virtual Web::DevicePixelSize viewport_size() const override { return m_viewport_size; }
|
||||
virtual Gfx::IntPoint to_content_position(Gfx::IntPoint p) const override { return p; }
|
||||
virtual Gfx::IntPoint to_widget_position(Gfx::IntPoint p) const override { return p; }
|
||||
virtual void update_zoom() override { }
|
||||
|
@ -38,6 +38,6 @@ public:
|
|||
|
||||
private:
|
||||
jobject m_java_instance = nullptr;
|
||||
Web::DevicePixelRect m_viewport_rect;
|
||||
Web::DevicePixelSize m_viewport_size;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue