Bug 1730503 - Make RDM force Android-style scrollbars better. r=mstange,devtools-backward-compat-reviewers,nchevobbe

There are a few bits that still don't work with this patch but will with the
following patches.

Differential Revision: https://phabricator.services.mozilla.com/D128083
This commit is contained in:
Emilio Cobos Álvarez
2021-10-12 09:21:17 +00:00
parent b4213316e5
commit e1e3914e8d
28 changed files with 83 additions and 173 deletions

View File

@@ -2662,6 +2662,22 @@ void BrowsingContext::DidSet(FieldIndex<IDX_ExplicitActive>,
});
}
void BrowsingContext::DidSet(FieldIndex<IDX_InRDMPane>, bool aOldValue) {
MOZ_ASSERT(IsTop(),
"Should only set InRDMPane in the top-level browsing context");
if (GetInRDMPane() == aOldValue) {
return;
}
PreOrderWalk([&](BrowsingContext* aContext) {
if (nsIDocShell* shell = aContext->GetDocShell()) {
if (nsPresContext* pc = shell->GetPresContext()) {
pc->RecomputeTheme();
}
}
});
}
bool BrowsingContext::CanSet(FieldIndex<IDX_PageAwakeRequestCount>,
uint32_t aNewValue, ContentParent* aSource) {
return IsTop() && XRE_IsParentProcess() && !aSource;