Make media controls not depend on the webkitfullscreenchange event

With the unprefixed API, a fullscreenchange event will be fired at the
document, so this is not a reliable signal that the video element is
fullscreen.

Background: HTMLMediaElement::didEnterFullscreen() is called as part of
Fullscreen::didEnterFullscreen(), while the webkitfullscreenchange event
is fired on a timer started by Fullscreen::didEnterFullscreen().

Both before and after this change, the webkitfullscreenchange event is
fired after the post-enter MediaControls::notifyPanelWidthChanged().

Before, HTMLMediaElement::preDispatchEventHandler() called
configureMediaControls(), which would run
MediaControls::computeWhichControlsFit() with the new panel width and
update the visibility of the overflow button.

Now, MediaControls::panelWidthChangedTimerFired() will run
computeWhichControlsFit() after the event has been fired.

The difference isn't observable to web content, and it's still the case
that the media controls depend on layout to update, giving one bad frame
after entering fullscreen (or any other size-changing layout).

BUG=383813

Review-Url: https://codereview.chromium.org/2557043003
Cr-Commit-Position: refs/heads/master@{#436949}
3 files changed