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

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

Issue 2638623003: Media Controls: invalidate volume slider when value changes. (Closed)
Patch Set: Created 3 years, 11 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) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 } 849 }
850 850
851 bool MediaControlVolumeSliderElement::willRespondToMouseClickEvents() { 851 bool MediaControlVolumeSliderElement::willRespondToMouseClickEvents() {
852 if (!isConnected() || !document().isActive()) 852 if (!isConnected() || !document().isActive())
853 return false; 853 return false;
854 854
855 return MediaControlInputElement::willRespondToMouseClickEvents(); 855 return MediaControlInputElement::willRespondToMouseClickEvents();
856 } 856 }
857 857
858 void MediaControlVolumeSliderElement::setVolume(double volume) { 858 void MediaControlVolumeSliderElement::setVolume(double volume) {
859 if (value().toDouble() != volume) 859 if (value().toDouble() == volume)
860 setValue(String::number(volume)); 860 return;
861
862 setValue(String::number(volume));
863 if (LayoutObject* layoutObject = this->layoutObject())
864 layoutObject->setShouldDoFullPaintInvalidation();
861 } 865 }
862 866
863 bool MediaControlVolumeSliderElement::keepEventInNode(Event* event) { 867 bool MediaControlVolumeSliderElement::keepEventInNode(Event* event) {
864 return isUserInteractionEventForSlider(event, layoutObject()); 868 return isUserInteractionEventForSlider(event, layoutObject());
865 } 869 }
866 870
867 // ---------------------------- 871 // ----------------------------
868 872
869 MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement( 873 MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement(
870 MediaControls& mediaControls) 874 MediaControls& mediaControls)
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 MediaControlCurrentTimeDisplayElement* 1044 MediaControlCurrentTimeDisplayElement*
1041 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { 1045 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) {
1042 MediaControlCurrentTimeDisplayElement* element = 1046 MediaControlCurrentTimeDisplayElement* element =
1043 new MediaControlCurrentTimeDisplayElement(mediaControls); 1047 new MediaControlCurrentTimeDisplayElement(mediaControls);
1044 element->setShadowPseudoId( 1048 element->setShadowPseudoId(
1045 AtomicString("-webkit-media-controls-current-time-display")); 1049 AtomicString("-webkit-media-controls-current-time-display"));
1046 return element; 1050 return element;
1047 } 1051 }
1048 1052
1049 } // namespace blink 1053 } // 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