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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.cpp

Issue 2375633002: Close the media controls overflow menu when an item is selected. (Closed)
Patch Set: fix Created 4 years, 3 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: third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.cpp
index c04fa5c4bbb02df540152001fdce0ba31dd6b694..a234fe80bedfdc2425c2c3053c3875714d88c8f0 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.cpp
@@ -182,6 +182,15 @@ bool MediaControlInputElement::isMouseFocusable() const
return false;
}
+void MediaControlInputElement::defaultEventHandler(Event* event)
+{
+ // If the element is in the overflow menu, clicking should hide the menu.
+ if (mediaControls().overflowMenuVisible() && parentElement()->shadowPseudoId() == AtomicString("-internal-media-controls-overflow-menu-list-item"))
+ mediaControls().toggleOverflowMenu();
+
+ HTMLInputElement::defaultEventHandler(event);
+}
+
HTMLElement* MediaControlInputElement::createOverflowElement(MediaControls& mediaControls, MediaControlInputElement* button)
{
if (!button)

Powered by Google App Engine
This is Rietveld 408576698