mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1194811 Part 1 - Recompute the zoom constraints if the available screen area changes. r=botond
This commit is contained in:
parent
0838df656b
commit
afdb6ee295
@ -133,6 +133,13 @@ ZoomConstraintsClient::Observe(nsISupports* aSubject, const char* aTopic, const
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
ZoomConstraintsClient::ScreenSizeChanged()
|
||||
{
|
||||
ZCC_LOG("Got a screen-size change notification in %p\n", this);
|
||||
RefreshZoomConstraints();
|
||||
}
|
||||
|
||||
mozilla::layers::ZoomConstraints
|
||||
ComputeZoomConstraintsFromViewportInfo(const nsViewportInfo& aViewportInfo)
|
||||
{
|
||||
|
@ -33,6 +33,7 @@ private:
|
||||
public:
|
||||
void Init(nsIPresShell* aPresShell, nsIDocument *aDocument);
|
||||
void Destroy();
|
||||
void ScreenSizeChanged();
|
||||
|
||||
private:
|
||||
void RefreshZoomConstraints();
|
||||
|
@ -1795,6 +1795,12 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (mZoomConstraintsClient) {
|
||||
// If we have a ZoomConstraintsClient and the available screen area
|
||||
// changed, then we might need to disable double-tap-to-zoom, so notify
|
||||
// the ZCC to update itself.
|
||||
mZoomConstraintsClient->ScreenSizeChanged();
|
||||
}
|
||||
if (mMobileViewportManager) {
|
||||
// If we have a mobile viewport manager, request a reflow from it. It can
|
||||
// recompute the final CSS viewport and trigger a call to
|
||||
|
Loading…
Reference in New Issue
Block a user