r54109 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54108‎ | r54109 | r54110 >
Date:17:18, 31 July 2009
Author:tparscal
Status:ok (Comments)
Tags:
Comment:
Added evil hack for Opera projection css media mode compatibility.
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1894,6 +1894,14 @@
18951895 */
18961896 public function addStyle( $style, $media='', $condition='', $dir='' ) {
18971897 $options = array();
 1898+ // In Opera, fullscreen mode is treated as projection mode, and it causes
 1899+ // styles set for screen to not be loaded - thus breaking the page - so
 1900+ // we can just append projection to the media attribute when it's screen
 1901+ // so the browser is happy and - with no side-effects on other browsers.
 1902+ // Also - even though we expect the media type to be lowercase, but here
 1903+ // we force it to lowercase to be safe.
 1904+ if ( strtolower( $media ) == 'screen' )
 1905+ $media .= ',projection';
18981906 if( $media )
18991907 $options['media'] = $media;
19001908 if( $condition )

Follow-up revisions

RevisionCommit summaryAuthorDate
r54326Added release notes for changes in r54109 - a fix to bug #18497 which caused ...tparscal23:43, 3 August 2009

Comments

#Comment by Simetrical (talk | contribs)   17:34, 2 August 2009

Has this bug been reported to Opera?

#Comment by Brion VIBBER (talk | contribs)   23:35, 3 August 2009

This is bug 18497, and yes Opera is aware; David Storey pinged me to check in on the issue.

Their interpretation of the CSS spec apparently differs from ours, as they think they're doing it right. :)

Missing release notes entry and bugzilla fix.

#Comment by Brion VIBBER (talk | contribs)   00:05, 4 August 2009

Notes added in r54326, now OK.

Status & tagging log