mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibWeb+WebContent+headless-browser: Make Page aware of the display scale
For now, we just report it as "1" everywhere. Replaced `screen_rect()` with `web_exposed_screen_area()` from the spec.
This commit is contained in:
parent
6361584d4a
commit
8dfeb67f8c
9 changed files with 118 additions and 34 deletions
|
@ -33,7 +33,13 @@ void Screen::visit_edges(Cell::Visitor& visitor)
|
|||
|
||||
Gfx::IntRect Screen::screen_rect() const
|
||||
{
|
||||
return window().page()->screen_rect();
|
||||
auto screen_rect_in_css_pixels = window().page()->web_exposed_screen_area();
|
||||
return {
|
||||
screen_rect_in_css_pixels.x().value(),
|
||||
screen_rect_in_css_pixels.y().value(),
|
||||
screen_rect_in_css_pixels.width().value(),
|
||||
screen_rect_in_css_pixels.height().value()
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue