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

Issue 217103004: Ignore MediaController in the muted/volume controls logic (Closed)

Created:
6 years, 9 months ago by philipj_slow
Modified:
6 years, 8 months ago
CC:
blink-reviews, nessy, gasubic, fs, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, adamk+blink_chromium.org, vcarbune.chromium
Visibility:
Public.

Description

Ignore MediaController in the muted/volume controls logic Using MediaControllerInterface for volume/muted was a half-finished job, since RenderMediaControls only considered HTMLMediaElement, so the controls didn't really work with a media controller present. The new test revealed a bug caused by MediaControls::changedVolume() not considering the muted state. Consolidate the muted/volume handling to an updateVolume() function to fix the bug and make the test pass. The unconditional updateVolume() in reset() means that the volume will always be set when the controls are first created. This revealed that the media-volume-slider-hit-test test was broken: clickSliderMiddle() is called when the volume slider isn't visible, and the clicked coordinates are actually (0, 0). The test still passed because the default value for a range input element is apparently the midpoint. Rewrite the test to verify that clicking the volume slider actually updates the volume. BUG=357236 TEST=LayoutTests/media/controls-mute-with-controller.html LayoutTests/media/controls-volume-slider.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170414

Patch Set 1 #

Patch Set 2 : repaint in updateVolume #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -102 lines) Patch
A LayoutTests/media/controls-mute-with-controller.html View 1 chunk +35 lines, -0 lines 0 comments Download
A LayoutTests/media/controls-mute-with-controller-expected.html View 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/media/controls-volume-slider.html View 1 chunk +29 lines, -0 lines 0 comments Download
A LayoutTests/media/controls-volume-slider-expected.txt View 1 chunk +7 lines, -0 lines 0 comments Download
D LayoutTests/media/media-volume-slider-hit-test.html View 1 chunk +0 lines, -43 lines 0 comments Download
D LayoutTests/media/media-volume-slider-hit-test-expected.txt View 1 chunk +0 lines, -7 lines 0 comments Download
M Source/core/html/HTMLMediaElement.h View 1 2 chunks +5 lines, -5 lines 0 comments Download
M Source/core/html/HTMLMediaElement.cpp View 1 2 chunks +1 line, -4 lines 0 comments Download
M Source/core/html/MediaController.h View 2 chunks +4 lines, -6 lines 0 comments Download
M Source/core/html/MediaController.cpp View 1 chunk +0 lines, -9 lines 0 comments Download
M Source/core/html/MediaControllerInterface.h View 1 chunk +0 lines, -8 lines 0 comments Download
M Source/core/html/shadow/MediaControlElements.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M Source/core/html/shadow/MediaControls.h View 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/html/shadow/MediaControls.cpp View 1 2 chunks +8 lines, -14 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
philipj_slow
PTAL. Things were broken in the presence of a media controller and now they are ...
6 years, 9 months ago (2014-03-28 16:59:45 UTC) #1
acolwell GONE FROM CHROMIUM
lgtm
6 years, 8 months ago (2014-03-29 00:52:46 UTC) #2
philipj_slow
I had "The m_muteButton->renderer()->repaint() call is not needed because MediaControlElement::setDisplayType() will also call it." in ...
6 years, 8 months ago (2014-03-29 07:33:44 UTC) #3
philipj_slow
The CQ bit was checked by philipj@opera.com
6 years, 8 months ago (2014-03-29 09:30:34 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/philipj@opera.com/217103004/20001
6 years, 8 months ago (2014-03-29 09:30:37 UTC) #5
commit-bot: I haz the power
6 years, 8 months ago (2014-03-29 10:13:43 UTC) #6
Message was sent while issue was closed.
Change committed as 170414

Powered by Google App Engine
This is Rietveld 408576698