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

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

Issue 2477203002: Media Controls: delegate 'volumechange' and 'focusin' handling to an EventListener. (Closed)
Patch Set: moar tests Created 4 years, 1 month 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 e60254555d49888e44e5603c68773519b13e9f57..50b5fc4f171622dd7aba04bc86b1ca28ab2e8b3c 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
@@ -299,7 +299,9 @@ void MediaControlMuteButtonElement::defaultEventHandler(Event* event) {
}
void MediaControlMuteButtonElement::updateDisplayType() {
- setDisplayType(mediaElement().muted() ? MediaUnMuteButton : MediaMuteButton);
+ setDisplayType((mediaElement().muted() || mediaElement().volume() == 0)
foolip 2016/11/14 16:07:38 Why this change? Clicking it will only toggle mute
mlamouri (slow - plz ping) 2016/11/14 23:46:29 Because we actually show a "muted" button if the v
+ ? MediaUnMuteButton
+ : MediaMuteButton);
updateOverflowString();
}

Powered by Google App Engine
This is Rietveld 408576698