Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Unified Diff: third_party/WebKit/Source/core/html/ImageDocument.cpp

Issue 1866343002: Measure usage of image/media/plugin/text documents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/ImageDocument.cpp
diff --git a/third_party/WebKit/Source/core/html/ImageDocument.cpp b/third_party/WebKit/Source/core/html/ImageDocument.cpp
index 0de08f1ced5b41b7d40d39d7857734ecbb456a4b..37b578bb13bb98e7122e65274a05ecb322e053d0 100644
--- a/third_party/WebKit/Source/core/html/ImageDocument.cpp
+++ b/third_party/WebKit/Source/core/html/ImageDocument.cpp
@@ -104,7 +104,6 @@ private:
ImageDocumentParser(ImageDocument* document)
: RawDataDocumentParser(document)
{
- UseCounter::count(document, UseCounter::ImageDocument);
}
void appendBytes(const char*, size_t) override;
@@ -194,6 +193,9 @@ ImageDocument::ImageDocument(const DocumentInit& initializer)
{
setCompatibilityMode(QuirksMode);
lockCompatibilityMode();
+ UseCounter::count(*this, UseCounter::ImageDocument);
+ if (ownerElement())
+ UseCounter::count(*this, UseCounter::ImageDocumentInFrame);
}
DocumentParser* ImageDocument::createParser()
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLViewSourceDocument.cpp ('k') | third_party/WebKit/Source/core/html/MediaDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698