Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
REGRESSION (r189567): Inline controls on Mac are misplaced
https://bugs.webkit.org/show_bug.cgi?id=151072 Reviewed by Eric Carlson. Source/WebCore: Test: media/controls/fullscreen-button-inline-layout.html For a certain range of video widths, r189567 caused the timeline track to be too large, pushing the buttons on the right side of the inline controls out of the rect bounds. The fix is to set min-width to 0. The test added checks to see that the right edge of the fullscreen button is within the rect bounds. * Modules/mediacontrols/mediaControlsApple.css: (audio::-webkit-media-controls-timeline-container): Add min-width. (audio::-webkit-media-controls-panel .thumbnail-track): Ditto. Fly-by fix of height rule. LayoutTests: * media/controls/controls-test-helpers.js: (ControlsTest.prototype.isLessThan): Add helper function. * media/controls/fullscreen-button-inline-layout-expected.txt: Added. * media/controls/fullscreen-button-inline-layout.html: Added. Canonical link: https://commits.webkit.org/169282@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
6 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,11 @@ | ||
This tests for proper flexbox layout by checking the location of the fullscreen button. It should be within the bounds of the inline bar instead of being pushed past the right edge. | ||
|
||
This test only runs in DRT! | ||
|
||
|
||
EVENT: canplaythrough | ||
PASS: We are using the apple idiom | ||
PASS: Fullscreen button is placed within bounds of inline controls | ||
|
||
Testing finished. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="../media-file.js"></script> | ||
<script src="controls-test-helpers.js"></script> | ||
<script> | ||
var tester = new ControlsTest() | ||
.whenReady(runTests) | ||
.start(); | ||
|
||
function runTests() | ||
{ | ||
tester.test("We are using the apple idiom") | ||
.value(tester.currentState.idiom) | ||
.isEqualTo("apple"); | ||
|
||
var fullscreenButtonState = tester.stateForControlsElement("Fullscreen Button"); | ||
var videoBox = tester.media.getBoundingClientRect(); | ||
tester.test("Fullscreen button is placed within bounds of inline controls") | ||
.value(fullscreenButtonState.bounds.right) | ||
.isLessThan(videoBox.right); | ||
|
||
tester.end(); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<p>This tests for proper flexbox layout by checking the location of the fullscreen button. It should be within the bounds of the inline bar instead of being pushed past the right edge.</p> | ||
<p>This test only runs in DRT!</p> | ||
<video controls width="340" height="80"></video> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters