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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp

Issue 2657723002: [Blink, Media] Added controlsList to HTMLMediaElement (Closed)
Patch Set: rebased 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
Index: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
index ff8d47b2985330d24408d1c417a86a6299e07758..c106c9da7100221e50af59a1974fdddb032617c3 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
@@ -700,6 +700,10 @@ bool MediaControlDownloadButtonElement::shouldDisplayDownloadButton() {
if (mediaElement().duration() == std::numeric_limits<double>::infinity())
return false;
+ // The attribute disables the download button.
+ if (mediaElement().controlsList()->tokens().contains("nodownload"))
+ return false;
mlamouri (slow - plz ping) 2017/03/01 16:20:21 Can you add a histogram for this and the ones belo
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698