summaryrefslogtreecommitdiff
path: root/dom/base/nsDocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsDocument.cpp')
-rw-r--r--dom/base/nsDocument.cpp77
1 files changed, 0 insertions, 77 deletions
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp
index c00a41addf..95827151db 100644
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -9713,19 +9713,6 @@ static const char* kDocumentWarnings[] = {
};
#undef DOCUMENT_WARNING
-static UseCounter
-OperationToUseCounter(nsIDocument::DeprecatedOperations aOperation)
-{
- switch(aOperation) {
-#define DEPRECATED_OPERATION(_op) \
- case nsIDocument::e##_op: return eUseCounter_##_op;
-#include "nsDeprecatedOperationList.h"
-#undef DEPRECATED_OPERATION
- default:
- MOZ_CRASH();
- }
-}
-
bool
nsIDocument::HasWarnedAbout(DeprecatedOperations aOperation) const
{
@@ -9741,7 +9728,6 @@ nsIDocument::WarnOnceAbout(DeprecatedOperations aOperation,
return;
}
mDeprecationWarnedAbout[aOperation] = true;
- const_cast<nsIDocument*>(this)->SetDocumentAndPageUseCounter(OperationToUseCounter(aOperation));
uint32_t flags = asError ? nsIScriptError::errorFlag
: nsIScriptError::warningFlag;
nsContentUtils::ReportToConsole(flags,
@@ -11992,69 +11978,6 @@ nsIDocument::GetTopLevelContentDocument()
return parent;
}
-void
-nsIDocument::PropagateUseCounters(nsIDocument* aParentDocument)
-{
- MOZ_ASSERT(this != aParentDocument);
-
- // What really matters here is that our use counters get propagated as
- // high up in the content document hierarchy as possible. So,
- // starting with aParentDocument, we need to find the toplevel content
- // document, and propagate our use counters into its
- // mChildDocumentUseCounters.
- nsIDocument* contentParent = aParentDocument->GetTopLevelContentDocument();
-
- if (!contentParent) {
- return;
- }
-
- contentParent->mChildDocumentUseCounters |= mUseCounters;
- contentParent->mChildDocumentUseCounters |= mChildDocumentUseCounters;
-}
-
-void
-nsIDocument::SetPageUseCounter(UseCounter aUseCounter)
-{
- // We want to set the use counter on the "page" that owns us; the definition
- // of "page" depends on what kind of document we are. See the comments below
- // for details. In any event, checking all the conditions below is
- // reasonably expensive, so we cache whether we've notified our owning page.
- if (mNotifiedPageForUseCounter[aUseCounter]) {
- return;
- }
- mNotifiedPageForUseCounter[aUseCounter] = true;
-
- if (mDisplayDocument) {
- // If we are a resource document, we won't have a docshell and so we won't
- // record any page use counters on this document. Instead, we should
- // forward it up to the document that loaded us.
- MOZ_ASSERT(!mDocumentContainer);
- mDisplayDocument->SetChildDocumentUseCounter(aUseCounter);
- return;
- }
-
- if (IsBeingUsedAsImage()) {
- // If this is an SVG image document, we also won't have a docshell.
- MOZ_ASSERT(!mDocumentContainer);
- return;
- }
-
- // We only care about use counters in content. If we're already a toplevel
- // content document, then we should have already set the use counter on
- // ourselves, and we are done.
- nsIDocument* contentParent = GetTopLevelContentDocument();
- if (!contentParent) {
- return;
- }
-
- if (this == contentParent) {
- MOZ_ASSERT(GetUseCounter(aUseCounter));
- return;
- }
-
- contentParent->SetChildDocumentUseCounter(aUseCounter);
-}
-
bool
nsIDocument::HasScriptsBlockedBySandbox()
{