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

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

Issue 2657723002: [Blink, Media] Added controlsList to HTMLMediaElement (Closed)
Patch Set: Rebased and readded the tests 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 8bc5052f76bbfc6dbdc72146772a104c0f6a140d..306f210e5925869403a15d30526f579e71a174fe 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/03 17:32:44 Can you add a histogram that reports how many time
whywhat 2017/03/07 12:59:46 Done.
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698