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

Unified Diff: Source/core/html/shadow/MediaControls.cpp

Issue 892963003: Ensure media control goes to transparent(hide) after seek by touch (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/core/html/shadow/MediaControls.cpp
diff --git a/Source/core/html/shadow/MediaControls.cpp b/Source/core/html/shadow/MediaControls.cpp
index bd04ac6ae8d41c0d3a59898d537b5670bfb522cc..e0d7b810e0f6d87ab1cfaaa512e497c586a9b744 100644
--- a/Source/core/html/shadow/MediaControls.cpp
+++ b/Source/core/html/shadow/MediaControls.cpp
@@ -68,6 +68,7 @@ MediaControls::MediaControls(HTMLMediaElement& mediaElement)
, m_isMouseOverControls(false)
, m_isPausedForScrubbing(false)
, m_wasLastEventTouch(false)
+ , m_HideTimerBehaviorFlags(IgnoreNone)
{
}
@@ -477,11 +478,9 @@ void MediaControls::hideMediaControlsTimerFired(Timer<MediaControls>*)
if (mediaElement().togglePlayStateWillPlay())
return;
- unsigned behaviorFlags = IgnoreFocus | IgnoreVideoHover;
- if (m_wasLastEventTouch) {
- behaviorFlags |= IgnoreControlsHover;
- }
- if (!shouldHideMediaControls(behaviorFlags))
+ m_HideTimerBehaviorFlags |= IgnoreFocus;
+ m_HideTimerBehaviorFlags |= IgnoreVideoHover;
fs 2015/02/06 13:43:32 I'd make this similar to the previous PS: unsigne
william.xie1 2015/02/06 14:59:20 Done.
+ if (!shouldHideMediaControls(m_HideTimerBehaviorFlags))
return;
makeTransparent();
@@ -490,12 +489,16 @@ void MediaControls::hideMediaControlsTimerFired(Timer<MediaControls>*)
void MediaControls::startHideMediaControlsTimer()
{
+ if (m_wasLastEventTouch) {
fs 2015/02/06 13:43:32 Get rid of m_wasLastEventTouch, and either pass th
+ m_HideTimerBehaviorFlags = IgnoreControlsHover;
+ }
m_hideMediaControlsTimer.startOneShot(timeWithoutMouseMovementBeforeHidingMediaControls, FROM_HERE);
}
void MediaControls::stopHideMediaControlsTimer()
{
m_hideMediaControlsTimer.stop();
+ m_HideTimerBehaviorFlags = IgnoreNone;
}
void MediaControls::resetHideMediaControlsTimer()
« Source/core/html/shadow/MediaControls.h ('K') | « Source/core/html/shadow/MediaControls.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698