mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-11 16:59:09 +00:00
Print logo should use an absolute URI
The logo is configured as a relative URL. CSSMin encodeImageAsDataURI requires a file path. There seems to be no reason to use a data uri here. The print stylesheet is loaded on page load so the image will be downloaded before a print action takes place. Inspecting I788bcecadf26e4e5558b5b37e6fb1b2e9378277e using a data uri makes little difference to the synchronous nature of a print. Bug: T177800 Change-Id: I0254ae8e360f09fe1c786695510550c7fec02026
This commit is contained in:
parent
100ec7e9a2
commit
e2e3acf76a
|
@ -14,6 +14,8 @@ below. Alternatively, a PNG or other type of image can be used, but
|
|||
its dimensions also need to match the corresponding variable below.
|
||||
That in turn may result in blurry images, though.
|
||||
|
||||
The URL can be absolute or relative.
|
||||
|
||||
Example configuration:
|
||||
|
||||
$wgVectorPrintLogo = [
|
||||
|
|
|
@ -44,8 +44,7 @@ class ResourceLoaderLessModule extends ResourceLoaderFileModule {
|
|||
$printLogo = $config->get( 'VectorPrintLogo' );
|
||||
if ( $printLogo ) {
|
||||
$lessVars[ 'printLogo' ] = true;
|
||||
$lessVars[ 'printLogoUrl' ] = CSSMin::buildUrlValue(
|
||||
CSSMin::encodeImageAsDataURI( $printLogo['url'] ) );
|
||||
$lessVars[ 'printLogoUrl' ] = CSSMin::buildUrlValue( $printLogo['url'] );
|
||||
$lessVars[ 'printLogoWidth' ] = intval( $printLogo['width'] );
|
||||
$lessVars[ 'printLogoHeight' ] = intval( $printLogo['height'] );
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue