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

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

Issue 2672823006: Add UseCounter to see how often the "allowfullscreen" attribute is modified. (Closed)
Patch Set: Rebase Created 3 years, 10 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 | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp b/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
index 14b69808064f39d603d3a00775b54f99bfcfdb58..0ac2d2966cbac6d8d8208423e76f45e6e820f7f5 100644
--- a/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
@@ -125,8 +125,17 @@ void HTMLIFrameElement::parseAttribute(
} else if (name == allowfullscreenAttr) {
bool oldAllowFullscreen = m_allowFullscreen;
m_allowFullscreen = !value.isNull();
- if (m_allowFullscreen != oldAllowFullscreen)
+ if (m_allowFullscreen != oldAllowFullscreen) {
+ // TODO(iclelland): Remove this use counter when the allowfullscreen
+ // attribute state is snapshotted on document creation. crbug.com/682282
+ if (m_allowFullscreen && contentFrame()) {
+ UseCounter::count(
+ document(),
+ UseCounter::
+ HTMLIFrameElementAllowfullscreenAttributeSetAfterContentLoad);
+ }
frameOwnerPropertiesChanged();
+ }
} else if (name == allowpaymentrequestAttr) {
bool oldAllowPaymentRequest = m_allowPaymentRequest;
m_allowPaymentRequest = !value.isNull();
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698