Add tests for Revision::getParentLengths
[lhc/web/wiklou.git] / includes / OutputPage.php
index 7a2b7df..4635f99 100644 (file)
@@ -1976,6 +1976,7 @@ class OutputPage extends ContextSource {
         * @deprecated since 1.27 Use setCdnMaxage() instead
         */
        public function setSquidMaxage( $maxage ) {
+               wfDeprecated( __METHOD__, '1.27' );
                $this->setCdnMaxage( $maxage );
        }
 
@@ -4021,6 +4022,13 @@ class OutputPage extends ContextSource {
                        return;
                }
 
+               if ( isset( $logo['svg'] ) ) {
+                       // No media queries required if we only have a 1x and svg variant
+                       // because all preload-capable browsers support SVGs
+                       $this->addLinkHeader( '<' . $logo['svg'] . '>;rel=preload;as=image' );
+                       return;
+               }
+
                foreach ( $logo as $dppx => $src ) {
                        // Keys are in this format: "1.5x"
                        $dppx = substr( $dppx, 0, -1 );