Diff
Modified: trunk/LayoutTests/ChangeLog (209505 => 209506)
--- trunk/LayoutTests/ChangeLog 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/LayoutTests/ChangeLog 2016-12-08 01:37:56 UTC (rev 209506)
@@ -1,3 +1,23 @@
+2016-12-07 Antoine Quint <grao...@apple.com>
+
+ [Modern Media Controls] Remove aspect ratio button
+ https://bugs.webkit.org/show_bug.cgi?id=165571
+
+ Reviewed by Dean Jackson.
+
+ We no longer have an AspectRatioButton.
+
+ * media/modern-media-controls/aspect-ratio-button/aspect-ratio-button-expected.txt: Removed.
+ * media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html: Removed.
+ * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
+ * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
+ * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
+ * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
+ * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
+ * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
+ * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt:
+ * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html:
+
2016-12-07 Jeremy Jones <jere...@apple.com>
One esc to exit fullscreen and pointer lock
Modified: trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt (209505 => 209506)
--- trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt 2016-12-08 01:37:56 UTC (rev 209506)
@@ -8,9 +8,9 @@
PASS centerContainerBounds.width is 178
PASS centerContainerBounds.height is 44
-PASS rightContainerBounds.left is within 0.5 of 468
+PASS rightContainerBounds.left is within 0.5 of 488
PASS rightContainerBounds.top is 500
-PASS rightContainerBounds.width is within 0.5 of 166
+PASS rightContainerBounds.width is within 0.5 of 146
PASS rightContainerBounds.height is 44
PASS successfullyParsed is true
Modified: trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html (209505 => 209506)
--- trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html 2016-12-08 01:37:56 UTC (rev 209506)
@@ -41,9 +41,9 @@
debug("");
rightContainerBounds = rightContainer.element.getBoundingClientRect();
- shouldBeCloseTo("rightContainerBounds.left", 468, 0.5);
+ shouldBeCloseTo("rightContainerBounds.left", 488, 0.5);
shouldBe("rightContainerBounds.top", "500");
- shouldBeCloseTo("rightContainerBounds.width", 166, 0.5);
+ shouldBeCloseTo("rightContainerBounds.width", 146, 0.5);
shouldBe("rightContainerBounds.height", "44");
mediaControls.element.remove();
Modified: trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt (209505 => 209506)
--- trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt 2016-12-08 01:37:56 UTC (rev 209506)
@@ -23,23 +23,18 @@
PASS style.webkitMaskPositionY is "13px"
PASS style.height is "44px"
-AspectRatioButton
-PASS style.left is "40px"
-PASS style.webkitMaskPositionY is "13px"
-PASS style.height is "44px"
-
PiPButton
-PASS style.left is "72px"
+PASS style.left is "44px"
PASS style.webkitMaskPositionY is "13px"
PASS style.height is "44px"
TracksButton
-PASS style.left is "111px"
+PASS style.left is "87px"
PASS style.webkitMaskPositionY is "15px"
PASS style.height is "44px"
FullscreenButton
-PASS style.left is "139px"
+PASS style.left is "119px"
PASS style.webkitMaskPositionY is "13px"
PASS style.height is "44px"
Modified: trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html (209505 => 209506)
--- trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html 2016-12-08 01:37:56 UTC (rev 209506)
@@ -15,10 +15,9 @@
[mediaControls.playPauseButton, 78, 12],
[mediaControls.forwardButton, 127, 16],
[mediaControls.airplayButton, 12, 13],
- [mediaControls.aspectRatioButton, 40, 13],
- [mediaControls.pipButton, 72, 13],
- [mediaControls.tracksButton, 111, 15],
- [mediaControls.fullscreenButton, 139, 13]
+ [mediaControls.pipButton, 44, 13],
+ [mediaControls.tracksButton, 87, 15],
+ [mediaControls.fullscreenButton, 119, 13]
];
let style;
Modified: trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt (209505 => 209506)
--- trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt 2016-12-08 01:37:56 UTC (rev 209506)
@@ -21,7 +21,7 @@
PASS mediaControls.controlsBar.children[1].margin is 27
Right container
-PASS mediaControls.controlsBar.children[2].buttons is [mediaControls.airplayButton, mediaControls.aspectRatioButton, mediaControls.pipButton, mediaControls.tracksButton, mediaControls.fullscreenButton]
+PASS mediaControls.controlsBar.children[2].buttons is [mediaControls.airplayButton, mediaControls.pipButton, mediaControls.tracksButton, mediaControls.fullscreenButton]
PASS mediaControls.controlsBar.children[2].element.className is "buttons-container right"
PASS mediaControls.controlsBar.children[2].padding is 12
PASS mediaControls.controlsBar.children[2].margin is 0
Modified: trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html (209505 => 209506)
--- trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html 2016-12-08 01:37:56 UTC (rev 209506)
@@ -28,7 +28,7 @@
debug("");
debug("Right container");
-shouldBe("mediaControls.controlsBar.children[2].buttons", "[mediaControls.airplayButton, mediaControls.aspectRatioButton, mediaControls.pipButton, mediaControls.tracksButton, mediaControls.fullscreenButton]");
+shouldBe("mediaControls.controlsBar.children[2].buttons", "[mediaControls.airplayButton, mediaControls.pipButton, mediaControls.tracksButton, mediaControls.fullscreenButton]");
shouldBeEqualToString("mediaControls.controlsBar.children[2].element.className", "buttons-container right");
shouldBe("mediaControls.controlsBar.children[2].padding", "12");
shouldBe("mediaControls.controlsBar.children[2].margin", "0");
Modified: trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt (209505 => 209506)
--- trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt 2016-12-08 01:37:56 UTC (rev 209506)
@@ -3,9 +3,6 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-5 enabled buttons
-PASS rightContainer.margin is 12
-
4 enabled buttons
PASS rightContainer.margin is 16
Modified: trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html (209505 => 209506)
--- trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html 2016-12-08 01:37:56 UTC (rev 209506)
@@ -17,21 +17,16 @@
numberOfFrames++;
if (numberOfFrames == 1) {
- debug("5 enabled buttons")
- shouldBe("rightContainer.margin", "12");
- debug("");
- mediaControls.airplayButton.enabled = false;
- } else if (numberOfFrames == 2) {
debug("4 enabled buttons")
shouldBe("rightContainer.margin", "16");
debug("");
mediaControls.tracksButton.enabled = false;
- } else if (numberOfFrames == 3) {
+ } else if (numberOfFrames == 2) {
debug("3 enabled buttons")
shouldBe("rightContainer.margin", "24");
mediaControls.pipButton.enabled = false;
debug("");
- } else if (numberOfFrames == 4) {
+ } else if (numberOfFrames == 3) {
debug("2 enabled buttons")
shouldBe("rightContainer.margin", "24");
debug("");
Modified: trunk/Source/WebCore/ChangeLog (209505 => 209506)
--- trunk/Source/WebCore/ChangeLog 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/Source/WebCore/ChangeLog 2016-12-08 01:37:56 UTC (rev 209506)
@@ -1,3 +1,17 @@
+2016-12-07 Antoine Quint <grao...@apple.com>
+
+ [Modern Media Controls] Remove aspect ratio button
+ https://bugs.webkit.org/show_bug.cgi?id=165571
+
+ Reviewed by Dean Jackson.
+
+ Since we do not have a way to toggle letterboxing on an HTMLMediaElement, we remove the
+ corresponding button in the media controls.
+
+ * Modules/modern-media-controls/controls/aspect-ratio-button.js: Removed.
+ * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
+ * Modules/modern-media-controls/js-files:
+
2016-12-07 Jeremy Jones <jere...@apple.com>
One esc to exit fullscreen and pointer lock
Deleted: trunk/Source/WebCore/Modules/modern-media-controls/controls/aspect-ratio-button.js (209505 => 209506)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/aspect-ratio-button.js 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/aspect-ratio-button.js 2016-12-08 01:37:56 UTC (rev 209506)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2016 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-class AspectRatioButton extends IconButton
-{
-
- constructor(layoutDelegate)
- {
- super({
- cssClassName: "aspect-ratio",
- iconName: Icons.ScaleToFill,
- layoutDelegate
- });
- }
-
- // Public
-
- get scalesToFill()
- {
- return this.iconName === Icons.ScaleToFit;
- }
-
- set scalesToFill(flag)
- {
- if (this.scalesToFill === flag)
- return;
-
- this.iconName = flag ? Icons.ScaleToFit : Icons.ScaleToFill;
- }
-
-}
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js (209505 => 209506)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js 2016-12-08 01:37:56 UTC (rev 209506)
@@ -41,7 +41,6 @@
// Set up fullscreen-specific buttons.
this.rewindButton = new RewindButton(this);
- this.aspectRatioButton = new AspectRatioButton(this);
this.forwardButton = new ForwardButton(this);
this.fullscreenButton.isFullscreen = true;
@@ -55,7 +54,7 @@
});
this._rightContainer = new ButtonsContainer({
- buttons: [this.airplayButton, this.aspectRatioButton, this.pipButton, this.tracksButton, this.fullscreenButton],
+ buttons: [this.airplayButton, this.pipButton, this.tracksButton, this.fullscreenButton],
cssClassName: "right",
padding: 12
});
Modified: trunk/Source/WebCore/Modules/modern-media-controls/js-files (209505 => 209506)
--- trunk/Source/WebCore/Modules/modern-media-controls/js-files 2016-12-08 01:31:43 UTC (rev 209505)
+++ trunk/Source/WebCore/Modules/modern-media-controls/js-files 2016-12-08 01:37:56 UTC (rev 209506)
@@ -20,7 +20,6 @@
controls/pip-button.js
controls/tracks-button.js
controls/fullscreen-button.js
-controls/aspect-ratio-button.js
controls/seek-button.js
controls/rewind-button.js
controls/forward-button.js