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

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

Issue 917043003: Make MediaControls::m_wasLastEventTouch a local variable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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
« no previous file with comments | « Source/core/html/shadow/MediaControls.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/MediaControls.cpp
diff --git a/Source/core/html/shadow/MediaControls.cpp b/Source/core/html/shadow/MediaControls.cpp
index 57d0d7332aa13034da29eba261dceaa173f23285..2f827bd203aee4f1c7007dc251071ed56f3c3b56 100644
--- a/Source/core/html/shadow/MediaControls.cpp
+++ b/Source/core/html/shadow/MediaControls.cpp
@@ -68,7 +68,6 @@ MediaControls::MediaControls(HTMLMediaElement& mediaElement)
, m_hideTimerBehaviorFlags(IgnoreNone)
, m_isMouseOverControls(false)
, m_isPausedForScrubbing(false)
- , m_wasLastEventTouch(false)
{
}
@@ -439,14 +438,14 @@ void MediaControls::stoppedCasting()
void MediaControls::defaultEventHandler(Event* event)
{
HTMLDivElement::defaultEventHandler(event);
- m_wasLastEventTouch = event->isTouchEvent() || event->isGestureEvent()
- || (event->isMouseEvent() && toMouseEvent(event)->fromTouch());
// Add IgnoreControlsHover to m_hideTimerBehaviorFlags when we see a touch event,
// to allow the hide-timer to do the right thing when it fires.
// FIXME: Preferably we would only do this when we're actually handling the event
// here ourselves.
- m_hideTimerBehaviorFlags |= m_wasLastEventTouch ? IgnoreControlsHover : IgnoreNone;
+ bool wasLastEventTouch = event->isTouchEvent() || event->isGestureEvent()
+ || (event->isMouseEvent() && toMouseEvent(event)->fromTouch());
+ m_hideTimerBehaviorFlags |= wasLastEventTouch ? IgnoreControlsHover : IgnoreNone;
if (event->type() == EventTypeNames::mouseover) {
if (!containsRelatedTarget(event)) {
« no previous file with comments | « Source/core/html/shadow/MediaControls.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698