| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |