Bug 1576298 - Remove DeviceSizeIsPageSize from nsDocShell and nsPresContext. r=emilio

This comes from bug 890195, and it was superseded by bug 1575097.

This isn't used for anything anymore, and we can remove the otherwise unused
MediaFeatureChangeReason flag as well.

Differential Revision: https://phabricator.services.mozilla.com/D174492
This commit is contained in:
Emily McDonough
2023-04-03 17:11:24 +00:00
parent 7d1c763048
commit 77a8e1e577
7 changed files with 4 additions and 51 deletions

View File

@@ -352,7 +352,6 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
mAllowAuth(mItemType == typeContent),
mAllowKeywordFixup(false),
mDisableMetaRefreshWhenInactive(false),
mDeviceSizeIsPageSize(false),
mWindowDraggingAllowed(false),
mInFrameSwap(false),
mFiredUnloadEvent(false),
@@ -442,9 +441,6 @@ bool nsDocShell::Initialize() {
Preferences::GetBool("browser.meta_refresh_when_inactive.disabled",
mDisableMetaRefreshWhenInactive);
mDeviceSizeIsPageSize = Preferences::GetBool(
"docshell.device_size_is_page_size", mDeviceSizeIsPageSize);
if (nsCOMPtr<nsIObserverService> serv = services::GetObserverService()) {
const char* msg = mItemType == typeContent ? NS_WEBNAVIGATION_CREATE
: NS_CHROME_WEBNAVIGATION_CREATE;
@@ -3196,26 +3192,6 @@ nsDocShell::GetIsNavigating(bool* aOut) {
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::SetDeviceSizeIsPageSize(bool aValue) {
if (mDeviceSizeIsPageSize != aValue) {
mDeviceSizeIsPageSize = aValue;
RefPtr<nsPresContext> presContext = GetPresContext();
if (presContext) {
presContext->MediaFeatureValuesChanged(
{MediaFeatureChangeReason::DeviceSizeIsPageSizeChange},
MediaFeatureChangePropagation::JustThisDocument);
}
}
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::GetDeviceSizeIsPageSize(bool* aValue) {
*aValue = mDeviceSizeIsPageSize;
return NS_OK;
}
void nsDocShell::ClearFrameHistory(nsISHEntry* aEntry) {
MOZ_ASSERT(!mozilla::SessionHistoryInParent());
RefPtr<ChildSHistory> rootSH = GetRootSessionHistory();