Commit 48bd6ef2 authored by François Beaufort's avatar François Beaufort Committed by Commit Bot

Move Picture-in-Picture icon to the bottom of overflow menu

According to UI review deck, the Picture-in-Picture icon should live at
the very bottom of the list in the overflow menu.

Test page: https://beaufortfrancois.github.io/sandbox/media/overflow-video.html
Screenshots: https://imgur.com/a/lnH1e

Bug: 726621
Change-Id: Id0075ec3524842200eacc315539233a494edc484
Reviewed-on: https://chromium-review.googlesource.com/916381Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536697}
parent 2735f704
......@@ -576,12 +576,6 @@ void MediaControlsImpl::InitializeControls() {
// overflow menu.
overflow_list_->AppendChild(play_button_->CreateOverflowElement(
new MediaControlPlayButtonElement(*this)));
if (RuntimeEnabledFeatures::PictureInPictureEnabled() && !IsModern() &&
MediaElement().IsHTMLVideoElement()) {
overflow_list_->AppendChild(
picture_in_picture_button_->CreateOverflowElement(
new MediaControlPictureInPictureButtonElement(*this)));
}
overflow_list_->AppendChild(fullscreen_button_->CreateOverflowElement(
new MediaControlFullscreenButtonElement(*this)));
overflow_list_->AppendChild(download_button_->CreateOverflowElement(
......@@ -593,6 +587,12 @@ void MediaControlsImpl::InitializeControls() {
overflow_list_->AppendChild(
toggle_closed_captions_button_->CreateOverflowElement(
new MediaControlToggleClosedCaptionsButtonElement(*this)));
if (RuntimeEnabledFeatures::PictureInPictureEnabled() && !IsModern() &&
MediaElement().IsHTMLVideoElement()) {
overflow_list_->AppendChild(
picture_in_picture_button_->CreateOverflowElement(
new MediaControlPictureInPictureButtonElement(*this)));
}
// Set the default CSS classes.
UpdateCSSClassFromState();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment