Commit fdbfdc27 authored by Tommy Steimel's avatar Tommy Steimel Committed by Commit Bot

Use correct size when calculating overflow menu for new media controls

This CL makes use of the size_ member of the MediaControlsImpl when
updating the overflow menu for modern media controls. This fixes a bug
where a video of normal size will have all controls in the overflow
menu because it thinks the size is 0x0.

Bug: 805690
Change-Id: I11dc8f991696d4771f517d6cca585b3e293bb57a
Reviewed-on: https://chromium-review.googlesource.com/886656Reviewed-by: default avatarMounir Lamouri (slow) <mlamouri@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532897}
parent 2ee96a27
...@@ -976,9 +976,8 @@ void MediaControlsImpl::UpdateOverflowMenuWanted() const { ...@@ -976,9 +976,8 @@ void MediaControlsImpl::UpdateOverflowMenuWanted() const {
std::make_pair(toggle_closed_captions_button_.Get(), false), std::make_pair(toggle_closed_captions_button_.Get(), false),
}; };
// Get the size of the media controls. // Current size of the media controls.
WebSize controls_size = WebSize controls_size = size_;
MediaControlElementsHelper::GetSizeOrDefault(*this, WebSize(0, 0));
// The video controls are more than one row so we need to allocate vertical // The video controls are more than one row so we need to allocate vertical
// room and hide the overlay play button if there is not enough room. // room and hide the overlay play button if there is not enough room.
......
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