mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Use CSS Pixels for viewport rects
This commit is contained in:
parent
8cc0bdf777
commit
4084c66ad2
Notes:
sideshowbarker
2024-07-17 02:08:16 +09:00
Author: https://github.com/AtkinsSJ
Commit: 4084c66ad2
Pull-request: https://github.com/SerenityOS/serenity/pull/16514
Reviewed-by: https://github.com/MacDue
Reviewed-by: https://github.com/linusg ✅
7 changed files with 17 additions and 17 deletions
|
@ -1437,10 +1437,10 @@ void StyleComputer::invalidate_rule_cache()
|
|||
m_rule_cache = nullptr;
|
||||
}
|
||||
|
||||
Gfx::IntRect StyleComputer::viewport_rect() const
|
||||
CSSPixelRect StyleComputer::viewport_rect() const
|
||||
{
|
||||
if (auto const* browsing_context = document().browsing_context())
|
||||
return browsing_context->viewport_rect().to_type<float>().to_type<int>();
|
||||
return browsing_context->viewport_rect();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue