| 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..720b8e0f44b1d644e76865c9f61d24f51a53ca11 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| @@ -38,6 +38,7 @@
|
| #include "core/events/MouseEvent.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/frame/Settings.h"
|
| +#include "core/frame/UseCounter.h"
|
| #include "core/html/HTMLAnchorElement.h"
|
| #include "core/html/HTMLLabelElement.h"
|
| #include "core/html/HTMLMediaSource.h"
|
| @@ -700,6 +701,13 @@ bool MediaControlDownloadButtonElement::shouldDisplayDownloadButton() {
|
| if (mediaElement().duration() == std::numeric_limits<double>::infinity())
|
| return false;
|
|
|
| + // The attribute disables the download button.
|
| + if (mediaElement().controlsList()->shouldHideDownload()) {
|
| + UseCounter::count(mediaElement().document(),
|
| + UseCounter::HTMLMediaElementControlsListNoDownload);
|
| + return false;
|
| + }
|
| +
|
| return true;
|
| }
|
|
|
|
|