Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp

Issue 2783593002: Redraw media volume slider when it is moving (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 m_volumeSlider->setVolume(mediaElement().muted() ? 0 799 m_volumeSlider->setVolume(mediaElement().muted() ? 0
800 : mediaElement().volume()); 800 : mediaElement().volume());
801 801
802 // Update visibility of volume controls. 802 // Update visibility of volume controls.
803 // TODO(mlamouri): it should not be part of the volumechange handling because 803 // TODO(mlamouri): it should not be part of the volumechange handling because
804 // it is using audio availability as input. 804 // it is using audio availability as input.
805 BatchedControlUpdate batch(this); 805 BatchedControlUpdate batch(this);
806 m_volumeSlider->setIsWanted(mediaElement().hasAudio() && 806 m_volumeSlider->setIsWanted(mediaElement().hasAudio() &&
807 !preferHiddenVolumeControls(document())); 807 !preferHiddenVolumeControls(document()));
808 m_muteButton->setIsWanted(mediaElement().hasAudio()); 808 m_muteButton->setIsWanted(mediaElement().hasAudio());
809 invalidate(m_muteButton);
CJ 2017/03/28 14:58:38 Is this necessary?
810 invalidate(m_volumeSlider);
809 } 811 }
810 812
811 void MediaControls::onFocusIn() { 813 void MediaControls::onFocusIn() {
812 if (!mediaElement().shouldShowControls()) 814 if (!mediaElement().shouldShowControls())
813 return; 815 return;
814 816
815 show(); 817 show();
816 resetHideMediaControlsTimer(); 818 resetHideMediaControlsTimer();
817 } 819 }
818 820
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 visitor->trace(m_overflowList); 1102 visitor->trace(m_overflowList);
1101 visitor->trace(m_castButton); 1103 visitor->trace(m_castButton);
1102 visitor->trace(m_overlayCastButton); 1104 visitor->trace(m_overlayCastButton);
1103 visitor->trace(m_mediaEventListener); 1105 visitor->trace(m_mediaEventListener);
1104 visitor->trace(m_windowEventListener); 1106 visitor->trace(m_windowEventListener);
1105 visitor->trace(m_orientationLockDelegate); 1107 visitor->trace(m_orientationLockDelegate);
1106 HTMLDivElement::trace(visitor); 1108 HTMLDivElement::trace(visitor);
1107 } 1109 }
1108 1110
1109 } // namespace blink 1111 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698