Title: [235622] trunk
- Revision
- 235622
- Author
- grao...@webkit.org
- Date
- 2018-09-04 11:40:12 -0700 (Tue, 04 Sep 2018)
Log Message
[Modern Media Controls] Disabling both fullscreen and picture-in-picture shows an empty top left container
https://bugs.webkit.org/show_bug.cgi?id=189259
<rdar://problem/42026625>
Reviewed by Dean Jackson.
Source/WebCore:
Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip.html
Ensure the top left controls bar is hidden when none of its children are visible.
* Modules/modern-media-controls/controls/inline-media-controls.js:
(InlineMediaControls.prototype.layout):
LayoutTests:
Adding a new test that checks that the top left container is hidden when both the fullscreen and picture-in-picture buttons are disabled.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (235621 => 235622)
--- trunk/LayoutTests/ChangeLog 2018-09-04 18:20:04 UTC (rev 235621)
+++ trunk/LayoutTests/ChangeLog 2018-09-04 18:40:12 UTC (rev 235622)
@@ -1,3 +1,16 @@
+2018-09-04 Antoine Quint <grao...@apple.com>
+
+ [Modern Media Controls] Disabling both fullscreen and picture-in-picture shows an empty top left container
+ https://bugs.webkit.org/show_bug.cgi?id=189259
+ <rdar://problem/42026625>
+
+ Reviewed by Dean Jackson.
+
+ Adding a new test that checks that the top left container is hidden when both the fullscreen and picture-in-picture buttons are disabled.
+
+ * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip-expected.txt: Added.
+ * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip.html: Added.
+
2018-09-04 Per Arne Vollan <pvol...@apple.com>
Add test for fix in https://bugs.webkit.org/show_bug.cgi?id=187922
Added: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip-expected.txt (0 => 235622)
--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip-expected.txt (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip-expected.txt 2018-09-04 18:40:12 UTC (rev 235622)
@@ -0,0 +1,10 @@
+Testing MacOSInlineMediaControls with disabled fullscreen and picture-in-picture buttons.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS mediaControls.topLeftControlsBar.visible is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip.html (0 => 235622)
--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip.html (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip.html 2018-09-04 18:40:12 UTC (rev 235622)
@@ -0,0 +1,19 @@
+<script src=""
+<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
+<body>
+<script type="text/_javascript_">
+
+description("Testing <code>MacOSInlineMediaControls</code> with disabled fullscreen and picture-in-picture buttons.");
+
+const mediaControls = new MacOSInlineMediaControls({ width: 680, height: 300 });
+
+// Disabling both the fullscreen and picture-and-picture buttons should make the top left controls bar have no visible
+// buttons and thus have its visible property set to false.
+mediaControls.fullscreenButton.enabled = false;
+mediaControls.pipButton.enabled = false;
+shouldBeFalse("mediaControls.topLeftControlsBar.visible");
+
+</script>
+<script src=""
+</body>
Modified: trunk/Source/WebCore/ChangeLog (235621 => 235622)
--- trunk/Source/WebCore/ChangeLog 2018-09-04 18:20:04 UTC (rev 235621)
+++ trunk/Source/WebCore/ChangeLog 2018-09-04 18:40:12 UTC (rev 235622)
@@ -1,3 +1,18 @@
+2018-09-04 Antoine Quint <grao...@apple.com>
+
+ [Modern Media Controls] Disabling both fullscreen and picture-in-picture shows an empty top left container
+ https://bugs.webkit.org/show_bug.cgi?id=189259
+ <rdar://problem/42026625>
+
+ Reviewed by Dean Jackson.
+
+ Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-disabled-fullscreen-and-pip.html
+
+ Ensure the top left controls bar is hidden when none of its children are visible.
+
+ * Modules/modern-media-controls/controls/inline-media-controls.js:
+ (InlineMediaControls.prototype.layout):
+
2018-09-04 Daniel Bates <daba...@apple.com>
Attempt to fix failing tests following r235615 (https://bugs.webkit.org/show_bug.cgi?id=187925)
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/inline-media-controls.js (235621 => 235622)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/inline-media-controls.js 2018-09-04 18:20:04 UTC (rev 235621)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/inline-media-controls.js 2018-09-04 18:40:12 UTC (rev 235622)
@@ -134,7 +134,7 @@
this._topLeftControlsBarContainer.children = this._topLeftContainerButtons();
this._topLeftControlsBarContainer.layout();
this.topLeftControlsBar.width = this._topLeftControlsBarContainer.width;
- this.topLeftControlsBar.visible = this._topLeftControlsBarContainer.children.length > 0;
+ this.topLeftControlsBar.visible = this._topLeftControlsBarContainer.children.some(button => button.visible);
// Compute the visible size for the controls bar.
this.bottomControlsBar.width = this._shouldUseAudioLayout ? this.width : (this.width - 2 * InsideMargin);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes