Backed out changeset d801dfa24d7d (bug 1517136) for build bustages at /security/manager/ssl/nsSecureBrowserUIImpl.cpp on a CLOSED TREE
This commit is contained in:
@@ -1378,6 +1378,59 @@ nsDocShell::GetHasMixedDisplayContentBlocked(
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetHasTrackingContentBlocked(bool* aHasTrackingContentBlocked) {
|
||||
RefPtr<Document> doc(GetDocument());
|
||||
*aHasTrackingContentBlocked = doc && doc->GetHasTrackingContentBlocked();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetHasTrackingContentLoaded(bool* aHasTrackingContentLoaded) {
|
||||
RefPtr<Document> doc(GetDocument());
|
||||
*aHasTrackingContentLoaded = doc && doc->GetHasTrackingContentLoaded();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetHasCookiesBlockedByPermission(
|
||||
bool* aHasCookiesBlockedByPermission) {
|
||||
RefPtr<Document> doc(GetDocument());
|
||||
*aHasCookiesBlockedByPermission =
|
||||
doc && doc->GetHasCookiesBlockedByPermission();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetHasCookiesBlockedDueToTrackers(
|
||||
bool* aHasCookiesBlockedDueToTrackers) {
|
||||
RefPtr<Document> doc(GetDocument());
|
||||
*aHasCookiesBlockedDueToTrackers = doc && doc->GetHasTrackingCookiesBlocked();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetHasAllCookiesBeenBlocked(bool* aHasAllCookiesBeenBlocked) {
|
||||
RefPtr<Document> doc(GetDocument());
|
||||
*aHasAllCookiesBeenBlocked = doc && doc->GetHasAllCookiesBlocked();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetHasForeignCookiesBeenBlocked(
|
||||
bool* aHasForeignCookiesBeenBlocked) {
|
||||
RefPtr<Document> doc(GetDocument());
|
||||
*aHasForeignCookiesBeenBlocked = doc && doc->GetHasForeignCookiesBlocked();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetHasCookiesLoaded(bool* aHasCookiesLoaded) {
|
||||
RefPtr<Document> doc(GetDocument());
|
||||
*aHasCookiesLoaded = doc && doc->GetHasCookiesLoaded();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetAllowPlugins(bool* aAllowPlugins) {
|
||||
NS_ENSURE_ARG_POINTER(aAllowPlugins);
|
||||
|
||||
@@ -499,6 +499,49 @@ interface nsIDocShell : nsIDocShellTreeItem
|
||||
*/
|
||||
[infallible] readonly attribute boolean hasMixedDisplayContentBlocked;
|
||||
|
||||
/**
|
||||
* This attribute determines whether a document has Tracking Content
|
||||
* that has been blocked from loading.
|
||||
*/
|
||||
[infallible] readonly attribute boolean hasTrackingContentBlocked;
|
||||
|
||||
/**
|
||||
* This attribute determines whether Tracking Content is loaded on the
|
||||
* document. When it is true, tracking content was not blocked and has
|
||||
* loaded (or is about to load) on the page.
|
||||
*/
|
||||
[infallible] readonly attribute boolean hasTrackingContentLoaded;
|
||||
|
||||
/**
|
||||
* This attribute determines whether a document seen cookies or storage
|
||||
* blocked due to a site permission being denied.
|
||||
*/
|
||||
[infallible] readonly attribute boolean hasCookiesBlockedByPermission;
|
||||
|
||||
/**
|
||||
* This attribute determines whether a document seen cookies or storage
|
||||
* blocked due to a the request being made by a tracker.
|
||||
*/
|
||||
[infallible] readonly attribute boolean hasCookiesBlockedDueToTrackers;
|
||||
|
||||
/**
|
||||
* This attribute determines whether a document seen cookies or storage
|
||||
* blocked due to cookie behavior settings blocking all cookies.
|
||||
*/
|
||||
[infallible] readonly attribute boolean hasAllCookiesBeenBlocked;
|
||||
|
||||
/**
|
||||
* This attribute determines whether a document seen cookies or storage
|
||||
* blocked due to cookie behavior settings blocking all third-party cookies.
|
||||
*/
|
||||
[infallible] readonly attribute boolean hasForeignCookiesBeenBlocked;
|
||||
|
||||
/**
|
||||
* This attribute determines whether a document seen cookies or storage
|
||||
* attempts ever whether they've been allowed or blocked.
|
||||
*/
|
||||
[infallible] readonly attribute boolean hasCookiesLoaded;
|
||||
|
||||
/**
|
||||
* Disconnects this docshell's editor from its window, and stores the
|
||||
* editor data in the open document's session history entry. This
|
||||
|
||||
@@ -107,62 +107,56 @@ void nsSecureBrowserUIImpl::CheckForBlockedContent() {
|
||||
}
|
||||
}
|
||||
|
||||
RefPtr<Document> doc = docShell->GetDocument();
|
||||
if (!doc) {
|
||||
// If the docshell has no document, then there is no need to update mState.
|
||||
return;
|
||||
}
|
||||
|
||||
// Has mixed content been loaded or blocked in nsMixedContentBlocker?
|
||||
// This only applies to secure documents even if they're affected by mixed
|
||||
// content blocking in which case the STATE_IS_BROKEN bit would be set rather
|
||||
// than STATE_IS_SECURE.
|
||||
if (((mState & STATE_IS_SECURE) != 0) || ((mState & STATE_IS_BROKEN) != 0)) {
|
||||
if (doc->GetHasMixedActiveContentLoaded()) {
|
||||
if (docShell->GetHasMixedActiveContentLoaded()) {
|
||||
mState |= STATE_IS_BROKEN | STATE_LOADED_MIXED_ACTIVE_CONTENT;
|
||||
mState &= ~STATE_IS_SECURE;
|
||||
}
|
||||
|
||||
if (doc->GetHasMixedDisplayContentLoaded()) {
|
||||
if (docShell->GetHasMixedDisplayContentLoaded()) {
|
||||
mState |= STATE_IS_BROKEN | STATE_LOADED_MIXED_DISPLAY_CONTENT;
|
||||
mState &= ~STATE_IS_SECURE;
|
||||
}
|
||||
|
||||
if (doc->GetHasMixedActiveContentBlocked()) {
|
||||
if (docShell->GetHasMixedActiveContentBlocked()) {
|
||||
mState |= STATE_BLOCKED_MIXED_ACTIVE_CONTENT;
|
||||
}
|
||||
|
||||
if (doc->GetHasMixedDisplayContentBlocked()) {
|
||||
if (docShell->GetHasMixedDisplayContentBlocked()) {
|
||||
mState |= STATE_BLOCKED_MIXED_DISPLAY_CONTENT;
|
||||
}
|
||||
}
|
||||
|
||||
// Has tracking content been blocked or loaded?
|
||||
if (doc->GetHasTrackingContentBlocked()) {
|
||||
if (docShell->GetHasTrackingContentBlocked()) {
|
||||
mState |= STATE_BLOCKED_TRACKING_CONTENT;
|
||||
}
|
||||
|
||||
if (doc->GetHasTrackingContentLoaded()) {
|
||||
if (docShell->GetHasTrackingContentLoaded()) {
|
||||
mState |= STATE_LOADED_TRACKING_CONTENT;
|
||||
}
|
||||
|
||||
if (doc->GetHasCookiesBlockedByPermission()) {
|
||||
if (docShell->GetHasCookiesBlockedByPermission()) {
|
||||
mState |= STATE_COOKIES_BLOCKED_BY_PERMISSION;
|
||||
}
|
||||
|
||||
if (doc->GetHasTrackingCookiesBlocked()) {
|
||||
if (docShell->GetHasCookiesBlockedDueToTrackers()) {
|
||||
mState |= STATE_COOKIES_BLOCKED_TRACKER;
|
||||
}
|
||||
|
||||
if (doc->GetHasForeignCookiesBlocked()) {
|
||||
if (docShell->GetHasForeignCookiesBeenBlocked()) {
|
||||
mState |= STATE_COOKIES_BLOCKED_FOREIGN;
|
||||
}
|
||||
|
||||
if (doc->GetHasAllCookiesBlocked()) {
|
||||
if (docShell->GetHasAllCookiesBeenBlocked()) {
|
||||
mState |= STATE_COOKIES_BLOCKED_ALL;
|
||||
}
|
||||
|
||||
if (doc->GetHasCookiesLoaded()) {
|
||||
if (docShell->GetHasCookiesLoaded()) {
|
||||
mState |= STATE_COOKIES_LOADED;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user