зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1561645 - report only http/https schemes; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D36049 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
62645647cf
Коммит
6e38d3f928
|
@ -10474,6 +10474,13 @@ bool Document::CanSavePresentation(nsIRequest* aNewRequest,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool HasHttpScheme(nsIURI* aURI) {
|
||||||
|
bool isHttpish = false;
|
||||||
|
return aURI &&
|
||||||
|
((NS_SUCCEEDED(aURI->SchemeIs("http", &isHttpish)) && isHttpish) ||
|
||||||
|
(NS_SUCCEEDED(aURI->SchemeIs("https", &isHttpish)) && isHttpish));
|
||||||
|
}
|
||||||
|
|
||||||
void Document::Destroy() {
|
void Document::Destroy() {
|
||||||
// The ContentViewer wants to release the document now. So, tell our content
|
// The ContentViewer wants to release the document now. So, tell our content
|
||||||
// to drop any references to the document so that it can be destroyed.
|
// to drop any references to the document so that it can be destroyed.
|
||||||
|
@ -10483,7 +10490,10 @@ void Document::Destroy() {
|
||||||
if (!nsContentUtils::IsInPrivateBrowsing(this) &&
|
if (!nsContentUtils::IsInPrivateBrowsing(this) &&
|
||||||
IsTopLevelContentDocument()) {
|
IsTopLevelContentDocument()) {
|
||||||
mContentBlockingLog.ReportLog(NodePrincipal());
|
mContentBlockingLog.ReportLog(NodePrincipal());
|
||||||
mContentBlockingLog.ReportOrigins();
|
|
||||||
|
if (HasHttpScheme(GetDocumentURI())) {
|
||||||
|
mContentBlockingLog.ReportOrigins();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mIsGoingAway = true;
|
mIsGoingAway = true;
|
||||||
|
@ -10829,13 +10839,6 @@ static void DispatchFullscreenChange(Document* aDocument, nsINode* aTarget) {
|
||||||
|
|
||||||
static void ClearPendingFullscreenRequests(Document* aDoc);
|
static void ClearPendingFullscreenRequests(Document* aDoc);
|
||||||
|
|
||||||
static bool HasHttpScheme(nsIURI* aURI) {
|
|
||||||
bool isHttpish = false;
|
|
||||||
return aURI &&
|
|
||||||
((NS_SUCCEEDED(aURI->SchemeIs("http", &isHttpish)) && isHttpish) ||
|
|
||||||
(NS_SUCCEEDED(aURI->SchemeIs("https", &isHttpish)) && isHttpish));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Document::OnPageHide(bool aPersisted, EventTarget* aDispatchStartTarget,
|
void Document::OnPageHide(bool aPersisted, EventTarget* aDispatchStartTarget,
|
||||||
bool aOnlySystemGroup) {
|
bool aOnlySystemGroup) {
|
||||||
if (IsTopLevelContentDocument() && GetDocGroup() &&
|
if (IsTopLevelContentDocument() && GetDocGroup() &&
|
||||||
|
|
Загрузка…
Ссылка в новой задаче