Chromium Code Reviews| Index: Source/core/html/shadow/MediaControls.cpp |
| diff --git a/Source/core/html/shadow/MediaControls.cpp b/Source/core/html/shadow/MediaControls.cpp |
| index bd04ac6ae8d41c0d3a59898d537b5670bfb522cc..aacd2e9c0cd8cd8d1005b5f3892f70e028ff5f6e 100644 |
| --- a/Source/core/html/shadow/MediaControls.cpp |
| +++ b/Source/core/html/shadow/MediaControls.cpp |
| @@ -34,6 +34,7 @@ |
| #include "core/html/HTMLMediaElement.h" |
| #include "core/html/MediaController.h" |
| #include "core/layout/LayoutTheme.h" |
| +#include "core/page/EventHandler.h" |
| namespace blink { |
| @@ -239,6 +240,11 @@ bool MediaControls::shouldHideMediaControls(unsigned behaviorFlags) const |
| // Never hide for a media element without visual representation. |
| if (!mediaElement().hasVideo() || mediaElement().isPlayingRemotely()) |
| return false; |
| + |
| + // Update hover status before check it |
| + if (document().frame()) |
| + document().frame()->eventHandler().scheduleHoverStateUpdate(); |
|
fs
2015/02/02 13:13:46
All this does is to start a timer, so this doesn't
william.xie1
2015/02/02 14:29:18
Hi fs,
yes, here it schedule a time for hover stat
|
| + |
| // Don't hide if the mouse is over the controls. |
| const bool ignoreControlsHover = behaviorFlags & IgnoreControlsHover; |
| if (!ignoreControlsHover && m_panel->hovered()) |
| @@ -273,7 +279,7 @@ void MediaControls::playbackProgressed() |
| m_timeline->setPosition(mediaElement().currentTime()); |
| updateCurrentTimeDisplay(); |
| - if (shouldHideMediaControls()) |
| + if (m_panel->isOpaque() && shouldHideMediaControls()) |
|
fs
2015/02/02 13:13:46
makeTransparent already checks this, so this just
william.xie1
2015/02/02 14:29:18
Yes, correct, to avoid schedule the hover state up
|
| makeTransparent(); |
| } |