DescriptionUse HTMLMediaElement::togglePlayState() where appropriate
togglePlayState() handles the MediaController case correctly, which the
updated code paths did not.
Introduce togglePlayStateWillPlay() to replace canPlay() and paused() in
certain contexts. The readyState < HAVE_METADATA in canPlay() condition
is not replicated because the hasSource() checks in paintMediaPlayButton
and paintMediaOverlayPlayButton disables the buttons so that they can't
be pressed at all. Some corner case seems likely to exist, but was not
found in ad-hoc testing.
Drop the ASSERT(controls()) in tooglePlayState() since it is now used in
contexts not directly tied to MediaControls. The ASSERT doesn't fail
yet, but the same ASSERT in togglePlayStateWillPlay() would, since
MediaControlPlayButtonElement::updateDisplayType() is called when the
controls are created for text track rendering but are not shown.
These changes made it possible to reduce the size of
MediaControllerInterface a little bit more.
BUG=341813
TEST=none, no observable changes intended
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170296
Patch Set 1 #
Total comments: 2
Patch Set 2 : documentation #
Messages
Total messages: 6 (0 generated)
|