| 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 ab6d1484d6c2745d87b7cf773b5775d974c2d41b..5ae1bf111926b3e06c1b2177035ac8772c686334 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
|
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
|
| @@ -414,8 +414,7 @@ void MediaControls::updateVolume()
|
| {
|
| m_muteButton->updateDisplayType();
|
| // Invalidate the mute button because it paints differently according to volume.
|
| - if (LayoutObject* layoutObject = m_muteButton->layoutObject())
|
| - layoutObject->setShouldDoFullPaintInvalidation();
|
| + invalidate(m_muteButton);
|
|
|
| if (mediaElement().muted())
|
| m_volumeSlider->setVolume(0);
|
| @@ -441,8 +440,7 @@ void MediaControls::updateVolume()
|
| }
|
|
|
| // Invalidate the volume slider because it paints differently according to volume.
|
| - if (LayoutObject* layoutObject = m_volumeSlider->layoutObject())
|
| - layoutObject->setShouldDoFullPaintInvalidation();
|
| + invalidate(m_volumeSlider);
|
| }
|
|
|
| void MediaControls::changedClosedCaptionsVisibility()
|
| @@ -708,6 +706,25 @@ void MediaControls::setAllowHiddenVolumeControls(bool allow)
|
| updateVolume();
|
| }
|
|
|
| +void MediaControls::invalidate(Element* element)
|
| +{
|
| + if (!element)
|
| + return;
|
| +
|
| + if (LayoutObject* layoutObject = element->layoutObject())
|
| + layoutObject->setShouldDoFullPaintInvalidation();
|
| +}
|
| +
|
| +void MediaControls::networkStateChanged()
|
| +{
|
| + invalidate(m_playButton);
|
| + invalidate(m_overlayPlayButton);
|
| + invalidate(m_muteButton);
|
| + invalidate(m_fullScreenButton);
|
| + invalidate(m_timeline);
|
| + invalidate(m_volumeSlider);
|
| +}
|
| +
|
| DEFINE_TRACE(MediaControls)
|
| {
|
| visitor->trace(m_mediaElement);
|
|
|