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-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/1e1514777ab915e30626229f8fd99c44fba2cb1e2a98991a51a54f63dbfa3e7a?ds=sidebyside;hp=24eefea5ad720351fb757031814e2cce219725a5fa9b7e02c88eb45bd0219e1b 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.perl b/gitweb.perl index 1c8196b..39f6641 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -7095,7 +7095,7 @@ sub git_blob { git_print_page_path($file_name, "blob", $hash_base); print "
\n"; if ($mimetype =~ m!^image/!) { - print qq!