瀏覽代碼

Ladybird/AppKit: Fix scrolling with high dpi

Bastiaan van der Plaat 1 年之前
父節點
當前提交
6f8ceb49c2
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      Ladybird/AppKit/UI/LadybirdWebViewBridge.cpp

+ 1 - 3
Ladybird/AppKit/UI/LadybirdWebViewBridge.cpp

@@ -38,9 +38,7 @@ WebViewBridge::WebViewBridge(Vector<Gfx::IntRect> screen_rects, float device_pix
     create_client(WebView::EnableCallgrindProfiling::No);
 
     on_scroll_by_delta = [this](auto x_delta, auto y_delta) {
-        // FIXME: This currently isn't reached because we do not yet propagate mouse wheel events to WebContent.
-        //        When that is implemented, make sure our mutations to the viewport position here are correct.
-        auto position = m_viewport_rect.location();
+        auto position = to_widget_position(m_viewport_rect.location());
         position.set_x(position.x() + x_delta);
         position.set_y(position.y() + y_delta);