Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
| diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
| index 6fcf2642e672bbb9fa145f243b43bcf7045fa993..f2df5175db8db0a7cac967d54b75011e159c9e4c 100644 |
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
| @@ -751,6 +751,13 @@ void MediaControls::defaultEventHandler(Event* event) { |
| startHideMediaControlsTimer(); |
| return; |
| } |
| + |
| + // If the user is interacting with the controls via the keyboard, don't hide |
| + // the controls. This will fire when the user tabs between controls (focusin) |
| + // or when they seek either the timeline or volume sliders (input). |
| + if (event->type() == EventTypeNames::focusin || |
| + event->type() == EventTypeNames::input) |
| + resetHideMediaControlsTimer(); |
| } |
| void MediaControls::hideMediaControlsTimerFired(TimerBase*) { |
| @@ -894,6 +901,13 @@ void MediaControls::onExitedFullscreen() { |
| startHideMediaControlsTimer(); |
| } |
| +void MediaControls::onPanelKeypress() { |
| + // If the user is interacting with the controls via the keyboard, don't hide |
| + // the controls. This is called when the user mutes/unmutes, turns CC on/off, |
| + // etc. |
| + resetHideMediaControlsTimer(); |
|
johnme
2017/03/30 17:21:41
It seems that `resetHideMediaControlsTimer` will s
steimel
2017/04/05 23:38:21
Discussed offline with mlamouri@. It will be looke
|
| +} |
| + |
| void MediaControls::notifyElementSizeChanged(ClientRect* newSize) { |
| // Note that this code permits a bad frame on resize, since it is |
| // run after the relayout / paint happens. It would be great to improve |