Title: [114179] trunk
Revision
114179
Author
jer.no...@apple.com
Date
2012-04-13 16:27:38 -0700 (Fri, 13 Apr 2012)

Log Message

fullscreen/video-controls-drag.html failing on Mac
https://bugs.webkit.org/show_bug.cgi?id=81176

Reviewed by Eric Carlson.

Source/WebCore:

No new tests.  Fixes fullscreen/video-controls-drag.html.

Regressed in r110409.  When the -webkit-media-controls-panel were changed
from position:absolute to position:relative, this broke dragging of the
controls in fullscreen, which relies on the panel being absolutely positioned
to do its drag positioning. Change the way drag positioning is calculated to
accommodate position:relative.

* css/fullscreenQuickTime.css:
(video:-webkit-full-screen::-webkit-media-controls-panel): Instead of bottom:50px,
    use margin-bottom:50px to push panel up from the bottom of the screen.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::startDrag): Do not ask for the current renderer location.
(WebCore::MediaControlPanelElement::continueDrag): Use the delta between the event locations
    only to calculate the new panel position.
* html/shadow/MediaControlElements.h:

LayoutTests:

Removed expected failing results from platform/mac.

* platform/mac/fullscreen/video-controls-drag-expected.txt: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (114178 => 114179)


--- trunk/LayoutTests/ChangeLog	2012-04-13 23:25:34 UTC (rev 114178)
+++ trunk/LayoutTests/ChangeLog	2012-04-13 23:27:38 UTC (rev 114179)
@@ -1,3 +1,14 @@
+2012-04-13  Jer Noble  <jer.no...@apple.com>
+
+        fullscreen/video-controls-drag.html failing on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=81176
+
+        Reviewed by Eric Carlson.
+
+        Removed expected failing results from platform/mac.
+
+        * platform/mac/fullscreen/video-controls-drag-expected.txt: Removed.
+
 2012-04-13  Simon Fraser  <simon.fra...@apple.com>
 
         Fix two compositing animation tests to not have flakey pixel results

Deleted: trunk/LayoutTests/platform/mac/fullscreen/video-controls-drag-expected.txt (114178 => 114179)


--- trunk/LayoutTests/platform/mac/fullscreen/video-controls-drag-expected.txt	2012-04-13 23:25:34 UTC (rev 114178)
+++ trunk/LayoutTests/platform/mac/fullscreen/video-controls-drag-expected.txt	2012-04-13 23:27:38 UTC (rev 114179)
@@ -1,7 +0,0 @@
-This tests that the video element's controls are draggable in full screen. Press any key to continue.
-
-EVENT(webkitfullscreenchange)
-EXPECTED (endBox.left - startBox.left == '15'), OBSERVED '-385' FAIL
-EXPECTED (endBox.top - startBox.top == '15'), OBSERVED '605' FAIL
-END OF TEST
-

Modified: trunk/Source/WebCore/ChangeLog (114178 => 114179)


--- trunk/Source/WebCore/ChangeLog	2012-04-13 23:25:34 UTC (rev 114178)
+++ trunk/Source/WebCore/ChangeLog	2012-04-13 23:27:38 UTC (rev 114179)
@@ -1,3 +1,27 @@
+2012-04-13  Jer Noble  <jer.no...@apple.com>
+
+        fullscreen/video-controls-drag.html failing on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=81176
+
+        Reviewed by Eric Carlson.
+
+        No new tests.  Fixes fullscreen/video-controls-drag.html.
+
+        Regressed in r110409.  When the -webkit-media-controls-panel were changed
+        from position:absolute to position:relative, this broke dragging of the 
+        controls in fullscreen, which relies on the panel being absolutely positioned
+        to do its drag positioning. Change the way drag positioning is calculated to
+        accommodate position:relative.
+
+        * css/fullscreenQuickTime.css:
+        (video:-webkit-full-screen::-webkit-media-controls-panel): Instead of bottom:50px,
+            use margin-bottom:50px to push panel up from the bottom of the screen.
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlPanelElement::startDrag): Do not ask for the current renderer location.
+        (WebCore::MediaControlPanelElement::continueDrag): Use the delta between the event locations
+            only to calculate the new panel position.
+        * html/shadow/MediaControlElements.h:
+
 2012-04-13  Simon Fraser  <simon.fra...@apple.com>
 
         Compositing layers not updated after scroll in WebKit1

Modified: trunk/Source/WebCore/css/fullscreenQuickTime.css (114178 => 114179)


--- trunk/Source/WebCore/css/fullscreenQuickTime.css	2012-04-13 23:25:34 UTC (rev 114178)
+++ trunk/Source/WebCore/css/fullscreenQuickTime.css	2012-04-13 23:27:38 UTC (rev 114179)
@@ -32,6 +32,7 @@
     padding: 12px 0 0 10px !important;
     width: 430px !important;
     height: 48px !important;
+    margin: 0 auto 50px auto !important;
     
     background-image: -webkit-gradient(
         linear,
@@ -55,12 +56,6 @@
     -webkit-transition: opacity 0.3s linear !important;
 }
 
-video:-webkit-full-screen::-webkit-media-controls-panel:not(.dragged) {
-    bottom: 50px !important;
-    left: 50% !important;
-    margin-left: -220px !important;
-}
-
 video:-webkit-animating-full-screen-transition::-webkit-media-controls-panel {
     opacity: 0 ! important;
     -webkit-transition: opacity 0 ! important;

Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (114178 => 114179)


--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp	2012-04-13 23:25:34 UTC (rev 114178)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp	2012-04-13 23:27:38 UTC (rev 114179)
@@ -145,7 +145,6 @@
     if (!frame)
         return;
 
-    m_dragStartPosition = toRenderBox(renderer)->location();
     m_dragStartEventLocation = eventLocation;
 
     frame->eventHandler()->setCapturingMouseEventsNode(this);
@@ -159,7 +158,7 @@
         return;
 
     LayoutSize distanceDragged = eventLocation - m_dragStartEventLocation;
-    setPosition(m_dragStartPosition + distanceDragged);
+    setPosition(LayoutPoint(distanceDragged.width(), distanceDragged.height()));
 }
 
 void MediaControlPanelElement::endDrag()

Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.h (114178 => 114179)


--- trunk/Source/WebCore/html/shadow/MediaControlElements.h	2012-04-13 23:25:34 UTC (rev 114178)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.h	2012-04-13 23:27:38 UTC (rev 114179)
@@ -132,7 +132,6 @@
     bool m_canBeDragged;
     bool m_isBeingDragged;
     bool m_opaque;
-    LayoutPoint m_dragStartPosition;
     LayoutPoint m_dragStartEventLocation;
 
     Timer<MediaControlPanelElement> m_transitionTimer;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to