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

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

Issue 2378933005: Don't use cast overlay when using default controls. (Closed)
Patch Set: update tests 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/media/controls-cast-button-narrow.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
index de2ce349106fa3307492ef92fc62cff6d58085d6..dc6d8f748a1f8fc3f69ce10a2a220ae7c3904c58 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
@@ -774,7 +774,6 @@ void MediaControls::computeWhichControlsFit() {
std::list<MediaControlElement*> overflowElements;
MediaControlElement* firstDisplacedElement = nullptr;
// For each control that fits, enable it in order of decreasing priority.
- bool droppedCastButton = false;
for (MediaControlElement* element : elements) {
if (!element)
continue;
@@ -788,10 +787,6 @@ void MediaControls::computeWhichControlsFit() {
usedWidth += width;
} else {
element->setDoesFit(false);
- // TODO(mlamouri): we should probably no longer mark the cast
- // button as dropped, it should appear in the overflow menu.
- if (element == m_castButton.get())
- droppedCastButton = true;
element->shouldShowButtonInOverflowMenu(true);
if (element->hasOverflowButton())
overflowElements.push_front(element);
@@ -822,15 +817,6 @@ void MediaControls::computeWhichControlsFit() {
m_overflowMenu->setIsWanted(false);
overflowElements.front()->setDoesFit(true);
}
-
- // Special case for cast: if we want a cast button but dropped it, then
- // show the overlay cast button instead.
- if (m_castButton->isWanted()) {
- if (droppedCastButton)
- m_overlayCastButton->tryShowOverlay();
- else
- m_overlayCastButton->setIsWanted(false);
- }
}
void MediaControls::setAllowHiddenVolumeControls(bool allow) {
« no previous file with comments | « third_party/WebKit/LayoutTests/media/controls-cast-button-narrow.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698