mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Revert "Issue #21 - Remove use counters telemetry"
This reverts commit 8ca9db6b65.
This commit is contained in:
parent
bebaa470c6
commit
92a1cc3139
45 changed files with 1128 additions and 36 deletions
|
|
@ -104,6 +104,9 @@
|
|||
#include "nsContentPermissionHelper.h"
|
||||
#include "nsCSSPseudoElements.h" // for CSSPseudoElementType
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsDocument.h"
|
||||
#include "HTMLImageElement.h"
|
||||
#include "mozilla/css/ImageLoader.h"
|
||||
#include "mozilla/layers/APZCTreeManager.h" // for layers::ZoomToRectBehavior
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
|
|
@ -4022,6 +4025,27 @@ nsDOMWindowUtils::LeaveChaosMode()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::ForceUseCounterFlush(nsIDOMNode *aNode)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aNode);
|
||||
|
||||
if (nsCOMPtr<nsIDocument> doc = do_QueryInterface(aNode)) {
|
||||
mozilla::css::ImageLoader* loader = doc->StyleImageLoader();
|
||||
loader->FlushUseCounters();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (nsCOMPtr<nsIContent> content = do_QueryInterface(aNode)) {
|
||||
if (HTMLImageElement* img = HTMLImageElement::FromContent(content)) {
|
||||
img->FlushUseCounters();
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::HasRuleProcessorUsedByMultipleStyleSets(uint32_t aSheetType,
|
||||
bool* aRetVal)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue