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

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

Issue 2783593002: Redraw media volume slider when it is moving (Closed)
Patch Set: Test the code modifications 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 | third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp » ('j') | 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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 UserMetricsAction("Media.Controls.VolumeChangeBegin")); 878 UserMetricsAction("Media.Controls.VolumeChangeBegin"));
879 879
880 if (event->type() == EventTypeNames::mouseup) 880 if (event->type() == EventTypeNames::mouseup)
881 Platform::current()->recordAction( 881 Platform::current()->recordAction(
882 UserMetricsAction("Media.Controls.VolumeChangeEnd")); 882 UserMetricsAction("Media.Controls.VolumeChangeEnd"));
883 883
884 if (event->type() == EventTypeNames::input) { 884 if (event->type() == EventTypeNames::input) {
885 double volume = value().toDouble(); 885 double volume = value().toDouble();
886 mediaElement().setVolume(volume); 886 mediaElement().setVolume(volume);
887 mediaElement().setMuted(false); 887 mediaElement().setMuted(false);
888 if (LayoutObject* layoutObject = this->layoutObject())
889 layoutObject->setShouldDoFullPaintInvalidation();
888 } 890 }
889 } 891 }
890 892
891 bool MediaControlVolumeSliderElement::willRespondToMouseMoveEvents() { 893 bool MediaControlVolumeSliderElement::willRespondToMouseMoveEvents() {
892 if (!isConnected() || !document().isActive()) 894 if (!isConnected() || !document().isActive())
893 return false; 895 return false;
894 896
895 return MediaControlInputElement::willRespondToMouseMoveEvents(); 897 return MediaControlInputElement::willRespondToMouseMoveEvents();
896 } 898 }
897 899
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 MediaControlCurrentTimeDisplayElement* 1100 MediaControlCurrentTimeDisplayElement*
1099 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { 1101 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) {
1100 MediaControlCurrentTimeDisplayElement* element = 1102 MediaControlCurrentTimeDisplayElement* element =
1101 new MediaControlCurrentTimeDisplayElement(mediaControls); 1103 new MediaControlCurrentTimeDisplayElement(mediaControls);
1102 element->setShadowPseudoId( 1104 element->setShadowPseudoId(
1103 AtomicString("-webkit-media-controls-current-time-display")); 1105 AtomicString("-webkit-media-controls-current-time-display"));
1104 return element; 1106 return element;
1105 } 1107 }
1106 1108
1107 } // namespace blink 1109 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698