mediawiki.util: Remove deprecated tooltipAccessKeyPrefix/tooltipAccessKeyRegexp
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 27 Aug 2016 22:36:59 +0000 (15:36 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 1 Sep 2016 02:16:21 +0000 (19:16 -0700)
* 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

RELEASE-NOTES-1.28
resources/src/mediawiki/mediawiki.util.js
tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js

index 600ac70..fa7d9ca 100644 (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
index 2ce54e4..294b5de 100644 (file)
         */
        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.
         *
index d697507..4eac362 100644 (file)
                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' );