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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp

Issue 2386273003: Keep the media controls panel visible if the overflow menu is visible. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 const bool ignoreVideoHover = behaviorFlags & IgnoreVideoHover; 384 const bool ignoreVideoHover = behaviorFlags & IgnoreVideoHover;
385 if (!ignoreVideoHover && m_isMouseOverControls) 385 if (!ignoreVideoHover && m_isMouseOverControls)
386 return false; 386 return false;
387 // Don't hide if focus is on the HTMLMediaElement or within the 387 // Don't hide if focus is on the HTMLMediaElement or within the
388 // controls/shadow tree. (Perform the checks separately to avoid going 388 // controls/shadow tree. (Perform the checks separately to avoid going
389 // through all the potential ancestor hosts for the focused element.) 389 // through all the potential ancestor hosts for the focused element.)
390 const bool ignoreFocus = behaviorFlags & IgnoreFocus; 390 const bool ignoreFocus = behaviorFlags & IgnoreFocus;
391 if (!ignoreFocus && 391 if (!ignoreFocus &&
392 (mediaElement().focused() || contains(document().focusedElement()))) 392 (mediaElement().focused() || contains(document().focusedElement())))
393 return false; 393 return false;
394 // Don't hide the media controls when the text track list is showing. 394 // Don't hide the media controls when a panel is showing.
395 if (m_textTrackList->isWanted()) 395 if (m_textTrackList->isWanted() || m_overflowList->isWanted())
396 return false; 396 return false;
397 return true; 397 return true;
398 } 398 }
399 399
400 void MediaControls::playbackStarted() { 400 void MediaControls::playbackStarted() {
401 BatchedControlUpdate batch(this); 401 BatchedControlUpdate batch(this);
402 402
403 if (!RuntimeEnabledFeatures::newMediaPlaybackUiEnabled()) { 403 if (!RuntimeEnabledFeatures::newMediaPlaybackUiEnabled()) {
404 m_currentTimeDisplay->setIsWanted(true); 404 m_currentTimeDisplay->setIsWanted(true);
405 m_durationDisplay->setIsWanted(false); 405 m_durationDisplay->setIsWanted(false);
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 visitor->trace(m_enclosure); 870 visitor->trace(m_enclosure);
871 visitor->trace(m_textTrackList); 871 visitor->trace(m_textTrackList);
872 visitor->trace(m_overflowMenu); 872 visitor->trace(m_overflowMenu);
873 visitor->trace(m_overflowList); 873 visitor->trace(m_overflowList);
874 visitor->trace(m_castButton); 874 visitor->trace(m_castButton);
875 visitor->trace(m_overlayCastButton); 875 visitor->trace(m_overlayCastButton);
876 HTMLDivElement::trace(visitor); 876 HTMLDivElement::trace(visitor);
877 } 877 }
878 878
879 } // namespace blink 879 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698