mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 19:55:39 +00:00
Bug 1446568: Move UseCounter stuff and IsSynthesized to nsIDocument. r=smaug
MozReview-Commit-ID: IeKzmi31e8d
This commit is contained in:
parent
3e33f2a705
commit
55a1729e6a
@ -2687,7 +2687,7 @@ WarnIfSandboxIneffective(nsIDocShell* aDocShell,
|
||||
}
|
||||
|
||||
bool
|
||||
nsDocument::IsSynthesized() {
|
||||
nsIDocument::IsSynthesized() {
|
||||
nsCOMPtr<nsIHttpChannelInternal> internalChan = do_QueryInterface(mChannel);
|
||||
bool synthesized = false;
|
||||
if (internalChan) {
|
||||
@ -12250,7 +12250,7 @@ ReportExternalResourceUseCounters(nsIDocument* aDocument, void* aData)
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::ReportUseCounters(UseCounterReportKind aKind)
|
||||
nsIDocument::ReportUseCounters(UseCounterReportKind aKind)
|
||||
{
|
||||
static const bool sDebugUseCounters = false;
|
||||
if (mReportedUseCounters) {
|
||||
|
@ -206,22 +206,6 @@ public:
|
||||
nsRadioGroupStruct* GetRadioGroup(const nsAString& aName) const;
|
||||
nsRadioGroupStruct* GetOrCreateRadioGroup(const nsAString& aName);
|
||||
|
||||
enum class UseCounterReportKind {
|
||||
// Flush the document's use counters only; the use counters for any
|
||||
// external resource documents will be flushed when the external
|
||||
// resource documents themselves are destroyed.
|
||||
eDefault,
|
||||
|
||||
// Flush use counters for the document and for its external resource
|
||||
// documents. (Should only be necessary for tests, where we need
|
||||
// flushing to happen synchronously and deterministically.)
|
||||
eIncludeExternalResources,
|
||||
};
|
||||
|
||||
void ReportUseCounters(UseCounterReportKind aKind = UseCounterReportKind::eDefault);
|
||||
|
||||
bool IsSynthesized();
|
||||
|
||||
// Check whether shadow DOM is enabled for the global of aObject.
|
||||
static bool IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject);
|
||||
// Check whether shadow DOM is enabled for the document this node belongs to.
|
||||
|
@ -3488,6 +3488,22 @@ public:
|
||||
|
||||
bool DidFireDOMContentLoaded() const { return mDidFireDOMContentLoaded; }
|
||||
|
||||
bool IsSynthesized();
|
||||
|
||||
enum class UseCounterReportKind {
|
||||
// Flush the document's use counters only; the use counters for any
|
||||
// external resource documents will be flushed when the external
|
||||
// resource documents themselves are destroyed.
|
||||
eDefault,
|
||||
|
||||
// Flush use counters for the document and for its external resource
|
||||
// documents. (Should only be necessary for tests, where we need
|
||||
// flushing to happen synchronously and deterministically.)
|
||||
eIncludeExternalResources,
|
||||
};
|
||||
|
||||
void ReportUseCounters(UseCounterReportKind aKind = UseCounterReportKind::eDefault);
|
||||
|
||||
void SetDocumentUseCounter(mozilla::UseCounter aUseCounter)
|
||||
{
|
||||
if (!mUseCounters[aUseCounter]) {
|
||||
|
Loading…
Reference in New Issue
Block a user