jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/352546 )
Change subject: Toggle logo preloading via the skin
......................................................................
Toggle logo preloading via the skin
Bug: T100999
Change-Id: I0e18dc7fdbf133f3e4002f48f3040604687571dc
---
M includes/OutputPage.php
M includes/skins/Skin.php
2 files changed, 17 insertions(+), 1 deletion(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 5c05ad7..85610b9 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2388,7 +2388,14 @@
// jQuery etc. can work correctly.
$response->header( 'X-UA-Compatible: IE=Edge' );
- $this->addLogoPreloadLinkHeaders();
+ if ( !$this->mArticleBodyOnly ) {
+ $sk = $this->getSkin();
+
+ if ( $sk->shouldPreloadLogo() ) {
+ $this->addLogoPreloadLinkHeaders();
+ }
+ }
+
$linkHeader = $this->getLinkHeader();
if ( $linkHeader ) {
$response->header( $linkHeader );
diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php
index 99658f29..7f00767 100644
--- a/includes/skins/Skin.php
+++ b/includes/skins/Skin.php
@@ -445,6 +445,15 @@
}
/**
+ * Whether the logo should be preloaded with an HTTP link header or not
+ * @since 1.29
+ * @return bool
+ */
+ public function shouldPreloadLogo() {
+ return false;
+ }
+
+ /**
* @return string HTML
*/
function getCategoryLinks() {
--
To view, visit https://gerrit.wikimedia.org/r/352546
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0e18dc7fdbf133f3e4002f48f3040604687571dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.21
Gerrit-Owner: Gilles <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits