Title: [209098] trunk
- Revision
- 209098
- Author
- [email protected]
- Date
- 2016-11-29 15:38:19 -0800 (Tue, 29 Nov 2016)
Log Message
[Modern Media Controls] Status text stuck saying "Loading" after media starts playing
https://bugs.webkit.org/show_bug.cgi?id=165162
Patch by Antoine Quint <[email protected]> on 2016-11-29
Reviewed by Dean Jackson.
Source/WebCore:
We forgot to handle the case where none of the special messages need to be set and the
status text should be just an empty string, meaning there is no status text shown in the
controls bar and the scrubber appears instead.
Test: media/modern-media-controls/status-support/status-support-playing.html
* Modules/modern-media-controls/media/status-support.js:
(StatusSupport.prototype.syncControl):
(StatusSupport):
LayoutTests:
Adding a new test ensuring the status text is the empty string once the media starts playing.
* media/modern-media-controls/status-support/status-support-playing-expected.txt: Added.
* media/modern-media-controls/status-support/status-support-playing.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (209097 => 209098)
--- trunk/LayoutTests/ChangeLog 2016-11-29 23:35:19 UTC (rev 209097)
+++ trunk/LayoutTests/ChangeLog 2016-11-29 23:38:19 UTC (rev 209098)
@@ -1,3 +1,15 @@
+2016-11-29 Antoine Quint <[email protected]>
+
+ [Modern Media Controls] Status text stuck saying "Loading" after media starts playing
+ https://bugs.webkit.org/show_bug.cgi?id=165162
+
+ Reviewed by Dean Jackson.
+
+ Adding a new test ensuring the status text is the empty string once the media starts playing.
+
+ * media/modern-media-controls/status-support/status-support-playing-expected.txt: Added.
+ * media/modern-media-controls/status-support/status-support-playing.html: Added.
+
2016-11-29 Ryan Haddad <[email protected]>
Marking js/dom/modules/module-will-fire-beforeload.html as flaky on mac-wk2 debug.
Added: trunk/LayoutTests/media/modern-media-controls/status-support/status-support-playing-expected.txt (0 => 209098)
--- trunk/LayoutTests/media/modern-media-controls/status-support/status-support-playing-expected.txt (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/status-support/status-support-playing-expected.txt 2016-11-29 23:38:19 UTC (rev 209098)
@@ -0,0 +1,11 @@
+Testing the StatusSupport behavior when media plays.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS mediaController.controls.statusLabel.text is ""
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/media/modern-media-controls/status-support/status-support-playing.html (0 => 209098)
--- trunk/LayoutTests/media/modern-media-controls/status-support/status-support-playing.html (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/status-support/status-support-playing.html 2016-11-29 23:38:19 UTC (rev 209098)
@@ -0,0 +1,26 @@
+<script src=""
+<script src="" type="text/_javascript_"></script>
+<body>
+<video src="" style="width: 320px; height: 240px;" autoplay></video>
+<div id="shadow"></div>
+<script type="text/_javascript_">
+
+window.jsTestIsAsync = true;
+
+description("Testing the <code>StatusSupport</code> behavior when media plays.");
+
+const shadowRoot = document.querySelector("div#shadow").attachShadow({ mode: "open" });
+const media = document.querySelector("video");
+const mediaController = createControls(shadowRoot, media, null);
+
+media.addEventListener("play", function() {
+ shouldBeEqualToString("mediaController.controls.statusLabel.text", "");
+ debug("");
+ shadowRoot.host.remove();
+ media.remove();
+ finishJSTest();
+});
+
+</script>
+<script src=""
+</body>
Modified: trunk/Source/WebCore/ChangeLog (209097 => 209098)
--- trunk/Source/WebCore/ChangeLog 2016-11-29 23:35:19 UTC (rev 209097)
+++ trunk/Source/WebCore/ChangeLog 2016-11-29 23:38:19 UTC (rev 209098)
@@ -1,3 +1,20 @@
+2016-11-29 Antoine Quint <[email protected]>
+
+ [Modern Media Controls] Status text stuck saying "Loading" after media starts playing
+ https://bugs.webkit.org/show_bug.cgi?id=165162
+
+ Reviewed by Dean Jackson.
+
+ We forgot to handle the case where none of the special messages need to be set and the
+ status text should be just an empty string, meaning there is no status text shown in the
+ controls bar and the scrubber appears instead.
+
+ Test: media/modern-media-controls/status-support/status-support-playing.html
+
+ * Modules/modern-media-controls/media/status-support.js:
+ (StatusSupport.prototype.syncControl):
+ (StatusSupport):
+
2016-11-29 Brady Eidson <[email protected]>
IndexedDB 2.0: Cache and reuse SQLiteStatements in the SQLite backend.
Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/status-support.js (209097 => 209098)
--- trunk/Source/WebCore/Modules/modern-media-controls/media/status-support.js 2016-11-29 23:35:19 UTC (rev 209097)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/status-support.js 2016-11-29 23:38:19 UTC (rev 209098)
@@ -44,10 +44,12 @@
if (!!media.error)
this.control.text = "Error";
- if (media.duration === Number.POSITIVE_INFINITY && media.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA)
+ else if (media.duration === Number.POSITIVE_INFINITY && media.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA)
this.control.text = "Live Broadcast";
- if (media.readyState <= HTMLMediaElement.HAVE_NOTHING && media.networkState === HTMLMediaElement.NETWORK_LOADING)
+ else if (media.readyState <= HTMLMediaElement.HAVE_NOTHING && media.networkState === HTMLMediaElement.NETWORK_LOADING)
this.control.text = "Loading";
+ else
+ this.control.text = "";
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes