@@ -139,7 +139,7 @@ index 040c7b124dec6bb254563bbe74fe50012cb077a3..b4e6b8132786af70e8ad0dce88b67c28
139
139
const transportProvider = {
140
140
setListener(upgradeListener) {
141
141
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
142
- index 2424029f2783fe2af012f033c75c497b3c493bd6..56b0aa8f51798666f80cdfce5ace18260185c6ee 100644
142
+ index 2424029f2783fe2af012f033c75c497b3c493bd6..3960ade9382cf43fe542ed52668f70ffcf3ba974 100644
143
143
--- a/docshell/base/nsDocShell.cpp
144
144
+++ b/docshell/base/nsDocShell.cpp
145
145
@@ -15,6 +15,12 @@
@@ -187,27 +187,26 @@ index 2424029f2783fe2af012f033c75c497b3c493bd6..56b0aa8f51798666f80cdfce5ace1826
187
187
#include "nsNetCID.h"
188
188
#include "nsNetUtil.h"
189
189
#include "nsObjectLoadingContent.h"
190
- @@ -379,6 +389,11 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
190
+ @@ -379,6 +389,10 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
191
191
mAllowWindowControl(true),
192
192
mUseErrorPages(true),
193
193
mCSSErrorReportingEnabled(false),
194
194
+ mFileInputInterceptionEnabled(false),
195
195
+ mOverrideHasFocus(false),
196
196
+ mBypassCSPEnabled(false),
197
197
+ mOnlineOverride(nsIDocShell::ONLINE_OVERRIDE_NONE),
198
- + mColorSchemeOverride(COLOR_SCHEME_OVERRIDE_NONE),
199
198
mAllowAuth(mItemType == typeContent),
200
199
mAllowKeywordFixup(false),
201
200
mIsOffScreenBrowser(false),
202
- @@ -1249,6 +1264 ,7 @@ bool nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
201
+ @@ -1249,6 +1263 ,7 @@ bool nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
203
202
isSubFrame = mLSHE->GetIsSubFrame();
204
203
}
205
204
206
205
+ FireOnFrameLocationChange(this, aRequest, aURI, aLocationFlags);
207
206
if (!isSubFrame && !isRoot) {
208
207
/*
209
208
* We don't want to send OnLocationChange notifications when
210
- @@ -3079,6 +3095,184 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
209
+ @@ -3079,6 +3094,172 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
211
210
return NS_OK;
212
211
}
213
212
@@ -375,24 +374,12 @@ index 2424029f2783fe2af012f033c75c497b3c493bd6..56b0aa8f51798666f80cdfce5ace1826
375
374
+ return NS_OK;
376
375
+ }
377
376
+
378
- + NS_IMETHODIMP
379
- + nsDocShell::GetColorSchemeOverride(ColorSchemeOverride* aColorSchemeOverride) {
380
- + *aColorSchemeOverride = GetRootDocShell()->mColorSchemeOverride;
381
- + return NS_OK;
382
- + }
383
- +
384
- + NS_IMETHODIMP
385
- + nsDocShell::SetColorSchemeOverride(ColorSchemeOverride aColorSchemeOverride) {
386
- + mColorSchemeOverride = aColorSchemeOverride;
387
- + return NS_OK;
388
- + }
389
- +
390
377
+ // =============== Juggler End =======================
391
378
+
392
379
NS_IMETHODIMP
393
380
nsDocShell::GetIsNavigating(bool* aOut) {
394
381
*aOut = mIsNavigating;
395
- @@ -8195,6 +8389 ,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState,
382
+ @@ -8195,6 +8376 ,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState,
396
383
true, // aForceNoOpener
397
384
getter_AddRefs(newBC));
398
385
MOZ_ASSERT(!newBC);
@@ -405,7 +392,7 @@ index 2424029f2783fe2af012f033c75c497b3c493bd6..56b0aa8f51798666f80cdfce5ace1826
405
392
return rv;
406
393
}
407
394
408
- @@ -11698,6 +11898 ,9 @@ class OnLinkClickEvent : public Runnable {
395
+ @@ -11698,6 +11885 ,9 @@ class OnLinkClickEvent : public Runnable {
409
396
mNoOpenerImplied, nullptr, nullptr,
410
397
mIsUserTriggered, mTriggeringPrincipal, mCsp);
411
398
}
@@ -415,7 +402,7 @@ index 2424029f2783fe2af012f033c75c497b3c493bd6..56b0aa8f51798666f80cdfce5ace1826
415
402
return NS_OK;
416
403
}
417
404
418
- @@ -11787,6 +11990 ,8 @@ nsresult nsDocShell::OnLinkClick(
405
+ @@ -11787,6 +11977 ,8 @@ nsresult nsDocShell::OnLinkClick(
419
406
this, aContent, aURI, target, aFileName, aPostDataStream,
420
407
aHeadersDataStream, noOpenerImplied, aIsUserTriggered, aIsTrusted,
421
408
aTriggeringPrincipal, aCsp);
@@ -425,7 +412,7 @@ index 2424029f2783fe2af012f033c75c497b3c493bd6..56b0aa8f51798666f80cdfce5ace1826
425
412
}
426
413
427
414
diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h
428
- index dcffed8e55371a4f0aeae408de3a94e4e3a9ab95..5f6b2243ac054f414573736fc23b75509b2a8f5b 100644
415
+ index dcffed8e55371a4f0aeae408de3a94e4e3a9ab95..d680dc0c0bd7ccc20ab37760e9b5e5d8450498a1 100644
429
416
--- a/docshell/base/nsDocShell.h
430
417
+++ b/docshell/base/nsDocShell.h
431
418
@@ -13,6 +13,7 @@
@@ -469,7 +456,7 @@ index dcffed8e55371a4f0aeae408de3a94e4e3a9ab95..5f6b2243ac054f414573736fc23b7550
469
456
// Handles retrieval of subframe session history for nsDocShell::LoadURI. If a
470
457
// load is requested in a subframe of the current DocShell, the subframe
471
458
// loadType may need to reflect the loadType of the parent document, or in
472
- @@ -1262,6 +1275,14 @@ class nsDocShell final : public nsDocLoader,
459
+ @@ -1262,6 +1275,13 @@ class nsDocShell final : public nsDocLoader,
473
460
bool mAllowWindowControl : 1;
474
461
bool mUseErrorPages : 1;
475
462
bool mCSSErrorReportingEnabled : 1;
@@ -479,13 +466,12 @@ index dcffed8e55371a4f0aeae408de3a94e4e3a9ab95..5f6b2243ac054f414573736fc23b7550
479
466
+ nsString mLanguageOverride;
480
467
+ RefPtr<nsGeolocationService> mGeolocationServiceOverride;
481
468
+ OnlineOverride mOnlineOverride;
482
- + ColorSchemeOverride mColorSchemeOverride;
483
469
+
484
470
bool mAllowAuth : 1;
485
471
bool mAllowKeywordFixup : 1;
486
472
bool mIsOffScreenBrowser : 1;
487
473
diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl
488
- index 01dc4734eb191adf6572b9b628b4682eda017e19..0929fa0c324d5bc6e09a9d71ac4d8f4fbacca946 100644
474
+ index 01dc4734eb191adf6572b9b628b4682eda017e19..85e83db8cb45356b86e83f0edf9ff680cb9abc4e 100644
489
475
--- a/docshell/base/nsIDocShell.idl
490
476
+++ b/docshell/base/nsIDocShell.idl
491
477
@@ -44,6 +44,7 @@ interface nsIURI;
@@ -496,7 +482,7 @@ index 01dc4734eb191adf6572b9b628b4682eda017e19..0929fa0c324d5bc6e09a9d71ac4d8f4f
496
482
interface nsIDocShellLoadInfo;
497
483
interface nsIEditor;
498
484
interface nsIEditingSession;
499
- @@ -1010,6 +1011,33 @@ interface nsIDocShell : nsIDocShellTreeItem
485
+ @@ -1010,6 +1011,25 @@ interface nsIDocShell : nsIDocShellTreeItem
500
486
*/
501
487
void synchronizeLayoutHistoryState();
502
488
@@ -517,21 +503,13 @@ index 01dc4734eb191adf6572b9b628b4682eda017e19..0929fa0c324d5bc6e09a9d71ac4d8f4f
517
503
+ };
518
504
+ [infallible] attribute nsIDocShell_OnlineOverride onlineOverride;
519
505
+
520
- + cenum ColorSchemeOverride : 8 {
521
- + COLOR_SCHEME_OVERRIDE_LIGHT,
522
- + COLOR_SCHEME_OVERRIDE_DARK,
523
- + COLOR_SCHEME_OVERRIDE_NO_PREFERENCE,
524
- + COLOR_SCHEME_OVERRIDE_NONE, /* This clears the override. */
525
- + };
526
- + [infallible] attribute nsIDocShell_ColorSchemeOverride colorSchemeOverride;
527
- +
528
506
+ void setGeolocationOverride(in nsIDOMGeoPosition position);
529
507
+
530
508
/**
531
509
* This attempts to save any applicable layout history state (like
532
510
* scroll position) in the nsISHEntry. This is normally done
533
511
diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp
534
- index 3ea8d9829cbfb59e7095a21ff53993cb7716e9f2..b882a58f17a701cbced7b38f959a40e9e964b96a 100644
512
+ index 3ea8d9829cbfb59e7095a21ff53993cb7716e9f2..61e83179c27c715a1dcf9d70a76f1710fd884a00 100644
535
513
--- a/dom/base/Document.cpp
536
514
+++ b/dom/base/Document.cpp
537
515
@@ -3216,6 +3216,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
@@ -567,26 +545,6 @@ index 3ea8d9829cbfb59e7095a21ff53993cb7716e9f2..b882a58f17a701cbced7b38f959a40e9
567
545
// Is there a focused DOMWindow?
568
546
nsCOMPtr<mozIDOMWindowProxy> focusedWindow;
569
547
fm->GetFocusedWindow(getter_AddRefs(focusedWindow));
570
- @@ -16322,6 +16334,19 @@ void Document::RemoveToplevelLoadingDocument(Document* aDoc) {
571
-
572
- StylePrefersColorScheme Document::PrefersColorScheme(
573
- IgnoreRFP aIgnoreRFP) const {
574
- + auto* docShell = static_cast<nsDocShell*>(GetDocShell());
575
- + nsIDocShell::ColorSchemeOverride colorScheme;
576
- + if (docShell->GetColorSchemeOverride(&colorScheme) == NS_OK &&
577
- + colorScheme != nsIDocShell::COLOR_SCHEME_OVERRIDE_NONE) {
578
- + switch (colorScheme) {
579
- + case nsIDocShell::COLOR_SCHEME_OVERRIDE_LIGHT:
580
- + return StylePrefersColorScheme::Light;
581
- + case nsIDocShell::COLOR_SCHEME_OVERRIDE_DARK:
582
- + return StylePrefersColorScheme::Dark;
583
- + case nsIDocShell::COLOR_SCHEME_OVERRIDE_NO_PREFERENCE:
584
- + return StylePrefersColorScheme::NoPreference;
585
- + };
586
- + }
587
- if (aIgnoreRFP == IgnoreRFP::No &&
588
- nsContentUtils::ShouldResistFingerprinting(this)) {
589
- return StylePrefersColorScheme::Light;
590
548
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
591
549
index aa3fa6719f05a1aeb45f03f85a7e169d42f96bb8..4f3131229fe053a2b125327839fc64178fc15b62 100644
592
550
--- a/dom/base/Navigator.cpp
0 commit comments