Layout tests fullscreen/video-controls-drag.html and media/video-fullscreeen-only...
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Jun 2015 18:39:08 +0000 (18:39 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Jun 2015 18:39:08 +0000 (18:39 +0000)
fail on WK1 and WK2
https://bugs.webkit.org/show_bug.cgi?id=145675

Reviewed by Dean Jackson.

Source/WebCore:

No new tests, changes covered by existing tests.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateControls): Use shouldHaveControls() to test if controls should
  be visible.
(Controller.prototype.handleWrapperMouseMove): Don't return early when in fullscreen.
(Controller.prototype.updateFullscreenButtons): Drive-by fix: always show the (exit) fullscreen
  button when in fullscreen.

LayoutTests:

* TestExpectations: Unskip tests.
* fullscreen/video-controls-drag.html: Minor cleanup, force layout before testing control location.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185258 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fullscreen/video-controls-drag.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacontrols/mediaControlsApple.js

index 7cb034e..b8c2cae 100644 (file)
@@ -1,3 +1,14 @@
+2015-06-05  Eric Carlson  <eric.carlson@apple.com>
+
+        Layout tests fullscreen/video-controls-drag.html and media/video-fullscreeen-only-controls.html
+        fail on WK1 and WK2
+        https://bugs.webkit.org/show_bug.cgi?id=145675
+
+        Reviewed by Dean Jackson.
+
+        * TestExpectations: Unskip tests.
+        * fullscreen/video-controls-drag.html: Minor cleanup, force layout before testing control location.
+
 2015-06-05  Zalan Bujtas  <zalan@apple.com>
 
         [iOS] Rebaseline expected results.
index 8b1486e..fc68001 100644 (file)
@@ -525,6 +525,3 @@ webkit.org/b/144540 fast/frames/flattening/crash-remove-iframe-during-object-bef
 webkit.org/b/145007 js/regress-141098.html [ Skip ]
 
 webkit.org/b/145390 storage/indexeddb/deleteIndex-bug110792.html [ Pass Failure ]
-
-webkit.org/b/145675 fullscreen/video-controls-drag.html [ Skip ]
-webkit.org/b/145675 media/video-fullscreeen-only-controls.html [ Skip ]
index 0f0df62..45a726c 100644 (file)
@@ -5,18 +5,17 @@
     <script src="../media/media-controls.js"></script>
     <script>
         var video = document.getElementById('video');
-        var shadowRoot;
         var panel;
         var startBox;
         var endBox;
 
-        var fullscreenChanged = function(event)
-        {
-            if (callback)
-                callback(event)
-        };
         waitForEvent(document, 'webkitfullscreenchange', function() {
             if (window.internals) {
+
+                // Force a relayout to ensure that the controls in the shadow DOM have been 
+                // positioned correctly.
+                document.body.offsetTop;
+
                 panel = mediaControlsElement(internals.shadowRoot(video).firstChild, '-webkit-media-controls-panel');
                 startBox = internals.boundingBox(panel);
 
index 976c7da..01385a7 100644 (file)
@@ -1,3 +1,21 @@
+2015-06-05  Eric Carlson  <eric.carlson@apple.com>
+
+        Layout tests fullscreen/video-controls-drag.html and media/video-fullscreeen-only-controls.html
+        fail on WK1 and WK2
+        https://bugs.webkit.org/show_bug.cgi?id=145675
+
+        Reviewed by Dean Jackson.
+
+        No new tests, changes covered by existing tests.
+
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.updateControls): Use shouldHaveControls() to test if controls should
+          be visible.
+        (Controller.prototype.handleWrapperMouseMove): Don't return early when in fullscreen.
+        (Controller.prototype.updateFullscreenButtons): Drive-by fix: always show the (exit) fullscreen
+          button when in fullscreen.
+          
+
 2015-06-04  David Hyatt  <hyatt@apple.com>
 
         Underlines too close in vertical Chinese text.
index 2419be5..9806538 100644 (file)
@@ -612,7 +612,7 @@ Controller.prototype = {
         this.updateLayoutForDisplayedWidth();
         this.setNeedsTimelineMetricsUpdate();
 
-        if (this.video.controls || this.isFullScreen()) {
+        if (this.shouldHaveControls()) {
             this.controls.panel.classList.add(this.ClassNames.show);
             this.controls.panel.classList.remove(this.ClassNames.hidden);
             this.resetHideControlsTimer();
@@ -788,7 +788,7 @@ Controller.prototype = {
 
     handleWrapperMouseMove: function(event)
     {
-        if (!this.video.controls)
+        if (!this.video.controls && !this.isFullScreen())
             return;
 
         if (this.controlsAreHidden())
@@ -1024,7 +1024,7 @@ Controller.prototype = {
     updateFullscreenButtons: function()
     {
         var shouldBeHidden = !this.video.webkitSupportsFullscreen || !this.hasVideo();
-        this.controls.fullscreenButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden);
+        this.controls.fullscreenButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden && !this.isFullScreen());
         this.controls.optimizedFullscreenButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden);
         this.setNeedsUpdateForDisplayedWidth();
         this.updateLayoutForDisplayedWidth();