Remove all usage of projection stylesheets
authorAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 18 Aug 2009 21:22:59 +0000 (21:22 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 18 Aug 2009 21:22:59 +0000 (21:22 +0000)
(bug 18497) We don't actually intend for any of these stylesheets to be
used for projection, so providing projection is incorrect.  Opera will
not use screen stylesheets in full-screen mode, but *only* if there's at
least one projection stylesheet present somewhere.  If we remove *all*
projection stylesheets, then theoretically it should fall back to screen
stylesheets.  I've confirmed that this works fine on my dev wiki with
Opera 9.6.

includes/OutputPage.php
includes/templates/NoLocalSettings.php
includes/templates/PHP4.php

index a7165c4..907b81f 100644 (file)
@@ -1870,14 +1870,8 @@ class OutputPage {
         */
        public function addStyle( $style, $media='', $condition='', $dir='' ) {
                $options = array();
-               // In Opera, fullscreen mode is treated as projection mode, and it causes
-               // styles set for screen to not be loaded - thus breaking the page -  so
-               // we can just append projection to the media attribute when it's screen
-               // so the browser is happy and - with no side-effects on other browsers.
-               // Also - even though we expect the media type to be lowercase, but here
-               // we force it to lowercase to be safe.
-               if ( strtolower( $media ) == 'screen' )
-                       $media .= ',projection';
+               // Even though we expect the media type to be lowercase, but here we
+               // force it to lowercase to be safe.
                if( $media )
                        $options['media'] = $media;
                if( $condition )
index 42682d6..2acc132 100644 (file)
@@ -39,7 +39,7 @@ foreach( $topdirs as $dir ){
        <head>
                <title>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></title>
                <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
-               <style type='text/css' media='screen, projection'>
+               <style type='text/css' media='screen'>
                        html, body {
                                color: #000;
                                background-color: #fff;
index 058351a..c409a5e 100644 (file)
@@ -31,7 +31,7 @@ if ( preg_match( '!^(.*)/config/[^/]*.php$!', $scriptUrl, $m ) ) {
        <head>
                <title>MediaWiki <?php echo htmlspecialchars( $wgVersion ); ?></title>
                <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
-               <style type='text/css' media='screen, projection'>
+               <style type='text/css' media='screen'>
                        html, body {
                                color: #000;
                                background-color: #fff;