From: Andrew Keller Date: Mon, 17 Feb 2014 14:25:13 +0000 (-0500) Subject: gitweb: Avoid overflowing page body frame with large images X-Git-Tag: v2.0.0-rc0~125^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46a7471f0e20af9d2efcc4a14c76d537e1551ac9;p=thirdparty%2Fgit.git gitweb: Avoid overflowing page body frame with large images When displaying a blob in gitweb, if it's an image, specify constraints for maximum display width and height to prevent the image from overflowing the frame of the enclosing page_body div. This change assumes that it is more desirable to see the whole image without scrolling (new behavior) than it is to see every pixel without zooming (previous behavior). Signed-off-by: Andrew Keller Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 3bc0f0b5ca..79057b7d0e 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -7094,7 +7094,7 @@ sub git_blob { git_print_page_path($file_name, "blob", $hash_base); print "
\n"; if ($mimetype =~ m!^image/!) { - print qq!