ImagePage: Remove PNG previews line for native SVG rendering
Bug: T393028 Change-Id: I15f3dd10f4f30c78ac8dfce0fd6c1eb1a3df4c8d (cherry picked from commit 21d884ce7d950aaeab990c3069575f435e2911d3)
This commit is contained in:
parent
7508435ecc
commit
4a391d63d0
1 changed files with 12 additions and 7 deletions
|
|
@ -391,22 +391,27 @@ class ImagePage extends Article {
|
|||
$this->getHookRunner()->onImageOpenShowImageInlineBefore( $this, $out );
|
||||
|
||||
if ( $this->displayImg->allowInlineDisplay() ) {
|
||||
# image
|
||||
# "Download high res version" link below the image
|
||||
# $msgsize = $this->getContext()->msg( 'file-info-size', $width_orig, $height_orig,
|
||||
# Language::formatSize( $this->displayImg->getSize() ), $mime )->escaped();
|
||||
# We'll show a thumbnail of this image
|
||||
if ( $width > $maxWidth ||
|
||||
if (
|
||||
$this->displayImg->isVectorized() &&
|
||||
$mainConfig->get( MainConfigNames::SVGNativeRendering ) === true
|
||||
) {
|
||||
// SVG that is rendered native doesn't need these links
|
||||
$msgsmall = '';
|
||||
} elseif ( $width > $maxWidth ||
|
||||
$height > $maxHeight ||
|
||||
$this->displayImg->isVectorized()
|
||||
) {
|
||||
// "Download high res version" link below the image
|
||||
// $msgsize = $this->getContext()->msg( 'file-info-size', $width_orig, $height_orig,
|
||||
// Language::formatSize( $this->displayImg->getSize() ), $mime )->escaped();
|
||||
// We'll show a thumbnail of this image
|
||||
[ $width, $height ] = $this->displayImg->getDisplayWidthHeight(
|
||||
$maxWidth, $maxHeight, $page
|
||||
);
|
||||
$linktext = $context->msg( 'show-big-image' )->escaped();
|
||||
|
||||
$thumbSizes = $this->getThumbSizes( $width_orig, $height_orig );
|
||||
# Generate thumbnails or thumbnail links as needed...
|
||||
// Generate thumbnails or thumbnail links as needed...
|
||||
$otherSizes = [];
|
||||
foreach ( $thumbSizes as $size ) {
|
||||
// We include a thumbnail size in the list, if it is
|
||||
|
|
|
|||
Loading…
Reference in a new issue