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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 297783004: Implement heuristic for showing media controls during playback w/o a mouse (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: IgnoreSelfHover -> IgnoreVideoHover; Tweak comment. Created 6 years, 7 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/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 9a70620667aa4f9032664dee09f16c8683e2ec11..595b8cbeb0b733cd76629a69e1cf5769936b019a 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -3645,6 +3645,15 @@ bool HTMLMediaElement::isInteractiveContent() const
return fastHasAttribute(controlsAttr);
}
+void HTMLMediaElement::defaultEventHandler(Event* event)
+{
+ if (event->type() == EventTypeNames::focusin) {
+ if (hasMediaControls())
+ mediaControls()->mediaElementFocused();
+ }
+ HTMLElement::defaultEventHandler(event);
+}
+
void HTMLMediaElement::trace(Visitor* visitor)
{
visitor->trace(m_error);

Powered by Google App Engine
This is Rietveld 408576698