r109145 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109144‎ | r109145 | r109146 >
Date:13:53, 17 January 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
Tests found a bug, fallback fonts were not loaded because the spaces was not trimmed. addFont( " bar" ) doesn't really work.
All webfonts tests passing for me now.
Modified paths:
  • /trunk/extensions/WebFonts/resources/ext.webfonts.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/resources/ext.webfonts.js
@@ -270,7 +270,7 @@
271271 var fontFamilyItems = el.style.fontFamily.split( ',' );
272272 $.each( fontFamilyItems, function( i, fontFamily ) {
273273 // Remove the ' characters if any.
274 - fontFamily = fontFamily.replace( /'/g, '' );
 274+ fontFamily = $.trim( fontFamily.replace( /'/g, '' ) );
275275 mw.webfonts.addFont( fontFamily );
276276 });
277277 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109138More test cases for webfonts...santhosh12:14, 17 January 2012

Status & tagging log