Title: [164711] trunk
Revision
164711
Author
calva...@igalia.com
Date
2014-02-26 01:41:43 -0800 (Wed, 26 Feb 2014)

Log Message

[GTK] Regression when showing the captions menu
https://bugs.webkit.org/show_bug.cgi?id=129106

Reviewed by Martin Robinson.

Source/WebCore:

In some cases, when clicking the captions button the menu was not
shown.

Updated test: media/video-controls-captions-trackmenu.html

* Modules/mediacontrols/mediaControlsGtk.js:
(ControllerGtk.prototype.buildCaptionMenu):
(ControllerGtk.prototype.showCaptionMenu): Specify sizes in
pixels.

LayoutTests:

Checked in an existing test that the menu is shown then the
captions button is clicked.

* media/trackmenu-test.js:
(startTrackMenuTest): Deactivated animations
* media/video-controls-captions-trackmenu.html: Added check for
the regression we are testing.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (164710 => 164711)


--- trunk/LayoutTests/ChangeLog	2014-02-26 09:02:20 UTC (rev 164710)
+++ trunk/LayoutTests/ChangeLog	2014-02-26 09:41:43 UTC (rev 164711)
@@ -1,3 +1,18 @@
+2014-02-26  Xabier Rodriguez Calvar  <calva...@igalia.com>
+
+        [GTK] Regression when showing the captions menu
+        https://bugs.webkit.org/show_bug.cgi?id=129106
+
+        Reviewed by Martin Robinson.
+
+        Checked in an existing test that the menu is shown then the
+        captions button is clicked.
+
+        * media/trackmenu-test.js:
+        (startTrackMenuTest): Deactivated animations
+        * media/video-controls-captions-trackmenu.html: Added check for
+        the regression we are testing.
+
 2014-02-25  Frédéric Wang  <fred.w...@free.fr>
 
         Add support for minsize/maxsize attributes.

Modified: trunk/LayoutTests/media/trackmenu-test.js (164710 => 164711)


--- trunk/LayoutTests/media/trackmenu-test.js	2014-02-26 09:02:20 UTC (rev 164710)
+++ trunk/LayoutTests/media/trackmenu-test.js	2014-02-26 09:41:43 UTC (rev 164711)
@@ -18,6 +18,8 @@
 
 function startTrackMenuTest(testFunction)
 {
+    internals.suspendAnimations();
+
     if (window.eventSender) {
         consoleWrite("<br>*** Set the user language preference.");
         run("internals.setUserPreferredLanguages(['en'])");

Modified: trunk/LayoutTests/media/video-controls-captions-trackmenu.html (164710 => 164711)


--- trunk/LayoutTests/media/video-controls-captions-trackmenu.html	2014-02-26 09:02:20 UTC (rev 164710)
+++ trunk/LayoutTests/media/video-controls-captions-trackmenu.html	2014-02-26 09:41:43 UTC (rev 164711)
@@ -12,6 +12,11 @@
 
             function startTest()
             {
+                trackListElement = getTrackListElement();
+                if (!trackListElement)
+                    return;
+                testExpected("trackListElement.offsetHeight", 0, ">");
+
                 consoleWrite("<br>*** Add another text track.");
                 run('video.addTextTrack("captions", "Commentary", "ru")');
                 showTrackMenu()

Modified: trunk/Source/WebCore/ChangeLog (164710 => 164711)


--- trunk/Source/WebCore/ChangeLog	2014-02-26 09:02:20 UTC (rev 164710)
+++ trunk/Source/WebCore/ChangeLog	2014-02-26 09:41:43 UTC (rev 164711)
@@ -1,3 +1,20 @@
+2014-02-26  Xabier Rodriguez Calvar  <calva...@igalia.com>
+
+        [GTK] Regression when showing the captions menu
+        https://bugs.webkit.org/show_bug.cgi?id=129106
+
+        Reviewed by Martin Robinson.
+
+        In some cases, when clicking the captions button the menu was not
+        shown.
+
+        Updated test: media/video-controls-captions-trackmenu.html
+
+        * Modules/mediacontrols/mediaControlsGtk.js:
+        (ControllerGtk.prototype.buildCaptionMenu):
+        (ControllerGtk.prototype.showCaptionMenu): Specify sizes in
+        pixels.
+
 2014-02-26  Ryosuke Niwa  <rn...@webkit.org>
 
         Avoid unnecessary HTML Collection invalidations for id and name attribute changes

Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js (164710 => 164711)


--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js	2014-02-26 09:02:20 UTC (rev 164710)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js	2014-02-26 09:41:43 UTC (rev 164711)
@@ -157,7 +157,7 @@
         // Caption menu has to be centered to the caption button.
         var captionButtonCenter =  this.controls.panel.offsetLeft + this.controls.captionButton.offsetLeft +
             this.controls.captionButton.offsetWidth / 2;
-        this.captionMenu.style.left = (captionButtonCenter - this.captionMenu.offsetWidth / 2);
+        this.captionMenu.style.left = (captionButtonCenter - this.captionMenu.offsetWidth / 2) + 'px';
         // As height is not in the css, it needs to be specified to animate it.
         this.captionMenu.height = this.captionMenu.offsetHeight;
         this.captionMenu.style.height = 0;
@@ -170,7 +170,7 @@
 
     showCaptionMenu: function()
     {
-        this.captionMenu.style.height = this.captionMenu.height;
+        this.captionMenu.style.height = this.captionMenu.height + 'px';
     },
 
     hideCaptionMenu: function()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to