Title: [149942] trunk/Source/WebCore
Revision
149942
Author
grao...@apple.com
Date
2013-05-11 14:42:44 -0700 (Sat, 11 May 2013)

Log Message

[Mac] The captions menu should not use a canned max-width and max-height
https://bugs.webkit.org/show_bug.cgi?id=115968

Reviewed by Eric Carlson.

Use more real estate to display the captions menu should the caption names
be long.

* css/mediaControlsQuickTime.css:
(video::-webkit-media-controls-closed-captions-container):
(video::-webkit-media-controls-closed-captions-track-list):
Make the captions menu scale to a max-width and max-height to allow 4px
above and below the menu, except on the right where it always aligns with
the captions icon in the media controller.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::createControls):
Move the captions menu element to be a child of the controls instead of
the panel such that it may scale relative to the controls when using %
CSS values.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149941 => 149942)


--- trunk/Source/WebCore/ChangeLog	2013-05-11 21:07:51 UTC (rev 149941)
+++ trunk/Source/WebCore/ChangeLog	2013-05-11 21:42:44 UTC (rev 149942)
@@ -1,3 +1,25 @@
+2013-05-11  Antoine Quint  <grao...@apple.com>
+
+        [Mac] The captions menu should not use a canned max-width and max-height
+        https://bugs.webkit.org/show_bug.cgi?id=115968
+
+        Reviewed by Eric Carlson.
+
+        Use more real estate to display the captions menu should the caption names
+        be long.
+
+        * css/mediaControlsQuickTime.css:
+        (video::-webkit-media-controls-closed-captions-container):
+        (video::-webkit-media-controls-closed-captions-track-list):
+        Make the captions menu scale to a max-width and max-height to allow 4px
+        above and below the menu, except on the right where it always aligns with
+        the captions icon in the media controller.
+        * html/shadow/MediaControlsApple.cpp:
+        (WebCore::MediaControlsApple::createControls):
+        Move the captions menu element to be a child of the controls instead of
+        the panel such that it may scale relative to the controls when using %
+        CSS values.
+
 2013-05-11  Jochen Eisinger  <joc...@chromium.org>
 
         Disallow a window to focus itself via _javascript_ URLs or using target _self

Modified: trunk/Source/WebCore/css/mediaControlsQuickTime.css (149941 => 149942)


--- trunk/Source/WebCore/css/mediaControlsQuickTime.css	2013-05-11 21:07:51 UTC (rev 149941)
+++ trunk/Source/WebCore/css/mediaControlsQuickTime.css	2013-05-11 21:42:44 UTC (rev 149942)
@@ -252,6 +252,10 @@
     display: block;
     right: 38px;
     bottom: 29px;
+    max-width: -webkit-calc(100% - 48px); /* right + 10px */
+    max-height: -webkit-calc(100% - 39px); /* bottom + 10px */
+    overflow-x: hidden;
+    overflow-y: scroll;
     background-color: rgba(0, 0, 0, 0.85);
     border: 3px solid rgba(128, 128, 128, 0.75);
     border-radius: 10px;
@@ -261,10 +265,6 @@
 
 video::-webkit-media-controls-closed-captions-track-list {
     display: block;
-    max-width: 250px;
-    max-height: 250px;
-    overflow-x: hidden;
-    overflow-y: scroll;
     text-align: left;
     font-family: "Helvetica Bold", Helvetica;
     font-size: 10pt;

Modified: trunk/Source/WebCore/html/shadow/MediaControlsApple.cpp (149941 => 149942)


--- trunk/Source/WebCore/html/shadow/MediaControlsApple.cpp	2013-05-11 21:07:51 UTC (rev 149941)
+++ trunk/Source/WebCore/html/shadow/MediaControlsApple.cpp	2013-05-11 21:42:44 UTC (rev 149942)
@@ -163,7 +163,7 @@
             return 0;
 
         controls->m_closedCaptionsContainer = closedCaptionsContainer.get();
-        panel->appendChild(closedCaptionsContainer.release(), ec, AttachLazily);
+        controls->appendChild(closedCaptionsContainer.release(), ec, AttachLazily);
         if (ec)
             return 0;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to