mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1228602 - Ensure that we pick up the presShell resolution from the layer if there isn't a metrics. r=botond
This commit is contained in:
parent
17069590f6
commit
f15ce579ad
@ -368,6 +368,17 @@ public:
|
||||
return sNoClipRect;
|
||||
}
|
||||
|
||||
float GetPresShellResolution() const
|
||||
{
|
||||
MOZ_ASSERT(IsValid());
|
||||
|
||||
if (AtTopLayer() && mLayer->AsContainerLayer()) {
|
||||
return mLayer->AsContainerLayer()->GetPresShellResolution();
|
||||
}
|
||||
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
EventRegionsOverride GetEventRegionsOverride() const
|
||||
{
|
||||
MOZ_ASSERT(IsValid());
|
||||
|
@ -84,8 +84,8 @@ GetTransformToAncestorsParentLayer(Layer* aStart, const LayerMetricsWrapper& aAn
|
||||
// With containerless scrolling, the offending post-scale is on the
|
||||
// parent layer of the displayport-ancestor, which we don't reach in this
|
||||
// loop, so we don't need to worry about it.
|
||||
const FrameMetrics& metrics = iter.Metrics();
|
||||
transform.PostScale(metrics.GetPresShellResolution(), metrics.GetPresShellResolution(), 1.f);
|
||||
float presShellResolution = iter.GetPresShellResolution();
|
||||
transform.PostScale(presShellResolution, presShellResolution, 1.0f);
|
||||
}
|
||||
}
|
||||
return ViewAs<LayerToParentLayerMatrix4x4>(transform);
|
||||
|
Loading…
Reference in New Issue
Block a user