TheDJ has submitted this change and it was merged.

Change subject: Remove the $wgHandheldStyle config variable entirely
......................................................................


Remove the $wgHandheldStyle config variable entirely

Added back in 2008 (dc821ec1 / r38116), it was only ever implemented
for Monobook and didn't do anything in other skins.

The only use-case given was using Chick's CSS for mobile devices with
Monobook being the default skin - and now Chick is no more and
Monobook isn't the default.

It was also used to decide whether to load styles from
MediaWiki:Handheld.css (they were loaded if it was set to anything).
That message has been removed as well.

Bug: 47504
Change-Id: Ia8d79b4a637a227eb1879fbb874173fdd9bd6d99
---
M RELEASE-NOTES-1.22
M includes/DefaultSettings.php
M includes/resourceloader/ResourceLoaderSiteModule.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
M maintenance/language/messageTypes.inc
M maintenance/language/messages.inc
M skins/MonoBook.php
8 files changed, 2 insertions(+), 32 deletions(-)

Approvals:
  TheDJ: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 168f2f7..cd7971b 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -23,6 +23,7 @@
   It is still set to true for extension compatibility but doing so in 
extensions is deprecated.
 * $wgXhtmlDefaultNamespace is no longer used by core. Setting it will no 
longer change the
   xmlns used by MediaWiki. Reliance on this variable by extensions is 
deprecated.
+* $wgHandheldStyle was removed.
 
 === New features in 1.22 ===
 * (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements 
and attributes.
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 2cb0a36..819e9a3 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -2646,20 +2646,6 @@
 $wgSkipSkins = array();
 
 /**
- * Optionally, we can specify a stylesheet to use for media="handheld".
- * This is recognized by some, but not all, handheld/mobile/PDA browsers.
- * If left empty, compliant handheld browsers won't pick up the skin
- * stylesheet, which is specified for 'screen' media.
- *
- * Can be a complete URL, base-relative path, or $wgStylePath-relative path.
- * Try 'chick/main.css' to apply the Chick styles to the MonoBook HTML.
- *
- * Will also be switched in when 'handheld=yes' is added to the URL, like
- * the 'printable=yes' mode for print media.
- */
-$wgHandheldStyle = false;
-
-/**
  * If set, 'screen' and 'handheld' media specifiers for stylesheets are
  * transformed such that they apply to the iPhone/iPod Touch Mobile Safari,
  * which doesn't recognize 'handheld' but does support media queries on its
diff --git a/includes/resourceloader/ResourceLoaderSiteModule.php 
b/includes/resourceloader/ResourceLoaderSiteModule.php
index 340d7df..05754d3 100644
--- a/includes/resourceloader/ResourceLoaderSiteModule.php
+++ b/includes/resourceloader/ResourceLoaderSiteModule.php
@@ -37,7 +37,7 @@
         * @return Array: List of pages
         */
        protected function getPages( ResourceLoaderContext $context ) {
-               global $wgUseSiteJs, $wgUseSiteCss, $wgHandheldStyle;
+               global $wgUseSiteJs, $wgUseSiteCss;
 
                $pages = array();
                if ( $wgUseSiteJs ) {
@@ -50,11 +50,6 @@
 
                }
                $pages['MediaWiki:Print.css'] = array( 'type' => 'style', 
'media' => 'print' );
-               if ( $wgHandheldStyle ) {
-                       $pages['MediaWiki:Handheld.css'] = array(
-                               'type' => 'style',
-                               'media' => 'handheld' );
-               }
                return $pages;
        }
 
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 3fb49ce..f11e0b3 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -3747,7 +3747,6 @@
 'modern.css'              => '/* CSS placed here will affect users of the 
Modern skin */', # only translate this message to other languages if you have 
to change it
 'vector.css'              => '/* CSS placed here will affect users of the 
Vector skin */', # only translate this message to other languages if you have 
to change it
 'print.css'               => '/* CSS placed here will affect the print output 
*/', # only translate this message to other languages if you have to change it
-'handheld.css'            => '/* CSS placed here will affect handheld devices 
based on the skin configured in $wgHandheldStyle */', # only translate this 
message to other languages if you have to change it
 'noscript.css'            => '/* CSS placed here will affect users with 
JavaScript disabled */', # only translate this message to other languages if 
you have to change it
 'group-autoconfirmed.css' => '/* CSS placed here will affect autoconfirmed 
users only */', # only translate this message to other languages if you have to 
change it
 'group-bot.css'           => '/* CSS placed here will affect bots only */', # 
only translate this message to other languages if you have to change it
diff --git a/languages/messages/MessagesQqq.php 
b/languages/messages/MessagesQqq.php
index b8f1a12..7c4d4a8 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -6738,8 +6738,6 @@
 'modern.css' => '{{optional}}',
 'vector.css' => '{{optional}}',
 'print.css' => '{{optional}}',
-'handheld.css' => '{{optional}}
-Style that can be applied on [[w:handheld devices|handheld devices]] (e.g. 
mobile phones), <code>$wgHandheldStyle</code> is an optional configuration 
variable which specifies a style sheet file for handheld devices.',
 'noscript.css' => '{{optional}}',
 'group-autoconfirmed.css' => '{{doc-group|autoconfirmed|css}}',
 'group-bot.css' => '{{doc-group|bot|css}}',
diff --git a/maintenance/language/messageTypes.inc 
b/maintenance/language/messageTypes.inc
index 87c4000..17feaf9 100644
--- a/maintenance/language/messageTypes.inc
+++ b/maintenance/language/messageTypes.inc
@@ -317,7 +317,6 @@
        'modern.css',
        'vector.css',
        'print.css',
-       'handheld.css',
        'noscript.css',
        'group-autoconfirmed.css',
        'group-bot.css',
diff --git a/maintenance/language/messages.inc 
b/maintenance/language/messages.inc
index 876b03d..c362963 100644
--- a/maintenance/language/messages.inc
+++ b/maintenance/language/messages.inc
@@ -2672,7 +2672,6 @@
                'modern.css',
                'vector.css',
                'print.css',
-               'handheld.css',
                'noscript.css',
                'group-autoconfirmed.css',
                'group-bot.css',
diff --git a/skins/MonoBook.php b/skins/MonoBook.php
index aeeb0f8..e805aca 100644
--- a/skins/MonoBook.php
+++ b/skins/MonoBook.php
@@ -43,16 +43,9 @@
         * @param $out OutputPage
         */
        function setupSkinUserCss( OutputPage $out ) {
-               global $wgHandheldStyle;
                parent::setupSkinUserCss( $out );
 
                $out->addModuleStyles( 'skins.monobook' );
-
-               // Ugh. Can't do this properly because $wgHandheldStyle may be 
a URL
-               if ( $wgHandheldStyle ) {
-                       // Currently in testing... try 'chick/main.css'
-                       $out->addStyle( $wgHandheldStyle, 'handheld' );
-               }
 
                // TODO: Migrate all of these
                $out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' );

-- 
To view, visit https://gerrit.wikimedia.org/r/60259
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8d79b4a637a227eb1879fbb874173fdd9bd6d99
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Matmarex <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to