mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:58:11 +00:00
LibWebView+Ladybird: Move zoom logic to ViewImplementation
This commit is contained in:
parent
5411adca22
commit
5d9f4b2ffc
6 changed files with 36 additions and 67 deletions
|
@ -77,10 +77,6 @@ public:
|
|||
|
||||
void set_system_visibility_state(bool visible);
|
||||
|
||||
void zoom_in();
|
||||
void zoom_out();
|
||||
void reset_zoom();
|
||||
|
||||
Gfx::ShareableBitmap take_screenshot() const;
|
||||
Gfx::ShareableBitmap take_document_screenshot();
|
||||
|
||||
|
@ -125,10 +121,6 @@ public:
|
|||
Function<void()> on_forward_button;
|
||||
|
||||
private:
|
||||
static constexpr auto ZOOM_MIN_LEVEL = 0.3f;
|
||||
static constexpr auto ZOOM_MAX_LEVEL = 5.0f;
|
||||
static constexpr auto ZOOM_STEP = 0.1f;
|
||||
|
||||
OutOfProcessWebView();
|
||||
|
||||
// ^Widget
|
||||
|
@ -153,6 +145,7 @@ private:
|
|||
|
||||
// ^WebView::ViewImplementation
|
||||
virtual void create_client() override;
|
||||
virtual void update_zoom() override;
|
||||
virtual void notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize content_size) override;
|
||||
virtual void notify_server_did_paint(Badge<WebContentClient>, i32 bitmap_id) override;
|
||||
virtual void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, Gfx::IntRect const&) override;
|
||||
|
@ -206,7 +199,6 @@ private:
|
|||
|
||||
void request_repaint();
|
||||
void handle_resize();
|
||||
void update_zoom();
|
||||
|
||||
void handle_web_content_process_crash();
|
||||
|
||||
|
@ -223,9 +215,6 @@ private:
|
|||
Queue<InputEvent> m_pending_input_events;
|
||||
|
||||
bool m_content_scales_to_viewport { false };
|
||||
|
||||
float m_zoom_level { 1.0 };
|
||||
float m_device_pixel_ratio { 1.0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue