@@ -178,7 +178,7 @@ index 040c7b124dec6bb254563bbe74fe50012cb077a3..b4e6b8132786af70e8ad0dce88b67c28
178
178
const transportProvider = {
179
179
setListener(upgradeListener) {
180
180
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
181
- index 665db419cb4909d34cdd3963d922aed12cf2c8ac..9323dade18a7780802275fa6fcebe336a1baf2e4 100644
181
+ index 665db419cb4909d34cdd3963d922aed12cf2c8ac..feadde48633ee78a5910c776d34d42864bf0e682 100644
182
182
--- a/docshell/base/nsDocShell.cpp
183
183
+++ b/docshell/base/nsDocShell.cpp
184
184
@@ -15,6 +15,12 @@
@@ -226,27 +226,28 @@ index 665db419cb4909d34cdd3963d922aed12cf2c8ac..9323dade18a7780802275fa6fcebe336
226
226
#include "nsNetCID.h"
227
227
#include "nsNetUtil.h"
228
228
#include "nsObjectLoadingContent.h"
229
- @@ -391,6 +401,11 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
229
+ @@ -391,6 +401,12 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
230
230
mAllowDNSPrefetch(true),
231
231
mAllowWindowControl(true),
232
232
mCSSErrorReportingEnabled(false),
233
233
+ mFileInputInterceptionEnabled(false),
234
234
+ mOverrideHasFocus(false),
235
235
+ mBypassCSPEnabled(false),
236
+ + mForceActiveState(false),
236
237
+ mOnlineOverride(nsIDocShell::ONLINE_OVERRIDE_NONE),
237
238
+ mColorSchemeOverride(COLOR_SCHEME_OVERRIDE_NONE),
238
239
mAllowAuth(mItemType == typeContent),
239
240
mAllowKeywordFixup(false),
240
241
mIsOffScreenBrowser(false),
241
- @@ -1418,6 +1433 ,7 @@ bool nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
242
+ @@ -1418,6 +1434 ,7 @@ bool nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
242
243
}
243
244
}
244
245
245
246
+ FireOnFrameLocationChange(this, aRequest, aURI, aLocationFlags);
246
247
if (!isSubFrame && !isRoot) {
247
248
/*
248
249
* We don't want to send OnLocationChange notifications when
249
- @@ -3214,6 +3230,189 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
250
+ @@ -3214,6 +3231,204 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
250
251
return NS_OK;
251
252
}
252
253
@@ -272,6 +273,21 @@ index 665db419cb4909d34cdd3963d922aed12cf2c8ac..9323dade18a7780802275fa6fcebe336
272
273
+ return NS_OK;
273
274
+ }
274
275
+
276
+ + NS_IMETHODIMP
277
+ + nsDocShell::GetForceActiveState(bool* aEnabled) {
278
+ + MOZ_ASSERT(aEnabled);
279
+ + *aEnabled = mForceActiveState;
280
+ + return NS_OK;
281
+ + }
282
+ +
283
+ + NS_IMETHODIMP
284
+ + nsDocShell::SetForceActiveState(bool aEnabled) {
285
+ + mForceActiveState = aEnabled;
286
+ + if (aEnabled)
287
+ + SetIsActive(true);
288
+ + return NS_OK;
289
+ + }
290
+ +
275
291
+ bool nsDocShell::IsBypassCSPEnabled() {
276
292
+ return GetRootDocShell()->mBypassCSPEnabled;
277
293
+ }
@@ -436,7 +452,17 @@ index 665db419cb4909d34cdd3963d922aed12cf2c8ac..9323dade18a7780802275fa6fcebe336
436
452
NS_IMETHODIMP
437
453
nsDocShell::GetIsNavigating(bool* aOut) {
438
454
*aOut = mIsNavigating;
439
- @@ -8526,6 +8725,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
455
+ @@ -4821,6 +5036,9 @@ nsDocShell::GetSuspendMediaWhenInactive(bool* aSuspendMediaWhenInactive) {
456
+
457
+ NS_IMETHODIMP
458
+ nsDocShell::SetIsActive(bool aIsActive) {
459
+ + if (mForceActiveState && !aIsActive)
460
+ + return NS_OK;
461
+ +
462
+ // Keep track ourselves.
463
+ // Changing the activeness on a discarded browsing context has no effect.
464
+ Unused << mBrowsingContext->SetIsActive(aIsActive);
465
+ @@ -8526,6 +8744,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
440
466
true, // aForceNoOpener
441
467
getter_AddRefs(newBC));
442
468
MOZ_ASSERT(!newBC);
@@ -449,7 +475,7 @@ index 665db419cb4909d34cdd3963d922aed12cf2c8ac..9323dade18a7780802275fa6fcebe336
449
475
return rv;
450
476
}
451
477
452
- @@ -12413,6 +12618 ,9 @@ class OnLinkClickEvent : public Runnable {
478
+ @@ -12413,6 +12637 ,9 @@ class OnLinkClickEvent : public Runnable {
453
479
mHandler->OnLinkClickSync(mContent, mLoadState, mNoOpenerImplied,
454
480
mTriggeringPrincipal);
455
481
}
@@ -459,7 +485,7 @@ index 665db419cb4909d34cdd3963d922aed12cf2c8ac..9323dade18a7780802275fa6fcebe336
459
485
return NS_OK;
460
486
}
461
487
462
- @@ -12498,6 +12706 ,8 @@ nsresult nsDocShell::OnLinkClick(
488
+ @@ -12498,6 +12725 ,8 @@ nsresult nsDocShell::OnLinkClick(
463
489
nsCOMPtr<nsIRunnable> ev =
464
490
new OnLinkClickEvent(this, aContent, loadState, noOpenerImplied,
465
491
aIsTrusted, aTriggeringPrincipal);
@@ -469,7 +495,7 @@ index 665db419cb4909d34cdd3963d922aed12cf2c8ac..9323dade18a7780802275fa6fcebe336
469
495
}
470
496
471
497
diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h
472
- index 0d3594f977ac28595f830cbc5e310a8af284d777..7e3222a0cafc3f38e335c9dc8654019a067a7a39 100644
498
+ index 0d3594f977ac28595f830cbc5e310a8af284d777..0149141757abef2787a09bba20d98714fd50d50d 100644
473
499
--- a/docshell/base/nsDocShell.h
474
500
+++ b/docshell/base/nsDocShell.h
475
501
@@ -13,6 +13,7 @@
@@ -513,13 +539,14 @@ index 0d3594f977ac28595f830cbc5e310a8af284d777..7e3222a0cafc3f38e335c9dc8654019a
513
539
// Handles retrieval of subframe session history for nsDocShell::LoadURI. If a
514
540
// load is requested in a subframe of the current DocShell, the subframe
515
541
// loadType may need to reflect the loadType of the parent document, or in
516
- @@ -1264,6 +1277,14 @@ class nsDocShell final : public nsDocLoader,
542
+ @@ -1264,6 +1277,15 @@ class nsDocShell final : public nsDocLoader,
517
543
bool mAllowDNSPrefetch : 1;
518
544
bool mAllowWindowControl : 1;
519
545
bool mCSSErrorReportingEnabled : 1;
520
546
+ bool mFileInputInterceptionEnabled: 1;
521
547
+ bool mOverrideHasFocus : 1;
522
548
+ bool mBypassCSPEnabled : 1;
549
+ + bool mForceActiveState : 1;
523
550
+ nsString mLanguageOverride;
524
551
+ RefPtr<nsGeolocationService> mGeolocationServiceOverride;
525
552
+ OnlineOverride mOnlineOverride;
@@ -529,7 +556,7 @@ index 0d3594f977ac28595f830cbc5e310a8af284d777..7e3222a0cafc3f38e335c9dc8654019a
529
556
bool mAllowKeywordFixup : 1;
530
557
bool mIsOffScreenBrowser : 1;
531
558
diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl
532
- index 605de327047b338a0abde638e3b3a9fc5a617815..773511a4ae35b14262afeb3d005b437d30d96c0a 100644
559
+ index 605de327047b338a0abde638e3b3a9fc5a617815..4e16debccf367a72c07660fb92015c5fb5de9b34 100644
533
560
--- a/docshell/base/nsIDocShell.idl
534
561
+++ b/docshell/base/nsIDocShell.idl
535
562
@@ -44,6 +44,7 @@ interface nsIURI;
@@ -540,7 +567,7 @@ index 605de327047b338a0abde638e3b3a9fc5a617815..773511a4ae35b14262afeb3d005b437d
540
567
interface nsIDocShellLoadInfo;
541
568
interface nsIEditor;
542
569
interface nsIEditingSession;
543
- @@ -923,6 +924,33 @@ interface nsIDocShell : nsIDocShellTreeItem
570
+ @@ -923,6 +924,35 @@ interface nsIDocShell : nsIDocShellTreeItem
544
571
*/
545
572
void synchronizeLayoutHistoryState();
546
573
@@ -550,6 +577,8 @@ index 605de327047b338a0abde638e3b3a9fc5a617815..773511a4ae35b14262afeb3d005b437d
550
577
+
551
578
+ attribute boolean bypassCSPEnabled;
552
579
+
580
+ + attribute boolean forceActiveState;
581
+ +
553
582
+ attribute AString languageOverride;
554
583
+
555
584
+ boolean overrideTimezone(in AString timezoneId);
0 commit comments