mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Ladybird: Remove redundant subtraction of scrollbar from viewport rect
This commit is contained in:
parent
b1acf17d3c
commit
a14b00e046
Notes:
sideshowbarker
2024-07-18 03:23:00 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a14b00e046 Pull-request: https://github.com/SerenityOS/serenity/pull/16583 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg
1 changed files with 0 additions and 4 deletions
|
@ -618,10 +618,6 @@ void WebView::resizeEvent(QResizeEvent* event)
|
|||
auto scaled_width = int(event->size().width() / m_inverse_pixel_scaling_ratio);
|
||||
auto scaled_height = int(event->size().height() / m_inverse_pixel_scaling_ratio);
|
||||
Gfx::IntRect rect(horizontalScrollBar()->value(), verticalScrollBar()->value(), scaled_width, scaled_height);
|
||||
if (verticalScrollBar()->isVisible())
|
||||
rect.set_width(rect.width() - verticalScrollBar()->width());
|
||||
if (horizontalScrollBar()->isVisible())
|
||||
rect.set_height(rect.height() - horizontalScrollBar()->height());
|
||||
m_page_client->set_viewport_rect(rect);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue