Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/248540

Change subject: Fixes for video thumbs in gallery packed-hover mode
......................................................................

Fixes for video thumbs in gallery packed-hover mode

Move some size specs from CSS inline styles to width/height attributes
or implied, so the transformations done by the gallery code work as
expected on video thumbnails.

Also helps clean up the transform output a little (see also T116428)

Bug: T77988
Change-Id: Iadb8a5213ce4aeb5d04cad435adbb9fddb4b416e
---
M TimedMediaTransformOutput.php
M resources/ext.tmh.thumbnail.css
2 files changed, 8 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/40/248540/1

diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php
index e743aa1..678f5f9 100644
--- a/TimedMediaTransformOutput.php
+++ b/TimedMediaTransformOutput.php
@@ -183,20 +183,22 @@
        function getImagePopUp(){
                // pop up videos set the autoplay attribute to true:
                $autoPlay = true;
-               return Xml::tags( 'div' , array(
+               return Xml::tags( 'span' , array(
                                'id' => self::PLAYER_ID_PREFIX . 
TimedMediaTransformOutput::$serial++,
                                'class' => 'PopUpMediaTransform',
-                               'style' => "width:" . $this->getPlayerWidth() . 
"px;",
+                               //'style' => "width:" . $this->getPlayerWidth() 
. "px;",
                                'videopayload' => $this->getHtmlMediaTagOutput( 
$this->getPopupPlayerSize(), $autoPlay ),
                                ),
                        Xml::tags( 'img', array(
                                'alt' => $this->file->getTitle(),
-                               'style' => "width:" . $this->getPlayerWidth() . 
"px;height:" .
-                                                       
$this->getPlayerHeight() . "px",
+                               //'style' => "width:" . $this->getPlayerWidth() 
. "px;height:" .
+                               //                      
$this->getPlayerHeight() . "px",
+                               'width' => $this->getPlayerWidth(),
+                               'height' => $this->getPlayerHeight(),
                                'src' =>  $this->getUrl(),
                        ),'')
                        .
-                       // For javascript disabled browsers provide a link to 
the asset:
+                       // For really, really old non-video-capable browsers 
provide a link to the asset:
                        Xml::tags( 'a', array(
                                        'href'=> $this->file->getUrl(),
                                        'title' => wfMessage( 
'timedmedia-play-media' )->escaped(),
diff --git a/resources/ext.tmh.thumbnail.css b/resources/ext.tmh.thumbnail.css
index 9464e5e..d9187dd 100644
--- a/resources/ext.tmh.thumbnail.css
+++ b/resources/ext.tmh.thumbnail.css
@@ -1,7 +1,7 @@
 .mediaContainer,
 .PopUpMediaTransform {
        position : relative;
-       display: block;
+       display: inline-block;
 }
 .thumb .mediaContainer,
 .thumb .PopUpMediaTransform {

-- 
To view, visit https://gerrit.wikimedia.org/r/248540
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadb8a5213ce4aeb5d04cad435adbb9fddb4b416e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to