Title: [209592] trunk
- Revision
- 209592
- Author
- [email protected]
- Date
- 2016-12-08 18:37:45 -0800 (Thu, 08 Dec 2016)
Log Message
[Modern Media Controls] Exiting fullscreen with paused media shows the start button
https://bugs.webkit.org/show_bug.cgi?id=165640
Patch by Antoine Quint <[email protected]> on 2016-12-08
Reviewed by Dean Jackson.
Source/WebCore:
Like all supporting objects, the StartSupport instance gets recreated when creating controls
for new layout traits, which happens when going from fullscreen to inline. Due to this, the
"_isPlayed" property is not longer set to true, even if the media has played prior to being
paused in fullscreen. We now also check the media's played range to identify whether media
has been played.
* Modules/modern-media-controls/media/start-support.js:
(StartSupport.prototype._shouldShowStartButton):
(StartSupport):
LayoutTests:
Modify the existing test that enters fullscreen and returns to inline controls with paused media
to check that the start button is not shown upon returning to inline controls.
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt:
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (209591 => 209592)
--- trunk/LayoutTests/ChangeLog 2016-12-09 02:06:04 UTC (rev 209591)
+++ trunk/LayoutTests/ChangeLog 2016-12-09 02:37:45 UTC (rev 209592)
@@ -1,3 +1,16 @@
+2016-12-08 Antoine Quint <[email protected]>
+
+ [Modern Media Controls] Exiting fullscreen with paused media shows the start button
+ https://bugs.webkit.org/show_bug.cgi?id=165640
+
+ Reviewed by Dean Jackson.
+
+ Modify the existing test that enters fullscreen and returns to inline controls with paused media
+ to check that the start button is not shown upon returning to inline controls.
+
+ * media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt:
+ * media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html:
+
2016-12-08 Myles C. Maxfield <[email protected]>
ASSERTION FAILED: locale in WebCore::lastHyphenLocation
Modified: trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt (209591 => 209592)
--- trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt 2016-12-09 02:06:04 UTC (rev 209591)
+++ trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt 2016-12-09 02:37:45 UTC (rev 209592)
@@ -14,6 +14,7 @@
Media exited fullscreen.
PASS shadowRoot.querySelector('.media-controls').classList.contains('inline') is true
+PASS shadowRoot.querySelector('.start-button') is null
PASS successfullyParsed is true
Modified: trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html (209591 => 209592)
--- trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html 2016-12-09 02:06:04 UTC (rev 209591)
+++ trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html 2016-12-09 02:37:45 UTC (rev 209592)
@@ -37,6 +37,7 @@
debug("Media exited fullscreen.");
window.requestAnimationFrame(() => {
shouldBeTrue("shadowRoot.querySelector('.media-controls').classList.contains('inline')");
+ shouldBeNull("shadowRoot.querySelector('.start-button')");
debug("");
media.remove();
Modified: trunk/Source/WebCore/ChangeLog (209591 => 209592)
--- trunk/Source/WebCore/ChangeLog 2016-12-09 02:06:04 UTC (rev 209591)
+++ trunk/Source/WebCore/ChangeLog 2016-12-09 02:37:45 UTC (rev 209592)
@@ -1,3 +1,20 @@
+2016-12-08 Antoine Quint <[email protected]>
+
+ [Modern Media Controls] Exiting fullscreen with paused media shows the start button
+ https://bugs.webkit.org/show_bug.cgi?id=165640
+
+ Reviewed by Dean Jackson.
+
+ Like all supporting objects, the StartSupport instance gets recreated when creating controls
+ for new layout traits, which happens when going from fullscreen to inline. Due to this, the
+ "_isPlayed" property is not longer set to true, even if the media has played prior to being
+ paused in fullscreen. We now also check the media's played range to identify whether media
+ has been played.
+
+ * Modules/modern-media-controls/media/start-support.js:
+ (StartSupport.prototype._shouldShowStartButton):
+ (StartSupport):
+
2016-12-08 Myles C. Maxfield <[email protected]>
ASSERTION FAILED: locale in WebCore::lastHyphenLocation
Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/start-support.js (209591 => 209592)
--- trunk/Source/WebCore/Modules/modern-media-controls/media/start-support.js 2016-12-09 02:06:04 UTC (rev 209591)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/start-support.js 2016-12-09 02:37:45 UTC (rev 209592)
@@ -62,7 +62,7 @@
{
const media = this.mediaController.media;
- if (this._hasPlayed)
+ if (this._hasPlayed || media.played.length)
return false;
if (!media.paused)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes