mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
LibWeb: Don't apply DPR or zoom level to screen.{width,height}
Safari and WebKit don't apply these, while Firefox only applies the zoom level. This fixes https://x.com/ showing the tablet view.
This commit is contained in:
parent
c7926b2212
commit
de892abdba
Notes:
github-actions[bot]
2025-03-25 17:35:40 +00:00
Author: https://github.com/Lubrsi
Commit: de892abdba
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4084
Reviewed-by: https://github.com/awesomekling ✅
1 changed files with 4 additions and 5 deletions
|
@ -104,12 +104,11 @@ Gfx::Palette Page::palette() const
|
||||||
CSSPixelRect Page::web_exposed_screen_area() const
|
CSSPixelRect Page::web_exposed_screen_area() const
|
||||||
{
|
{
|
||||||
auto device_pixel_rect = m_client->screen_rect();
|
auto device_pixel_rect = m_client->screen_rect();
|
||||||
auto scale = client().device_pixels_per_css_pixel();
|
|
||||||
return {
|
return {
|
||||||
device_pixel_rect.x().value() / scale,
|
device_pixel_rect.x().value(),
|
||||||
device_pixel_rect.y().value() / scale,
|
device_pixel_rect.y().value(),
|
||||||
device_pixel_rect.width().value() / scale,
|
device_pixel_rect.width().value(),
|
||||||
device_pixel_rect.height().value() / scale
|
device_pixel_rect.height().value()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue