LibWeb: Rename Navigable::m_size to ::m_viewport_size

All other viewport-related dimensions are referenced to by 'viewport',
so let's rename the member that stores the viewport size to prevent
further confusion.
This commit is contained in:
Jelle Raaijmakers 2025-06-17 16:29:06 +02:00 committed by Tim Ledbetter
parent 46a46a1c61
commit e104d896eb
Notes: github-actions[bot] 2025-06-17 16:19:01 +00:00
3 changed files with 7 additions and 8 deletions

View file

@ -1803,7 +1803,7 @@ int Element::scroll_width() const
// 3. Let viewport width be the width of the viewport excluding the width of the scroll bar, if any,
// or zero if there is no viewport.
auto viewport_width = document.viewport_rect().width().to_int();
auto viewport_scroll_width = document.navigable()->size().width().to_int();
auto viewport_scroll_width = document.navigable()->viewport_size().width().to_int();
// 4. If the element is the root element and document is not in quirks mode
// return max(viewport scrolling area width, viewport width).
@ -1842,7 +1842,7 @@ int Element::scroll_height() const
// 3. Let viewport height be the height of the viewport excluding the height of the scroll bar, if any,
// or zero if there is no viewport.
auto viewport_height = document.viewport_rect().height().to_int();
auto viewport_scroll_height = document.navigable()->size().height().to_int();
auto viewport_scroll_height = document.navigable()->viewport_size().height().to_int();
// 4. If the element is the root element and document is not in quirks mode
// return max(viewport scrolling area height, viewport height).