|
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
|
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
|
Total messages: 6 (0 generated)
|