From: Trevor Parscal Date: Fri, 31 Jul 2009 17:18:49 +0000 (+0000) Subject: Added evil hack for Opera projection css media mode compatibility. X-Git-Tag: 1.31.0-rc.0~40598 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=fc359e16f132aacbf0da3290518cb5a27b022c52;p=lhc%2Fweb%2Fwiklou.git Added evil hack for Opera projection css media mode compatibility. --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index e19ac7da0f..6f1831214b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1894,6 +1894,14 @@ 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'; if( $media ) $options['media'] = $media; if( $condition )