mediawiki.util: Remove deprecated tooltipAccessKeyPrefix/tooltipAccessKeyRegexp

* Deprecated since MediaWiki 1.24.
* No longer used anywhere in Wikimedia Git.
* No longer used anywhere in MediaWiki-namespace on Wikimedia wikis.

Fixes performance issue uncovered in T144070. Would otherwise have
been addressed through a getter of sorts.

Change-Id: Ib323b7a63c5a2e8d36c5f105d0554a7216339b07
This commit is contained in:
Timo Tijhof 2016-08-27 15:36:59 -07:00
parent b671110a2a
commit c77a9e5f08
3 changed files with 2 additions and 40 deletions

View file

@ -128,6 +128,8 @@ changes to languages because of Phabricator reports.
login and visiting the login page while already logged in.
* ResourceLoader::makeLoaderURL() was removed (deprecated since 1.24).
* $.fn.liveAndTestAtStart was removed (deprecated since 1.24).
* mw.util.tooltipAccessKeyPrefix was removed (deprecated since 1.24).
* mw.util.tooltipAccessKeyRegexp was removed (deprecated since 1.24).
* Linker::link() and Linker::linkKnown() were deprecated; please instead use
MediaWiki\Linker\LinkRenderer. In addition, the LinkBegin and LinkEnd hooks
were replaced by HtmlPageLinkRendererBegin and HtmlPageLinkRendererEnd

View file

@ -511,32 +511,6 @@
*/
mw.log.deprecate( util, 'wikiGetlink', util.getUrl, 'Use mw.util.getUrl instead.' );
/**
* Access key prefix. Might be wrong for browsers implementing the accessKeyLabel property.
* @property {string} tooltipAccessKeyPrefix
* @deprecated since 1.24 Use the module jquery.accessKeyLabel instead.
*/
mw.log.deprecate( util, 'tooltipAccessKeyPrefix', $.fn.updateTooltipAccessKeys.getAccessKeyPrefix(), 'Use jquery.accessKeyLabel instead.' );
/**
* Regex to match accesskey tooltips.
*
* Should match:
*
* - "[ctrl-option-x]"
* - "[alt-shift-x]"
* - "[ctrl-alt-x]"
* - "[ctrl-x]"
*
* The accesskey is matched in group $6.
*
* Will probably not work for browsers implementing the accessKeyLabel property.
*
* @property {RegExp} tooltipAccessKeyRegexp
* @deprecated since 1.24 Use the module jquery.accessKeyLabel instead.
*/
mw.log.deprecate( util, 'tooltipAccessKeyRegexp', /\[(ctrl-)?(option-)?(alt-)?(shift-)?(esc-)?(.)\]$/, 'Use jquery.accessKeyLabel instead.' );
/**
* Add the appropriate prefix to the accesskey shown in the tooltip.
*

View file

@ -237,20 +237,6 @@
assert.strictEqual( mw.util.getParamValue( 'TEST', url ), 'a b+c d', 'Bug 30441: getParamValue must understand "+" encoding of space (multiple spaces)' );
} );
QUnit.test( 'tooltipAccessKey', 4, function ( assert ) {
this.suppressWarnings();
assert.equal( typeof mw.util.tooltipAccessKeyPrefix, 'string', 'tooltipAccessKeyPrefix must be a string' );
assert.equal( $.type( mw.util.tooltipAccessKeyRegexp ), 'regexp', 'tooltipAccessKeyRegexp is a regexp' );
assert.ok( mw.util.updateTooltipAccessKeys, 'updateTooltipAccessKeys is non-empty' );
'Example [a]'.replace( mw.util.tooltipAccessKeyRegexp, function ( sub, m1, m2, m3, m4, m5, m6 ) {
assert.equal( m6, 'a', 'tooltipAccessKeyRegexp finds the accesskey hint' );
} );
this.restoreWarnings();
} );
QUnit.test( '$content', 2, function ( assert ) {
assert.ok( mw.util.$content instanceof jQuery, 'mw.util.$content instance of jQuery' );
assert.strictEqual( mw.util.$content.length, 1, 'mw.util.$content must have length of 1' );