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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 32583007: Add UseCounter for HTMLSourceElement.media (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 | « no previous file | Source/core/page/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 6bbaa55e159f88b6aba19211a46898769f8962ff..86a83ffb66a8f67e32f3e08b5ef2050adb459236 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -2881,6 +2881,7 @@ KURL HTMLMediaElement::selectNextSourceChild(ContentType* contentType, String* k
if (node->parentNode() != this)
continue;
+ UseCounter::count(document(), UseCounter::SourceElementCandidate);
source = toHTMLSourceElement(node);
// If candidate does not have a src attribute, or if its src attribute's value is the empty string ... jump down to the failed step below
@@ -2899,8 +2900,10 @@ KURL HTMLMediaElement::selectNextSourceChild(ContentType* contentType, String* k
if (shouldLog)
LOG(Media, "HTMLMediaElement::selectNextSourceChild - 'media' is %s", source->media().utf8().data());
#endif
- if (!screenEval.eval(media.get()))
+ if (!screenEval.eval(media.get())) {
+ UseCounter::count(document(), UseCounter::SourceElementNonMatchingMedia);
goto check_again;
+ }
}
type = source->type();
« no previous file with comments | « no previous file | Source/core/page/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698