mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1200093
- Don't rely on finding the widget for a document in order to get the css-to-ld scale. r=botond
This commit is contained in:
parent
e6fab2c29e
commit
5b58cbd898
@ -7898,9 +7898,9 @@ nsDocument::GetViewportInfo(const ScreenIntSize& aDisplaySize)
|
||||
// pixel an integer, and we want the adjusted value.
|
||||
float fullZoom = context ? context->DeviceContext()->GetFullZoom() : 1.0;
|
||||
fullZoom = (fullZoom == 0.0) ? 1.0 : fullZoom;
|
||||
nsIWidget *widget = nsContentUtils::WidgetForDocument(this);
|
||||
float widgetScale = widget ? widget->GetDefaultScale().scale : 1.0f;
|
||||
CSSToLayoutDeviceScale layoutDeviceScale(widgetScale * fullZoom);
|
||||
CSSToLayoutDeviceScale layoutDeviceScale(
|
||||
(float)nsPresContext::AppUnitsPerCSSPixel() /
|
||||
context->AppUnitsPerDevPixel());
|
||||
|
||||
CSSToScreenScale defaultScale = layoutDeviceScale
|
||||
* LayoutDeviceToScreenScale(1.0);
|
||||
|
Loading…
Reference in New Issue
Block a user