Bug 1708150 - Add user activation flag to reload, goBack and goForward r=ckerschb,Gijs,smaug

Differential Revision: https://phabricator.services.mozilla.com/D110245
This commit is contained in:
Niklas Goegge
2021-04-28 11:26:49 +00:00
parent 6ae90f8e03
commit 25f6c5a920
25 changed files with 207 additions and 120 deletions

View File

@@ -3372,16 +3372,17 @@ void BrowsingContext::RemoveFromSessionHistory(const nsID& aChangeID) {
void BrowsingContext::HistoryGo(int32_t aOffset, uint64_t aHistoryEpoch,
bool aRequireUserInteraction,
bool aUserActivation,
std::function<void(int32_t&&)>&& aResolver) {
if (XRE_IsContentProcess()) {
ContentChild::GetSingleton()->SendHistoryGo(
this, aOffset, aHistoryEpoch, aRequireUserInteraction,
this, aOffset, aHistoryEpoch, aRequireUserInteraction, aUserActivation,
std::move(aResolver),
[](mozilla::ipc::
ResponseRejectReason) { /* FIXME Is ignoring this fine? */ });
} else {
Canonical()->HistoryGo(
aOffset, aHistoryEpoch, aRequireUserInteraction,
aOffset, aHistoryEpoch, aRequireUserInteraction, aUserActivation,
Canonical()->GetContentParent()
? Some(Canonical()->GetContentParent()->ChildID())
: Nothing(),