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.
|
its dimensions also need to match the corresponding variable below.
|
||||||
That in turn may result in blurry images, though.
|
That in turn may result in blurry images, though.
|
||||||
|
|
||||||
|
The URL can be absolute or relative.
|
||||||
|
|
||||||
Example configuration:
|
Example configuration:
|
||||||
|
|
||||||
$wgVectorPrintLogo = [
|
$wgVectorPrintLogo = [
|
||||||
|
|
|
@ -44,8 +44,7 @@ class ResourceLoaderLessModule extends ResourceLoaderFileModule {
|
||||||
$printLogo = $config->get( 'VectorPrintLogo' );
|
$printLogo = $config->get( 'VectorPrintLogo' );
|
||||||
if ( $printLogo ) {
|
if ( $printLogo ) {
|
||||||
$lessVars[ 'printLogo' ] = true;
|
$lessVars[ 'printLogo' ] = true;
|
||||||
$lessVars[ 'printLogoUrl' ] = CSSMin::buildUrlValue(
|
$lessVars[ 'printLogoUrl' ] = CSSMin::buildUrlValue( $printLogo['url'] );
|
||||||
CSSMin::encodeImageAsDataURI( $printLogo['url'] ) );
|
|
||||||
$lessVars[ 'printLogoWidth' ] = intval( $printLogo['width'] );
|
$lessVars[ 'printLogoWidth' ] = intval( $printLogo['width'] );
|
||||||
$lessVars[ 'printLogoHeight' ] = intval( $printLogo['height'] );
|
$lessVars[ 'printLogoHeight' ] = intval( $printLogo['height'] );
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue