зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1915051 - Early-exit UpdateResolutionForViewportSizeChange in fullscreen mode. r=hiro
Depends on D221391 Differential Revision: https://phabricator.services.mozilla.com/D221392
This commit is contained in:
Родитель
cffd299f60
Коммит
1b1dc6a39a
|
@ -81,6 +81,7 @@ class MockMVMContext : public MVMContext {
|
|||
bool AllowZoomingForDocument() const { return true; }
|
||||
bool IsInReaderMode() const { return false; }
|
||||
bool IsDocumentLoading() const { return false; }
|
||||
bool IsDocumentFullscreen() const { return false; }
|
||||
|
||||
void SetResolutionAndScaleTo(float aResolution,
|
||||
ResolutionChangeOrigin aOrigin) {
|
||||
|
|
|
@ -143,6 +143,11 @@ bool GeckoMVMContext::IsDocumentLoading() const {
|
|||
return mDocument->GetReadyStateEnum() == dom::Document::READYSTATE_LOADING;
|
||||
}
|
||||
|
||||
bool GeckoMVMContext::IsDocumentFullscreen() const {
|
||||
MOZ_ASSERT(mDocument);
|
||||
return mDocument->Fullscreen();
|
||||
}
|
||||
|
||||
void GeckoMVMContext::SetResolutionAndScaleTo(float aResolution,
|
||||
ResolutionChangeOrigin aOrigin) {
|
||||
MOZ_ASSERT(mPresShell);
|
||||
|
|
|
@ -50,6 +50,7 @@ class GeckoMVMContext final : public MVMContext {
|
|||
bool AllowZoomingForDocument() const override;
|
||||
bool IsInReaderMode() const override;
|
||||
bool IsDocumentLoading() const override;
|
||||
bool IsDocumentFullscreen() const override;
|
||||
|
||||
void SetResolutionAndScaleTo(float aResolution,
|
||||
ResolutionChangeOrigin aOrigin) override;
|
||||
|
|
|
@ -57,6 +57,7 @@ class MVMContext {
|
|||
virtual bool AllowZoomingForDocument() const = 0;
|
||||
virtual bool IsInReaderMode() const = 0;
|
||||
virtual bool IsDocumentLoading() const = 0;
|
||||
virtual bool IsDocumentFullscreen() const = 0;
|
||||
|
||||
virtual void SetResolutionAndScaleTo(float aResolution,
|
||||
ResolutionChangeOrigin aOrigin) = 0;
|
||||
|
|
|
@ -352,7 +352,7 @@ void MobileViewportManager::UpdateResolutionForViewportSizeChange(
|
|||
// viewport tag is added or removed)
|
||||
// 4. neither screen size nor CSS viewport changes
|
||||
|
||||
if (!aDisplayWidthChangeRatio) {
|
||||
if (!aDisplayWidthChangeRatio || mContext->IsDocumentFullscreen()) {
|
||||
UpdateVisualViewportSize(zoom);
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче