This repository was archived by the owner on Jul 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +9
-1
lines changed
gfx/layers/apz/test/gtest/mvm Expand file tree Collapse file tree 5 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ class MockMVMContext : public MVMContext {
81
81
bool AllowZoomingForDocument () const { return true ; }
82
82
bool IsInReaderMode () const { return false ; }
83
83
bool IsDocumentLoading () const { return false ; }
84
+ bool IsDocumentFullscreen () const { return false ; }
84
85
85
86
void SetResolutionAndScaleTo (float aResolution,
86
87
ResolutionChangeOrigin aOrigin) {
Original file line number Diff line number Diff line change @@ -143,6 +143,11 @@ bool GeckoMVMContext::IsDocumentLoading() const {
143
143
return mDocument ->GetReadyStateEnum () == dom::Document::READYSTATE_LOADING;
144
144
}
145
145
146
+ bool GeckoMVMContext::IsDocumentFullscreen () const {
147
+ MOZ_ASSERT (mDocument );
148
+ return mDocument ->Fullscreen ();
149
+ }
150
+
146
151
void GeckoMVMContext::SetResolutionAndScaleTo (float aResolution,
147
152
ResolutionChangeOrigin aOrigin) {
148
153
MOZ_ASSERT (mPresShell );
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ class GeckoMVMContext final : public MVMContext {
50
50
bool AllowZoomingForDocument () const override ;
51
51
bool IsInReaderMode () const override ;
52
52
bool IsDocumentLoading () const override ;
53
+ bool IsDocumentFullscreen () const override ;
53
54
54
55
void SetResolutionAndScaleTo (float aResolution,
55
56
ResolutionChangeOrigin aOrigin) override ;
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ class MVMContext {
57
57
virtual bool AllowZoomingForDocument () const = 0;
58
58
virtual bool IsInReaderMode () const = 0;
59
59
virtual bool IsDocumentLoading () const = 0;
60
+ virtual bool IsDocumentFullscreen () const = 0;
60
61
61
62
virtual void SetResolutionAndScaleTo (float aResolution,
62
63
ResolutionChangeOrigin aOrigin) = 0;
Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ void MobileViewportManager::UpdateResolutionForViewportSizeChange(
352
352
// viewport tag is added or removed)
353
353
// 4. neither screen size nor CSS viewport changes
354
354
355
- if (!aDisplayWidthChangeRatio) {
355
+ if (!aDisplayWidthChangeRatio || mContext -> IsDocumentFullscreen () ) {
356
356
UpdateVisualViewportSize (zoom);
357
357
return ;
358
358
}
You can’t perform that action at this time.
0 commit comments