Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove setting special viewport in desktop mode. JB#57542 #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions rpm/0091-sailfishos-gecko-removed-special-desktop-viewport.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: andrew-korolev-omp <[email protected]>
Date: Fri, 25 Feb 2022 14:54:47 +0300
Subject: [PATCH] removed setting special viewport in desktop mode

---
dom/base/Document.cpp | 14 --------------
1 file changed, 14 deletions(-)

diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp
index 132c0ecbfdac..5ad2078ea506 100644
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -9515,20 +9515,6 @@ nsViewportInfo Document::GetViewportInfo(const ScreenIntSize& aDisplaySize) {
CSSToScreenScale defaultScale =
layoutDeviceScale * LayoutDeviceToScreenScale(1.0);

- // Special behaviour for desktop mode, provided we are not on an about: page
- nsPIDOMWindowOuter* win = GetWindow();
- if (win && win->IsDesktopModeViewport() && !IsAboutPage()) {
- CSSCoord viewportWidth =
- StaticPrefs::browser_viewport_desktopWidth() / fullZoom;
- CSSToScreenScale scaleToFit(aDisplaySize.width / viewportWidth);
- float aspectRatio = (float)aDisplaySize.height / aDisplaySize.width;
- CSSSize viewportSize(viewportWidth, viewportWidth * aspectRatio);
- ScreenIntSize fakeDesktopSize = RoundedToInt(viewportSize * scaleToFit);
- return nsViewportInfo(fakeDesktopSize, scaleToFit,
- nsViewportInfo::ZoomFlag::AllowZoom,
- nsViewportInfo::ZoomBehaviour::Mobile);
- }
-
if (!nsLayoutUtils::ShouldHandleMetaViewport(this)) {
return nsViewportInfo(aDisplaySize, defaultScale,
nsLayoutUtils::AllowZoomingForDocument(this)
--
2.25.1

1 change: 1 addition & 0 deletions rpm/xulrunner-qt5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Patch87: 0087-sailfishos-gecko-Fix-memory-reporting-of-wasm-memory.patch
Patch88: 0088-Revert-Bug-1611386-Drop-support-for-enable-system-sq.patch
Patch89: 0089-sailfishos-gecko-Add-a-video-decoder-based-on-gecko-.patch
Patch90: 0090-sailfishos-gecko-Disable-debug-info-for-rust.patch
Patch91: 0091-sailfishos-gecko-removed-special-desktop-viewport.patch

#Patch20: 0020-sailfishos-loginmanager-Adapt-LoginManager-to-EmbedL.patch
#Patch51: 0051-sailfishos-gecko-Remove-android-define-from-logging.patch
Expand Down