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

Unified Diff: Source/core/css/StyleSheetList.cpp

Issue 1072403008: Add UseCounters for CSS-related *List interfaces with item() methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « Source/core/css/MediaList.idl ('k') | Source/core/css/StyleSheetList.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StyleSheetList.cpp
diff --git a/Source/core/css/StyleSheetList.cpp b/Source/core/css/StyleSheetList.cpp
index d6c754964d0e4fdc75208e64177a00eb532c3085..dbb27accb6fffc4a6bcf3fe8ef733d377961ecbb 100644
--- a/Source/core/css/StyleSheetList.cpp
+++ b/Source/core/css/StyleSheetList.cpp
@@ -24,6 +24,7 @@
#include "core/HTMLNames.h"
#include "core/dom/Document.h"
#include "core/dom/StyleEngine.h"
+#include "core/frame/UseCounter.h"
#include "core/html/HTMLStyleElement.h"
#include "wtf/text/WTFString.h"
@@ -85,6 +86,8 @@ HTMLStyleElement* StyleSheetList::getNamedItem(const AtomicString& name) const
CSSStyleSheet* StyleSheetList::anonymousNamedGetter(const AtomicString& name)
{
+ if (document())
+ UseCounter::count(*document(), UseCounter::StyleSheetListAnonymousNamedGetter);
HTMLStyleElement* item = getNamedItem(name);
if (!item)
return 0;
« no previous file with comments | « Source/core/css/MediaList.idl ('k') | Source/core/css/StyleSheetList.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698