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) |
whywhat
2017/01/09 16:06:59
nit: is it okay to compare doubles like this? I re
mlamouri (slow - plz ping)
2017/01/10 14:13:19
In general, we can assume that any change is meani
| |
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1041 MediaControlCurrentTimeDisplayElement* | 1045 MediaControlCurrentTimeDisplayElement* |
1042 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { | 1046 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { |
1043 MediaControlCurrentTimeDisplayElement* element = | 1047 MediaControlCurrentTimeDisplayElement* element = |
1044 new MediaControlCurrentTimeDisplayElement(mediaControls); | 1048 new MediaControlCurrentTimeDisplayElement(mediaControls); |
1045 element->setShadowPseudoId( | 1049 element->setShadowPseudoId( |
1046 AtomicString("-webkit-media-controls-current-time-display")); | 1050 AtomicString("-webkit-media-controls-current-time-display")); |
1047 return element; | 1051 return element; |
1048 } | 1052 } |
1049 | 1053 |
1050 } // namespace blink | 1054 } // namespace blink |
OLD | NEW |