Firefox doesn't seem to like displaying videos as blocks?

This commit is contained in:
Zixaphir 2014-04-04 17:28:44 -07:00
parent 66f449cced
commit 4a26b5ea14
3 changed files with 12 additions and 0 deletions

View File

@ -10792,6 +10792,10 @@
$.asap((function() {
return post.file.fullImage[naturalHeight];
}), function() {
if (isVideo) {
img.style.maxHeight = img[naturalHeight] + "px";
img.style.maxWidth = img['videoWidth'] + "px";
}
return ImageExpand.completeExpand(post);
});
return $.after((img.controls ? thumb.parentNode : thumb), img);

View File

@ -10830,6 +10830,10 @@
$.asap((function() {
return post.file.fullImage[naturalHeight];
}), function() {
if (isVideo) {
img.style.maxHeight = img[naturalHeight] + "px";
img.style.maxWidth = img['videoWidth'] + "px";
}
return ImageExpand.completeExpand(post);
});
return $.after((img.controls ? thumb.parentNode : thumb), img);

View File

@ -118,6 +118,10 @@ ImageExpand =
img.controls = Conf['Show Controls']
$.on img, 'error', ImageExpand.error
$.asap (-> post.file.fullImage[naturalHeight]), ->
if isVideo
# XXX Firefox doesn't seem to size videos correctly?
img.style.maxHeight = img[naturalHeight] + "px"
img.style.maxWidth = img['videoWidth'] + "px"
ImageExpand.completeExpand post
$.after (if img.controls then thumb.parentNode else thumb), img