Bug 1920357 - Ignore viewport meta tag when we're in RDM and we also force desktop viewport. r=devtools-reviewers,jdescottes
Currently DevTools doesn't do it, but it feels like the right API and is already there. This allows fixing this on the devtools side however you want :) Differential Revision: https://phabricator.services.mozilla.com/D223627
This commit is contained in:
@@ -2759,6 +2759,20 @@ void BrowsingContext::DidSet(FieldIndex<IDX_InRDMPane>, bool aOldValue) {
|
||||
PresContextAffectingFieldChanged();
|
||||
}
|
||||
|
||||
void BrowsingContext::DidSet(FieldIndex<IDX_ForceDesktopViewport>,
|
||||
bool aOldValue) {
|
||||
MOZ_ASSERT(IsTop(), "Should only set in the top-level browsing context");
|
||||
if (ForceDesktopViewport() == aOldValue) {
|
||||
return;
|
||||
}
|
||||
PresContextAffectingFieldChanged();
|
||||
if (nsIDocShell* shell = GetDocShell()) {
|
||||
if (RefPtr ps = shell->GetPresShell()) {
|
||||
ps->MaybeRecreateMobileViewportManager(/* aAfterInitialization= */ true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool BrowsingContext::CanSet(FieldIndex<IDX_PageAwakeRequestCount>,
|
||||
uint32_t aNewValue, ContentParent* aSource) {
|
||||
return IsTop() && XRE_IsParentProcess() && !aSource;
|
||||
|
||||
Reference in New Issue
Block a user