Title: [219558] trunk
- Revision
- 219558
- Author
- grao...@webkit.org
- Date
- 2017-07-17 05:55:29 -0700 (Mon, 17 Jul 2017)
Log Message
Media controls draw behind captions
https://bugs.webkit.org/show_bug.cgi?id=174579
<rdar://problem/33295427>
Reviewed by Dean Jackson.
Source/WebCore:
Ensure the captions container is added as a previous sibling to the controls container.
Test: media/modern-media-controls/media-controls/media-controls-display-above-captions.html
* Modules/modern-media-controls/media/media-controller.js:
(MediaController):
LayoutTests:
Add a new test that checks the order in which order the captions and controls containers appear
under the media shadow root.
* media/modern-media-controls/media-controls/media-controls-display-above-captions-expected.txt: Added.
* media/modern-media-controls/media-controls/media-controls-display-above-captions.html: Added.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (219557 => 219558)
--- trunk/LayoutTests/ChangeLog 2017-07-17 12:10:31 UTC (rev 219557)
+++ trunk/LayoutTests/ChangeLog 2017-07-17 12:55:29 UTC (rev 219558)
@@ -1,3 +1,19 @@
+2017-07-17 Antoine Quint <grao...@apple.com>
+
+ Media controls draw behind captions
+ https://bugs.webkit.org/show_bug.cgi?id=174579
+ <rdar://problem/33295427>
+
+ Reviewed by Dean Jackson.
+
+ Add a new test that checks the order in which order the captions and controls containers appear
+ under the media shadow root.
+
+ * media/modern-media-controls/media-controls/media-controls-display-above-captions-expected.txt: Added.
+ * media/modern-media-controls/media-controls/media-controls-display-above-captions.html: Added.
+ * platform/ios-simulator/TestExpectations:
+ * platform/mac/TestExpectations:
+
2017-07-16 Antoine Quint <grao...@apple.com>
Dismissing the captions panel using the mouse is too eager to remove the captions panel and media controls
Added: trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-display-above-captions-expected.txt (0 => 219558)
--- trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-display-above-captions-expected.txt (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-display-above-captions-expected.txt 2017-07-17 12:55:29 UTC (rev 219558)
@@ -0,0 +1,12 @@
+Testing that the media controls container is above the captions container.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS container.childElementCount is 2
+PASS container.firstElementChild.getAttribute('pseudo') is "-webkit-media-text-track-container"
+PASS container.lastElementChild.classList.contains('media-controls') is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-display-above-captions.html (0 => 219558)
--- trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-display-above-captions.html (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-display-above-captions.html 2017-07-17 12:55:29 UTC (rev 219558)
@@ -0,0 +1,17 @@
+<script src=""
+<body>
+<video src="" controls></video>
+<script type="text/_javascript_">
+
+description("Testing that the media controls container is above the captions container.");
+
+const media = document.querySelector("video");
+const shadowRoot = window.internals.shadowRoot(media);
+const container = shadowRoot.querySelector(".media-controls-container");
+shouldBe("container.childElementCount", "2");
+shouldBeEqualToString("container.firstElementChild.getAttribute('pseudo')", "-webkit-media-text-track-container");
+shouldBeTrue("container.lastElementChild.classList.contains('media-controls')");
+
+</script>
+<script src=""
+</body>
Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (219557 => 219558)
--- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2017-07-17 12:10:31 UTC (rev 219557)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2017-07-17 12:55:29 UTC (rev 219558)
@@ -82,6 +82,7 @@
media/modern-media-controls/invalid-placard [ Pass ]
media/modern-media-controls/layout-item [ Pass ]
media/modern-media-controls/layout-node [ Pass ]
+media/modern-media-controls/media-controls/media-controls-display-above-captions.html [ Pass ]
media/modern-media-controls/media-documents [ Pass ]
media/modern-media-controls/mute-button [ Pass ]
media/modern-media-controls/mute-support [ Pass ]
Modified: trunk/LayoutTests/platform/mac/TestExpectations (219557 => 219558)
--- trunk/LayoutTests/platform/mac/TestExpectations 2017-07-17 12:10:31 UTC (rev 219557)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2017-07-17 12:55:29 UTC (rev 219558)
@@ -1561,6 +1561,7 @@
media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-mute-button-in-bottom-or-top-right-controls-bar.html [ Pass ]
media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled.html [ Pass ]
media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html [ Pass ]
+media/modern-media-controls/media-controls/media-controls-display-above-captions.html [ Pass ]
media/modern-media-controls/media-documents [ Pass ]
media/modern-media-controls/mute-button [ Pass ]
media/modern-media-controls/mute-support [ Pass ]
Modified: trunk/Source/WebCore/ChangeLog (219557 => 219558)
--- trunk/Source/WebCore/ChangeLog 2017-07-17 12:10:31 UTC (rev 219557)
+++ trunk/Source/WebCore/ChangeLog 2017-07-17 12:55:29 UTC (rev 219558)
@@ -1,3 +1,18 @@
+2017-07-17 Antoine Quint <grao...@apple.com>
+
+ Media controls draw behind captions
+ https://bugs.webkit.org/show_bug.cgi?id=174579
+ <rdar://problem/33295427>
+
+ Reviewed by Dean Jackson.
+
+ Ensure the captions container is added as a previous sibling to the controls container.
+
+ Test: media/modern-media-controls/media-controls/media-controls-display-above-captions.html
+
+ * Modules/modern-media-controls/media/media-controller.js:
+ (MediaController):
+
2017-07-17 Zan Dobersek <zdober...@igalia.com>
[CMake] Clean up Web Crypto build targets
Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js (219557 => 219558)
--- trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js 2017-07-17 12:10:31 UTC (rev 219557)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js 2017-07-17 12:55:29 UTC (rev 219558)
@@ -42,7 +42,7 @@
if (host) {
host.controlsDependOnPageScaleFactor = this.layoutTraits & LayoutTraits.iOS;
- this.container.appendChild(host.textTrackContainer);
+ this.container.insertBefore(host.textTrackContainer, this.controls.element);
if (host.isInMediaDocument)
this.mediaDocumentController = new MediaDocumentController(this);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes