Bug 117464 - Have to invalidate the mute button when changing the volume
Summary: Have to invalidate the mute button when changing the volume
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: BlinkMergeCandidate
Depends on:
Blocks:
 
Reported: 2013-06-10 18:39 PDT by Ryosuke Niwa
Modified: 2013-06-11 14:59 PDT (History)
6 users (show)

See Also:


Attachments
Merges the patch (1.35 KB, patch)
2013-06-11 13:39 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Replace tab characters by spaces (1.36 KB, patch)
2013-06-11 14:28 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-06-10 18:39:41 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/c4c685c82908449526fd8c251cc551e729ebed08

This is because the painting code in
RenderMediaControlsChromium.cpp:paintMediaMuteButton depends on the
volume, and that code gets called via RenderTheme, so nothing else can
invalidate the button.

diff --git a/Source/core/html/shadow/MediaControls.cpp b/Source/core/html/shadow/MediaControls.cpp
index c418b69..37a0418 100644
--- a/Source/core/html/shadow/MediaControls.cpp
+++ b/Source/core/html/shadow/MediaControls.cpp
@@ -225,6 +225,8 @@
 {
     if (m_volumeSlider)
         m_volumeSlider->setVolume(m_mediaController->volume());
+    if (m_panelMuteButton && m_panelMuteButton->renderer())
+        m_panelMuteButton->renderer()->repaint();
 }
 
 void MediaControls::changedClosedCaptionsVisibility()
Comment 1 Ryosuke Niwa 2013-06-11 13:39:32 PDT
Created attachment 204357 [details]
Merges the patch
Comment 2 WebKit Commit Bot 2013-06-11 13:40:19 PDT
Attachment 204357 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/html/shadow/MediaControls.cpp']" exit_code: 1
Source/WebCore/ChangeLog:9:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Ryosuke Niwa 2013-06-11 14:28:26 PDT
Created attachment 204360 [details]
Replace tab characters by spaces
Comment 4 Ryosuke Niwa 2013-06-11 14:59:30 PDT
Committed r151476: <http://trac.webkit.org/changeset/151476>
Comment 5 Ryosuke Niwa 2013-06-11 14:59:56 PDT
Comment on attachment 204360 [details]
Replace tab characters by spaces

The patch has been reviewed by darin. Thanks darin!