diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /layout/base/ZoomConstraintsClient.cpp | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/base/ZoomConstraintsClient.cpp')
-rw-r--r-- | layout/base/ZoomConstraintsClient.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/layout/base/ZoomConstraintsClient.cpp b/layout/base/ZoomConstraintsClient.cpp index e695c7755e..e9be0c2073 100644 --- a/layout/base/ZoomConstraintsClient.cpp +++ b/layout/base/ZoomConstraintsClient.cpp @@ -53,9 +53,20 @@ static nsIWidget* GetWidget(PresShell* aPresShell) { return nullptr; } if (nsIFrame* rootFrame = aPresShell->GetRootFrame()) { +#if defined(MOZ_WIDGET_ANDROID) + // On Android in cases of about:XX pages loaded in the browser parent + // process we need to return the nearest widget since it's the widget owning + // an IAPZCTreeManager to communicate with the APZCTreeManager for the + // browser. + // In bug 1648427 we will apply this code to desktops as well to make + // about pages zoomable on desktops, but it will be involving more works, + // see https://bugzilla.mozilla.org/show_bug.cgi?id=1648427#c7 . + return rootFrame->GetNearestWidget(); +#else if (nsView* view = rootFrame->GetView()) { return view->GetWidget(); } +#endif } return nullptr; } @@ -199,6 +210,11 @@ void ZoomConstraintsClient::RefreshZoomConstraints() { return; } + // Ignore documents which has been removed from the doc shell. + if (!mDocument->IsActive()) { + return; + } + uint32_t presShellId = 0; ScrollableLayerGuid::ViewID viewId = ScrollableLayerGuid::NULL_SCROLL_ID; bool scrollIdentifiersValid = |