Title: [226871] branches/safari-605-branch

Diff

Modified: branches/safari-605-branch/LayoutTests/ChangeLog (226870 => 226871)


--- branches/safari-605-branch/LayoutTests/ChangeLog	2018-01-12 06:31:00 UTC (rev 226870)
+++ branches/safari-605-branch/LayoutTests/ChangeLog	2018-01-12 06:31:03 UTC (rev 226871)
@@ -1,5 +1,22 @@
 2018-01-11  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r226795. rdar://problem/36450750
+
+    2018-01-11  Antoine Quint  <grao...@apple.com>
+
+            [iOS] There should be no controls markup generated in fullscreen
+            https://bugs.webkit.org/show_bug.cgi?id=181540
+            <rdar://problem/35060379>
+
+            Reviewed by Eric Carlson.
+
+            We update this test to simply check that we're removing all child nodes.
+
+            * media/modern-media-controls/media-controller/ios/media-controller-stop-updates-in-fullscreen-expected.txt:
+            * media/modern-media-controls/media-controller/ios/media-controller-stop-updates-in-fullscreen.html:
+
+2018-01-11  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r226791. rdar://problem/36450803
 
     2018-01-10  Simon Fraser  <simon.fra...@apple.com>

Modified: branches/safari-605-branch/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-stop-updates-in-fullscreen-expected.txt (226870 => 226871)


--- branches/safari-605-branch/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-stop-updates-in-fullscreen-expected.txt	2018-01-12 06:31:00 UTC (rev 226870)
+++ branches/safari-605-branch/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-stop-updates-in-fullscreen-expected.txt	2018-01-12 06:31:03 UTC (rev 226871)
@@ -8,17 +8,12 @@
 
 Entering fullscreen.
 
-Obtained a webkitpresentationmodechanged event
-media.webkitDisplayingFullscreen = true.
+Entered fullscreen
 PASS media.paused is false
+PASS window.internals.shadowRoot(media).querySelector('.media-controls').childElementCount became 0
 
-Time progressed.
-PASS elapsedTimeWhenEnteringFullscreen === elapsedTime() is true
+Exited fullscreen
 
-Obtained a webkitpresentationmodechanged event
-media.webkitDisplayingFullscreen = false.
-PASS elapsedTimeWhenEnteringFullscreen === elapsedTime() became false
-
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: branches/safari-605-branch/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-stop-updates-in-fullscreen.html (226870 => 226871)


--- branches/safari-605-branch/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-stop-updates-in-fullscreen.html	2018-01-12 06:31:00 UTC (rev 226870)
+++ branches/safari-605-branch/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-stop-updates-in-fullscreen.html	2018-01-12 06:31:03 UTC (rev 226871)
@@ -14,31 +14,21 @@
 button.textContent = "Enter Fullscreen";
 button.style = "position: absolute; left: 0; top: 0";
 
-let elapsedTimeWhenEnteringFullscreen;
-
 media.addEventListener("webkitpresentationmodechanged", () => {
-    debug("");
-    debug("Obtained a webkitpresentationmodechanged event");
-    debug(`media.webkitDisplayingFullscreen = ${media.webkitDisplayingFullscreen}.`);
+    if (media.webkitDisplayingFullscreen) {
+        debug("");
+        debug("Entered fullscreen");
 
-    if (media.webkitDisplayingFullscreen) {
         shouldBeFalse("media.paused");
-        elapsedTimeWhenEnteringFullscreen = elapsedTime();
-
-        // Let time progress and check after a while that we didn't update the tree.
-        let timeupdateEventCount = 0;
-        media.addEventListener("timeupdate", () => {
-            timeupdateEventCount++;
-            if (timeupdateEventCount == 5) {
-                debug("");
-                debug("Time progressed.");
-                shouldBeTrue("elapsedTimeWhenEnteringFullscreen === elapsedTime()");
-                media.pause();
-                media.webkitExitFullscreen();
-            }
+        shouldBecomeEqual("window.internals.shadowRoot(media).querySelector('.media-controls').childElementCount", "0", () => {
+            media.pause();
+            media.webkitExitFullscreen();
         });
-    } else
-        shouldBecomeEqual("elapsedTimeWhenEnteringFullscreen === elapsedTime()", "false", endTest);
+    } else {
+        debug("");
+        debug("Exited fullscreen");
+        endTest();
+    }
 });
 
 media.addEventListener("play", () => {
@@ -63,11 +53,6 @@
     pressOnElement(button);
 }
 
-function elapsedTime()
-{
-    return window.internals.shadowRoot(media).querySelectorAll(".time-label")[0].textContent;
-}
-
 function startTest()
 {
     enterFullscreen();

Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (226870 => 226871)


--- branches/safari-605-branch/Source/WebCore/ChangeLog	2018-01-12 06:31:00 UTC (rev 226870)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog	2018-01-12 06:31:03 UTC (rev 226871)
@@ -1,5 +1,27 @@
 2018-01-11  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r226795. rdar://problem/36450750
+
+    2018-01-11  Antoine Quint  <grao...@apple.com>
+
+            [iOS] There should be no controls markup generated in fullscreen
+            https://bugs.webkit.org/show_bug.cgi?id=181540
+            <rdar://problem/35060379>
+
+            Reviewed by Eric Carlson.
+
+            We completely forgo the display of any content when fullscreen on iOS by setting the
+            "visible" flag to "false" on the MediaControls, which will prevent any DOM content from
+            being added.
+
+            * Modules/modern-media-controls/media/media-controller.js:
+            (MediaController.prototype.handleEvent):
+            (MediaController.prototype._updateiOSFullscreenProperties):
+            (MediaController):
+            (MediaController.prototype._updateSupportingObjectsEnabledState): Deleted.
+
+2018-01-11  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r226791. rdar://problem/36450803
 
     2018-01-10  Simon Fraser  <simon.fra...@apple.com>

Modified: branches/safari-605-branch/Source/WebCore/Modules/modern-media-controls/media/media-controller.js (226870 => 226871)


--- branches/safari-605-branch/Source/WebCore/Modules/modern-media-controls/media/media-controller.js	2018-01-12 06:31:00 UTC (rev 226870)
+++ branches/safari-605-branch/Source/WebCore/Modules/modern-media-controls/media/media-controller.js	2018-01-12 06:31:03 UTC (rev 226871)
@@ -158,7 +158,7 @@
             scheduler.flushScheduledLayoutCallbacks();
         } else if (event.currentTarget === this.media) {
             this._updateControlsIfNeeded();
-            this._updateSupportingObjectsEnabledState();
+            this._updateiOSFullscreenProperties();
             if (event.type === "webkitpresentationmodechanged")
                 this._returnMediaLayerToInlineIfNeeded();
         } else if (event.type === "keydown" && this.isFullscreen && event.key === " ") {
@@ -286,7 +286,7 @@
         this.host.textTrackContainer.classList.toggle("visible-controls-bar", !this.controls.faded);
     }
 
-    _updateSupportingObjectsEnabledState()
+    _updateiOSFullscreenProperties()
     {
         // On iOS, we want to make sure not to update controls when we're in fullscreen since the UI
         // will be completely invisible.
@@ -293,10 +293,13 @@
         if (!(this.layoutTraits & LayoutTraits.iOS))
             return;
 
-        if (this.isFullscreen)
+        const isFullscreen = this.isFullscreen;
+        if (isFullscreen)
             this._supportingObjects.forEach(supportingObject => supportingObject.disable());
         else
             this._supportingObjects.forEach(supportingObject => supportingObject.enable());
+
+        this.controls.visible = !isFullscreen;
     }
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to