lhc/web/wiklou.git
5 years agoMerge "resourceloader: Factor out encodeJsonForScript"
jenkins-bot [Wed, 19 Sep 2018 18:33:29 +0000 (18:33 +0000)]
Merge "resourceloader: Factor out encodeJsonForScript"

5 years agoMerge "StructureTest::testUnitTestFileNamesEndWithTest() should not shell out"
jenkins-bot [Wed, 19 Sep 2018 17:37:55 +0000 (17:37 +0000)]
Merge "StructureTest::testUnitTestFileNamesEndWithTest() should not shell out"

5 years agoMerge "Use new isTalkPage/isTalkNamespace methods"
jenkins-bot [Wed, 19 Sep 2018 17:20:53 +0000 (17:20 +0000)]
Merge "Use new isTalkPage/isTalkNamespace methods"

5 years agoMerge "DateInputWidget: Update OOUI variables to latest"
jenkins-bot [Wed, 19 Sep 2018 17:14:24 +0000 (17:14 +0000)]
Merge "DateInputWidget: Update OOUI variables to latest"

5 years agoMerge "DateTimeInputWidget: Rename vars to reflect latest WikimediaUI theme vars"
jenkins-bot [Wed, 19 Sep 2018 17:10:17 +0000 (17:10 +0000)]
Merge "DateTimeInputWidget: Rename vars to reflect latest WikimediaUI theme vars"

5 years agoMerge "Special:Preferences: Reduce PanelLayout border contrast slightly"
jenkins-bot [Wed, 19 Sep 2018 17:10:12 +0000 (17:10 +0000)]
Merge "Special:Preferences: Reduce PanelLayout border contrast slightly"

5 years agoUse new isTalkPage/isTalkNamespace methods
Ed Sanders [Thu, 13 Sep 2018 18:43:04 +0000 (19:43 +0100)]
Use new isTalkPage/isTalkNamespace methods

Change-Id: I291738ff6ebb63df2e405e98131dd80f3ddf2db6

5 years agoSpecial:Preferences: Reduce PanelLayout border contrast slightly
Volker E [Wed, 19 Sep 2018 16:13:14 +0000 (09:13 -0700)]
Special:Preferences: Reduce PanelLayout border contrast slightly

The border choice for `#a2a9b1` was intended to provide AA conforming
contrast for widgets. In case of framed PanelLayout it is not necessary
due to it's different use case and the additional high padding.

Change-Id: Ia425594c1795d1d8668cd62daff32ff9b97d67c2

5 years agoMerge "resourceloader: Remove check for Function#bind and Object.defineProperty"
jenkins-bot [Wed, 19 Sep 2018 15:43:31 +0000 (15:43 +0000)]
Merge "resourceloader: Remove check for Function#bind and Object.defineProperty"

5 years agoMerge "Avoid ResourceLoader LESS parsing bug"
jenkins-bot [Wed, 19 Sep 2018 15:33:58 +0000 (15:33 +0000)]
Merge "Avoid ResourceLoader LESS parsing bug"

5 years agoresourceloader: Remove check for Function#bind and Object.defineProperty
Timo Tijhof [Sat, 15 Sep 2018 18:46:51 +0000 (19:46 +0100)]
resourceloader: Remove check for Function#bind and Object.defineProperty

* Function#bind is a given per the explicit feature test for Grade A.
* Object.defineProperty is part of ES5 which is also tested for.

This code is from before we required ES5 and is now redundant.

Also remove the unused eslint-disable rule for global 'console' use,
the code in question does not use console as global unconditionally.

Change-Id: I6c77b25856da8b7717aeba8298b17a9231540d58

5 years agoAvoid ResourceLoader LESS parsing bug
Ed Sanders [Wed, 19 Sep 2018 11:16:56 +0000 (12:16 +0100)]
Avoid ResourceLoader LESS parsing bug

Bug: T204816
Change-Id: I4558e2c05dd3377090de11aa79f20911fa3365eb

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 19 Sep 2018 07:28:39 +0000 (09:28 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I383c3794e40e4269c1f8ddcc60ddf1bc202b5eff

5 years agoDateTimeInputWidget: Rename vars to reflect latest WikimediaUI theme vars
Volker E [Wed, 19 Sep 2018 00:33:29 +0000 (17:33 -0700)]
DateTimeInputWidget: Rename vars to reflect latest WikimediaUI theme vars

Change-Id: Icdae37127633e7fb17f77550d4900addf076cbfd

5 years agoDateInputWidget: Update OOUI variables to latest
Volker E [Tue, 18 Sep 2018 23:59:51 +0000 (16:59 -0700)]
DateInputWidget: Update OOUI variables to latest

In course of icon overhaul we've also unified base widget font-size
to `14px` in I693d168d2ccf2. DateInputWidget has been left behind.
Let's amend it and also align other variables like
`transition-medium`.

Change-Id: I033bfa17b665d7e36f6d18c3adfa0315c4b26cb0

5 years agoMerge "mediawiki.util: Optimise addPortletLink"
jenkins-bot [Tue, 18 Sep 2018 21:41:32 +0000 (21:41 +0000)]
Merge "mediawiki.util: Optimise addPortletLink"

5 years agoMerge "mediawiki.util: Improve unit tests"
jenkins-bot [Tue, 18 Sep 2018 21:30:47 +0000 (21:30 +0000)]
Merge "mediawiki.util: Improve unit tests"

5 years agomediawiki.util: Optimise addPortletLink
Timo Tijhof [Tue, 18 Sep 2018 02:15:07 +0000 (03:15 +0100)]
mediawiki.util: Optimise addPortletLink

* Use prop() instead of attr().
  - Avoids extra overhead from attr() relating to XML/SVG compat.
  - Makes the code consistent with jquery.accessKeyLabel, which,
    reads the node.accessKey value as property already, and we now
    set it the same way.

* Use append() instead of wrap().parent().
  Most use of adding portlets is as links in the sidebar or
  as menu items for the page actions menu. For this, simply
  assign the <li> directly, and append the link. Instead of
  wrapping it in the DOM and then unwrapping the jQuery
  collection. This also saves a bunch of clone operations
  internally due to how jQuery objects keep a stack of
  mutations.

* Set 'textContent' directly instead of text().

* Use $('<li>') instead of $().wrap('<li></li>') which allows jQuery
  to take a fast path for element creation. Also consistent with
  MW code conventions which say to avoid <tag></tag>.

* Use node.querySelector(str) instead of $(node).find(str).eq(0).
  The latter does a lot more, including querySelectorAll(),
  and twice a clone/push/merge of the jQuery collection.

* Use createElement() for the anchor tag, given that none of the
  remaining code needed the jQuery object anymore. The return
  value was already the DOM Node directly as well.

Bug: T204625
Change-Id: I9070f63a4c75411c0eff7757bd2d8aed46c182e9

5 years agoStructureTest::testUnitTestFileNamesEndWithTest() should not shell out
Umherirrender [Sun, 16 Sep 2018 19:44:42 +0000 (21:44 +0200)]
StructureTest::testUnitTestFileNamesEndWithTest() should not shell out

Bug: T169005
Change-Id: I17b35f31c3989ca0b9056252866a45434c31a105

5 years agoSpecial:Preferences: Enable OOUI mode by default
James D. Forrester [Tue, 18 Sep 2018 18:29:38 +0000 (11:29 -0700)]
Special:Preferences: Enable OOUI mode by default

Developers and other users can temporarily still opt out with ?ooui=0.

Bug: T117781
Change-Id: I1466e67161b5155552ffa7d80c383064913ec4dc

5 years agoUse "Unknown user" instead of an empty user name.
daniel [Mon, 28 May 2018 19:19:11 +0000 (21:19 +0200)]
Use "Unknown user" instead of an empty user name.

This changes the user name to "User unknown" when constructing a RevisionRecord
from a database row that has an empty ar_user_text resp rev_user_text field.

This may cause "User unknown" to be written to the database, if the
RevisionRecord is used as the basis for a new revision that is being created,
particularly during undeletion. Since "Unknown user" is listed in
$wgReservedUsernames, this should never lead to conflicts with actual user
names.

It is assumed that empty ar_user_text and rev_user_text fields will be
fixed during migration to the new actor based database schema.

Bug: T195692
Change-Id: I506c513b019778d83741e47f0d11093f5ab67a54

5 years agoWatchedItemStore::countVisitingWatchersMultiple() shouldn't query all titles when...
Brad Jorsch [Tue, 18 Sep 2018 16:01:32 +0000 (12:01 -0400)]
WatchedItemStore::countVisitingWatchersMultiple() shouldn't query all titles when asked for none

If a caller gives an empty array for $targetsWithVisitThresholds, per
the documentation it should be expecting an empty array in return, not a
count of watchers for every title in the database.

Bug: T204729
Change-Id: I0f25fae301450d077bb30597281aaef0fba209d4

5 years agoMerge "Allow edit.php to modify different slots."
jenkins-bot [Tue, 18 Sep 2018 15:52:02 +0000 (15:52 +0000)]
Merge "Allow edit.php to modify different slots."

5 years agoMerge "mediawiki.Title: Add isTalkPage/getTalkPage methods to mw.Title.js"
jenkins-bot [Tue, 18 Sep 2018 15:00:30 +0000 (15:00 +0000)]
Merge "mediawiki.Title: Add isTalkPage/getTalkPage methods to mw.Title.js"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 18 Sep 2018 07:14:02 +0000 (09:14 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: If4369a94a3165a063ccc3061a6f3a5e6e6487ad5

5 years agomediawiki.util: Improve unit tests
Timo Tijhof [Tue, 18 Sep 2018 02:59:08 +0000 (03:59 +0100)]
mediawiki.util: Improve unit tests

* Simplify fixture.
* Use more obvious example values.
* Add strict test for nodeType and nodeName on the return value.
  Previously it was only asserting the return value to be a Node,
  now it asserts it to be an html anchor element.
* Improve wording of some assertion messages.
* Line breaks.

Bug: T204625
Change-Id: I75442a4d86ac328410f0f7bc9976a2316f00cf95

5 years agoMerge "Article: Fix reference to view() in documentation comment"
jenkins-bot [Tue, 18 Sep 2018 02:26:10 +0000 (02:26 +0000)]
Merge "Article: Fix reference to view() in documentation comment"

5 years agoArticle: Fix reference to view() in documentation comment
Roan Kattouw [Tue, 18 Sep 2018 01:29:55 +0000 (21:29 -0400)]
Article: Fix reference to view() in documentation comment

WikiPage::view() doesn't exist; Article::view() does.

Change-Id: I3fbffa15be4cff6cb3f5c7dc5cc178102472f25b

5 years agoresourceloader: Factor out encodeJsonForScript
Timo Tijhof [Sat, 15 Sep 2018 20:51:43 +0000 (21:51 +0100)]
resourceloader: Factor out encodeJsonForScript

Follows-up dc3fc6cf81, which documented the reasoning for the
specific json flags in StartupModule. In wanting to re-use them
in a different module it became apparant that perhaps it was a
bit too conservative in only allowing the flags to be used in
a script HTTP response.

Lax the contract a little bit (that is, do more escaping) to also
allow safe re-use in HTML context.

I considered making these separate methods (e.g. forScriptResponse,
and forInlineScript) but decided not to because the vast majority
of callers would have to be forInlineScript eventhough the code
in question had no responsiblity or knowledge of it becoming an
inline script, because ResourceLoader allows most modules to
become embedded if they support a private or preview mode.

Those modes are implemented by calling makeModuleResponse, and
wrapping it an inline script. It seems appealing and simplifying
to the API to require that script output is always safe for
embedding rather than complicating the API for winning back
a literal handful of bytes in the edge case that a user-generated
string contains a '<' and was not embedded. I estimate that with
gzip, it will literally save only a single byte, even if used
multiple times. Let's focus optimisation efforts elsewhere :)

Change-Id: I7742dabba6750deecf6fbf51cf9a77ee8cbfc727

5 years agoMerge "Handle invalid input to Special:FilePath?file="
jenkins-bot [Mon, 17 Sep 2018 21:03:36 +0000 (21:03 +0000)]
Merge "Handle invalid input to Special:FilePath?file="

5 years agomediawiki.Title: Add isTalkPage/getTalkPage methods to mw.Title.js
Ed Sanders [Thu, 13 Sep 2018 18:21:30 +0000 (19:21 +0100)]
mediawiki.Title: Add isTalkPage/getTalkPage methods to mw.Title.js

These are identical to methods in Title.php

Change-Id: Ie57243bac1aa5e23bc8b1c027bcb1b83090ee433

5 years agoMerge "resourceloader: Remove unused makeCustomLoaderScript() method"
jenkins-bot [Mon, 17 Sep 2018 18:44:42 +0000 (18:44 +0000)]
Merge "resourceloader: Remove unused makeCustomLoaderScript() method"

5 years agoMerge "resources: Strip '$' and 'mw' from file closures"
jenkins-bot [Mon, 17 Sep 2018 18:41:32 +0000 (18:41 +0000)]
Merge "resources: Strip '$' and 'mw' from file closures"

5 years agoMerge "ApiQueryInfo: fix query limits for testactions"
jenkins-bot [Mon, 17 Sep 2018 14:06:26 +0000 (14:06 +0000)]
Merge "ApiQueryInfo: fix query limits for testactions"

5 years agoMerge "Introduce ContentHandler::getSecondaryDataUpdates."
jenkins-bot [Mon, 17 Sep 2018 14:06:19 +0000 (14:06 +0000)]
Merge "Introduce ContentHandler::getSecondaryDataUpdates."

5 years agoApiQueryInfo: fix query limits for testactions
Bartek Łukawski [Mon, 17 Sep 2018 11:23:36 +0000 (13:23 +0200)]
ApiQueryInfo: fix query limits for testactions

ApiBase::LIMIT_SML2 actually belongs to apihighlimits.

Change-Id: Iaa50c6be417c9681563087b80928dc49a3bbd141

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 17 Sep 2018 07:42:12 +0000 (09:42 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4c16ddd26f216b8394faf2fdec0a0efe10d1e6bd

5 years agoHandle invalid input to Special:FilePath?file=
Umherirrender [Sat, 18 Aug 2018 00:39:36 +0000 (02:39 +0200)]
Handle invalid input to Special:FilePath?file=

Bug: T175301
Change-Id: I38a05416db10de88f3bc529f5fad9697d7d6e1c2

5 years agoMerge "Give more specific error messages on Special:Redirect"
jenkins-bot [Sun, 16 Sep 2018 19:40:32 +0000 (19:40 +0000)]
Merge "Give more specific error messages on Special:Redirect"

5 years agoGive more specific error messages on Special:Redirect
Umherirrender [Sat, 18 Aug 2018 02:37:59 +0000 (04:37 +0200)]
Give more specific error messages on Special:Redirect

Added some basic tests

Bug: T202183
Change-Id: Ib0dd50ff5575a2b2093a57afce79e9f8623fa24d

5 years agoMerge "build: Updating mediawiki/mediawiki-codesniffer to 22.0.0"
jenkins-bot [Sun, 16 Sep 2018 16:13:55 +0000 (16:13 +0000)]
Merge "build: Updating mediawiki/mediawiki-codesniffer to 22.0.0"

5 years agoMerge "Ensure database is setup in MediaWikiTestCase::insertPage"
jenkins-bot [Sun, 16 Sep 2018 15:53:28 +0000 (15:53 +0000)]
Merge "Ensure database is setup in MediaWikiTestCase::insertPage"

5 years agobuild: Updating mediawiki/mediawiki-codesniffer to 22.0.0
Umherirrender [Fri, 7 Sep 2018 17:01:32 +0000 (19:01 +0200)]
build: Updating mediawiki/mediawiki-codesniffer to 22.0.0

Added spaces around .
Removed empty return statement which are not required
Removed return after phpunit markTestIncomplete,
which is throwing to exit the test, no need for a return

Change-Id: I2c80b965ee52ba09949e70ea9e7adfc58a1d89ce

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 16 Sep 2018 07:58:34 +0000 (09:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic31e0d5aef1fc08989f8d39b32a858257f43c2ef

5 years agoresourceloader: Remove unused makeCustomLoaderScript() method
Timo Tijhof [Sat, 15 Sep 2018 21:13:37 +0000 (22:13 +0100)]
resourceloader: Remove unused makeCustomLoaderScript() method

Follows-up a0809dfa5 (2015) which removed the feature for which
this would be used. No callers in MediaWiki core, Wikimedia Git,
or elsewhere indexed by Codesearch.

Bug: T65240
Change-Id: I56af8df3d072cd76a38595254812af6be268b134

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 15 Sep 2018 07:28:35 +0000 (09:28 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I13ddf57c93ab420c882f38e353898715f5770e60

5 years agoMerge "remove outdated design.txt."
jenkins-bot [Sat, 15 Sep 2018 00:30:41 +0000 (00:30 +0000)]
Merge "remove outdated design.txt."

5 years agoMerge "Release notes for MCR baseline"
jenkins-bot [Fri, 14 Sep 2018 21:30:07 +0000 (21:30 +0000)]
Merge "Release notes for MCR baseline"

5 years agoEnsure database is setup in MediaWikiTestCase::insertPage
Umherirrender [Fri, 14 Sep 2018 18:30:30 +0000 (20:30 +0200)]
Ensure database is setup in MediaWikiTestCase::insertPage

Also in editPage
Add missing @group Database

Depends-On: Id81425fff0a41c651c1967698124246befcdb032
Depends-On: If97d9e6e525465ca3879003e71dd5e67fc0afdfd
Change-Id: I3bfd478769e0907913834c9639af4375223638cc

5 years agoMerge "Give search results a consistent css class to select"
jenkins-bot [Fri, 14 Sep 2018 19:40:07 +0000 (19:40 +0000)]
Merge "Give search results a consistent css class to select"

5 years agoRelease notes for MCR baseline
daniel [Fri, 14 Sep 2018 13:43:18 +0000 (15:43 +0200)]
Release notes for MCR baseline

Change-Id: I6a9ae5642f6a39c5f35cab8c49d6636311288eb9

5 years agoIntroduce ContentHandler::getSecondaryDataUpdates.
daniel [Fri, 9 Mar 2018 22:05:47 +0000 (23:05 +0100)]
Introduce ContentHandler::getSecondaryDataUpdates.

This adds getSecondaryDataUpdates and getDeletionUpdates
to ContentHandler, and updates WikiPage and DerivedPageDataUpdates
to handle DataUpdates from all slots.

Bug: T194038
Bug: T194037
Change-Id: I75c96318f58a5cdda48484f7040ae41e6f42392a

5 years agoremove outdated design.txt.
daniel [Fri, 14 Sep 2018 14:08:02 +0000 (16:08 +0200)]
remove outdated design.txt.

While having an overview of the overall design of MediaWiki in the
code repository is a good thing, having an outdated design overview
that has not been substantially updated in 15 years is not helpful.

This is a fun historical document though, so I have put it up at
<https://www.mediawiki.org/wiki/Architecture/design.txt>.

Change-Id: I85be15a68f4ab9ac77766112e6484f2007da4eec

5 years agoAllow edit.php to modify different slots.
daniel [Fri, 14 Sep 2018 09:20:12 +0000 (11:20 +0200)]
Allow edit.php to modify different slots.

This adds --slot and --remove options to the edit.php maintenance script,
to allow content of different slots to be edited, alots to be added, and
slots to be removed.

This is needed to help with testing MCR functionality, since EditPage
does not yet support MCR.

Bug: T189220
Change-Id: I985fb5afcd5d469fc31b32d2a927f425c40fc290

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 14 Sep 2018 07:22:43 +0000 (09:22 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0d24aaefa10d74d6ed44ac77e3fe92003b4d766d

5 years agoMerge "Drop wfUseMW, deprecated in 1.26"
jenkins-bot [Fri, 14 Sep 2018 01:53:07 +0000 (01:53 +0000)]
Merge "Drop wfUseMW, deprecated in 1.26"

5 years agoMerge "mediawiki.language: Use the 'mw' global"
jenkins-bot [Fri, 14 Sep 2018 01:40:56 +0000 (01:40 +0000)]
Merge "mediawiki.language: Use the 'mw' global"

5 years agoDrop wfUseMW, deprecated in 1.26
James D. Forrester [Thu, 13 Sep 2018 19:58:58 +0000 (12:58 -0700)]
Drop wfUseMW, deprecated in 1.26

Change-Id: I291d6eace1913a651c5e7136f3f2e0216d89fac5

5 years agoMerge "mediawiki.language: Remove unused private method 'procPLURAL'"
jenkins-bot [Fri, 14 Sep 2018 00:34:05 +0000 (00:34 +0000)]
Merge "mediawiki.language: Remove unused private method 'procPLURAL'"

5 years agoresources: Strip '$' and 'mw' from file closures
Timo Tijhof [Wed, 29 Aug 2018 04:46:30 +0000 (05:46 +0100)]
resources: Strip '$' and 'mw' from file closures

Follows-up Id6d13bbea6:
- '$': mw.loader.implement does this already.
- 'mw': Use the canonical name directly.

This replaces the following patterns:

File closures (common):
- `( function ( $, mw ) {`     => `( function () {`
- `( function ( $ ) {`         => `( function () {`
- `( function ( mw ) {`        => `( function () {`
- `( function ( mw, $ ) {`     => `( function () {`

File closures (rare):
- `( function ( mw, $, OO ) {`    => `( function () {`
- `( function ( mw, OO, $ ) {`    => `( function () {`
- `( function ( mw, document ) {` => `( function () {`

Combined dom-ready and file closure (rare):
- `jQuery( function ( $ ) {` => `$( function () {
- `jQuery( function () {` => `$( function () {

Remaining references in files without a closure, as found by
the new ESLint setting (rare):
- `jQuery`    => `$`
- `mediaWiki` => `mw`

Change-Id: I7cf2426cde597259e8c6f3f6f615a1a81a0ca82b

5 years agomediawiki.language: Use the 'mw' global
Timo Tijhof [Thu, 13 Sep 2018 23:48:42 +0000 (00:48 +0100)]
mediawiki.language: Use the 'mw' global

Follows-up Id6d13bbea6.

Change-Id: I16de5ef6190aa4bb322b03416d51bbf28ff15dc9

5 years agoMerge "resourceloader: Optimise and simplify state propagation logic"
jenkins-bot [Thu, 13 Sep 2018 23:40:28 +0000 (23:40 +0000)]
Merge "resourceloader: Optimise and simplify state propagation logic"

5 years agoresourceloader: Optimise and simplify state propagation logic
Timo Tijhof [Sat, 8 Sep 2018 20:04:17 +0000 (21:04 +0100)]
resourceloader: Optimise and simplify state propagation logic

aka "handlePending 2.0",
aka "don't recurse 300x before executing a module",
aka "don't break DevTools flame graphs".

== Impact

Comparison based on viewing the default Main page on Chrome stable.
The local MediaWiki has a few extensions installed (EventLogging,
ULS, Navigation Timing).

Measured by alternating between before/after and logging 'mediaWikiLoadEnd'
from ext.navigationTiming.js, and evaluating the following on the console:
```
({ responseStart: performance.timing.responseStart - performance.timing.navigationStart,
   domInteractive: performance.timing.domInteractive - performance.timing.navigationStart,
   domComplete: performance.timing.domComplete - performance.timing.navigationStart,
   loadEventEnd: performance.timing.loadEventEnd - performance.timing.navigationStart });
```

This was repeated five times, and I picked three results based on similar
responseStart values. This provides a fairer comparison by avoiding bias of
fluctuation from the network/server. The actual values ended up slightly
favouring the older code.

| -------------- | ---------------- | ---------------- | -------- |
|                | Before           | After            | Avg diff |
| -------------- | ---------------- | ---------------- | -------- |
| responseStart  | 1044, 1001, 1016 | 1025, 1023, 1024 | +3ms     |
| domInteractive | 2080, 2069, 2059 | 1872, 2101, 2050 | -61ms    |
| domComplete    | 4361, 4239, 3927 | 3691, 4023, 3981 | -227ms   |
| loadEventEnd   | 4366, 4244, 3932 | 3691, 4023, 3982 | -282ms   |
| mwLoadEnd      | 4524, 4416, 4113 | 3994, 4320, 4297 | -147ms   |
| -------------- | ---------------- | ---------------- | -------- |

== Implementation

While technically a single logical change, this commit does
resolve multiple long-standing issues and inefficiencies.

* handlePending (now called doPropagation) was called way more
  often than needed. When a load.php response arrived with calls
  to mw.loader.implement(), each one could execute and immediately
  call handlePending().
  Now, the first implementation in a batch schedule one call
  doPropagation(), and the later ones ride along that one call.

* Most calls to handlePending were only able to execute one
  pending module, which in turn created its own handlePending
  call that started all over again. This meant that by the time
  control returned to an outer call, there was nothing left to
  do, except it still needed to continue its iteration over the
  whole registry before knowing there was nothing left to dos.

* Due to recursive calls to handlePending() from execute(), and
  due to immediate execution from implement() - as called from
  load.php or asyncEval - the stack was often already 100s of
  level deep before *starting* the execution of a module.
  Such deep stacks caused:
  - a larger memory footprint (for the stacks themselves).
  - confusing flame graphs. It was impossible to analyze
    performance of module initialisation, I typically could only
    look at code from dom-ready handlers or other events.
    The stacks were so big, they actually caused rendering
    bugs inside Chrome where higher parts of the stack would be
    trimmed, and thus related code would no longer be visually
    grouped by the same parent.
  - confusing error messages (long stack traces).

* The eager execution from mw.loader.implement() calls meant
  that it was not possible to separate the parsing/loading of
  code (by load.php and asyncEval), from the execution of code.
  Now, this is separated by a 1ms yield (in practice it's
  larger than 1ms, but it has high priority). This means that the
  batch of localStorage eval() and the batch response from
  load.php can now first do one type of work (allocating of functions
  and objects, stashing them in the registry), and then later the
  other type of work (execution of the module code) - with some
  breathing room allowed for rendering.

Bug: T127328
Bug: T202703
Change-Id: I499ae3f095545abcc03e8989f54422b1997738d3

5 years agoresources: Register easy-deflate as foreign resource
Timo Tijhof [Tue, 11 Sep 2018 02:41:19 +0000 (03:41 +0100)]
resources: Register easy-deflate as foreign resource

Change-Id: Ifc8f5a4b9346da30b0bf3b3dc25c04ce3e2778d5

5 years agoReplace 'help' with better fitting 'helpNotice' icon on tags panel
Volker E [Wed, 12 Sep 2018 21:08:50 +0000 (14:08 -0700)]
Replace 'help' with better fitting 'helpNotice' icon on tags panel

Bug: T204165
Change-Id: I90a9619c976ff37c8b7d4a9bb03a3573e00bd19d

5 years agoGive search results a consistent css class to select
Erik Bernhardson [Thu, 13 Sep 2018 18:49:59 +0000 (11:49 -0700)]
Give search results a consistent css class to select

Results with and without thumbnails only share an li, and that li
cannot be specifically targeted. Add a class to the li so anything
that wants to deal with individual results can target them.

Bug: T189242
Change-Id: I9b19c5e3d7d72d4be3a5ffdf280bf07b870ff3c0

5 years agoMerge "build: Update eslint-config-wikimedia"
jenkins-bot [Thu, 13 Sep 2018 12:27:49 +0000 (12:27 +0000)]
Merge "build: Update eslint-config-wikimedia"

5 years agoMerge "HTMLForm: Drop this never-used backwards-compatibility"
jenkins-bot [Thu, 13 Sep 2018 12:27:43 +0000 (12:27 +0000)]
Merge "HTMLForm: Drop this never-used backwards-compatibility"

5 years agoMerge "Remove unused MediaWikiTestCase::prepareConnectionForTesting"
jenkins-bot [Thu, 13 Sep 2018 09:40:18 +0000 (09:40 +0000)]
Merge "Remove unused MediaWikiTestCase::prepareConnectionForTesting"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 13 Sep 2018 07:36:06 +0000 (09:36 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie5096f881b1aab8b24a3bafde2adabd1e7405e36

5 years agoMerge "Introduce constants for fetchLanguageName(s)"
jenkins-bot [Thu, 13 Sep 2018 06:24:09 +0000 (06:24 +0000)]
Merge "Introduce constants for fetchLanguageName(s)"

5 years agoMerge "Fix html <title> for exceptions during message parsing."
jenkins-bot [Thu, 13 Sep 2018 03:34:52 +0000 (03:34 +0000)]
Merge "Fix html <title> for exceptions during message parsing."

5 years agoMerge "hooks: Drop Special{Watchlist|RecentChanges}Filters, deprecated in 1.23"
jenkins-bot [Thu, 13 Sep 2018 00:56:17 +0000 (00:56 +0000)]
Merge "hooks: Drop Special{Watchlist|RecentChanges}Filters, deprecated in 1.23"

5 years agoMerge "Use improvements of jQuery 3.3"
jenkins-bot [Thu, 13 Sep 2018 00:11:32 +0000 (00:11 +0000)]
Merge "Use improvements of jQuery 3.3"

5 years agoMerge "HTMLTextField: Pass extra parameters in OOUI mode"
jenkins-bot [Wed, 12 Sep 2018 22:10:08 +0000 (22:10 +0000)]
Merge "HTMLTextField: Pass extra parameters in OOUI mode"

5 years agoHTMLTextField: Pass extra parameters in OOUI mode
Bartosz Dziewoński [Wed, 12 Sep 2018 20:09:47 +0000 (22:09 +0200)]
HTMLTextField: Pass extra parameters in OOUI mode

Some additional parameters that are passed through as attributes in
HTML mode were not being passed through as config options in OOUI mode:
* 'min'
* 'max'
* 'step'
* 'title'

Some have no equivalent in OOUI:
* 'pattern'
* 'list'
* 'multiple'

Also note that we support some OOUI config options that have no
equivalent in HTML:
* 'autosize'
* 'flags'
* 'indicator'

I originally noticed the problem with the 'min' and 'max' params,
which are clearly missing in OOUI preferences for RC and watchlist.
I don't know if anything anywhere actually uses the other ones.

Bug: T181844
Change-Id: I2d22ef3b08b7f0b4283b644d80bd74906177d089

5 years agoHTMLForm: Drop this never-used backwards-compatibility
James D. Forrester [Wed, 12 Sep 2018 20:14:18 +0000 (13:14 -0700)]
HTMLForm: Drop this never-used backwards-compatibility

Change-Id: I6864d3a1207de44d465491baad87cb9c00714255

5 years agohooks: Drop Special{Watchlist|RecentChanges}Filters, deprecated in 1.23
James D. Forrester [Wed, 12 Sep 2018 19:43:01 +0000 (12:43 -0700)]
hooks: Drop Special{Watchlist|RecentChanges}Filters, deprecated in 1.23

Neither SpecialWatchlistFilters nor SpecialRecentChangesFilters are used in any
code known to Wikimedia code search. The related code to use these hooks was
only ever used within the MediaWiki repo.

Change-Id: Ib631d49d7b5835c665171dbad3e8a646b80827ef

5 years agoMerge "Add part to update ctd_user_defined in populateChangeTagDef"
jenkins-bot [Wed, 12 Sep 2018 19:32:00 +0000 (19:32 +0000)]
Merge "Add part to update ctd_user_defined in populateChangeTagDef"

5 years agoMerge "Set MCR migration stage to write-both/read-new AGAIN."
jenkins-bot [Wed, 12 Sep 2018 18:27:12 +0000 (18:27 +0000)]
Merge "Set MCR migration stage to write-both/read-new AGAIN."

5 years agoMerge "Reset services in ParserTestTopLevelSuite."
jenkins-bot [Wed, 12 Sep 2018 18:26:00 +0000 (18:26 +0000)]
Merge "Reset services in ParserTestTopLevelSuite."

5 years agoMerge "foreign-resources.yaml: Fix some documentation typos"
jenkins-bot [Wed, 12 Sep 2018 17:59:54 +0000 (17:59 +0000)]
Merge "foreign-resources.yaml: Fix some documentation typos"

5 years agoMerge "Make the spelling and pluralization of "Active filters" consistent"
jenkins-bot [Wed, 12 Sep 2018 17:58:18 +0000 (17:58 +0000)]
Merge "Make the spelling and pluralization of "Active filters" consistent"

5 years agoSet MCR migration stage to write-both/read-new AGAIN.
daniel [Tue, 11 Sep 2018 17:58:00 +0000 (19:58 +0200)]
Set MCR migration stage to write-both/read-new AGAIN.

This is a re-submit of the config change at the heart of I15989adae2b5
which got reverted in I5426b5efd0 dues to T204065.

Bug: T198561
Change-Id: I7a85d0c4d8288df061841c9144d895af1318dc45

5 years agoReset services in ParserTestTopLevelSuite.
daniel [Tue, 11 Sep 2018 17:01:08 +0000 (19:01 +0200)]
Reset services in ParserTestTopLevelSuite.

This is intended to isolate parser tests from other tests
by resetting the service locator between test runs, just like
MediaWikiTestCase does.

NOTE: this has no effect on parser tests run via parserTest.php,
it's only for tests run via PHPUnit.

Bug: T204065
Bug: T204072
Change-Id: I772b3b4a2d4d98948a249603b1cdb0933427b01c

5 years agoMerge "RCFilters: Replace deprecated 'advanced' by renamed to 'settings' icon"
jenkins-bot [Wed, 12 Sep 2018 16:49:20 +0000 (16:49 +0000)]
Merge "RCFilters: Replace deprecated 'advanced' by renamed to 'settings' icon"

5 years agoforeign-resources.yaml: Fix some documentation typos
Bartosz Dziewoński [Wed, 12 Sep 2018 16:13:53 +0000 (18:13 +0200)]
foreign-resources.yaml: Fix some documentation typos

Change-Id: I89281ddaeec5d0bc778ca6829dc2d7a531fb5320

5 years agoMerge "Use NumberInputWidget in HTMLFloatField"
jenkins-bot [Wed, 12 Sep 2018 16:08:48 +0000 (16:08 +0000)]
Merge "Use NumberInputWidget in HTMLFloatField"

5 years agoRemove unused MediaWikiTestCase::prepareConnectionForTesting
addshore [Fri, 24 Aug 2018 16:18:55 +0000 (17:18 +0100)]
Remove unused MediaWikiTestCase::prepareConnectionForTesting

This method is redundant to setupDatabaseWithTestPrefix.

Change-Id: Ic6baa13c51948a3ea838fe827acea58dc740bafc

5 years agoFix --user option in DeleteLocalPasswords
Amir Sarabadani [Wed, 12 Sep 2018 11:31:59 +0000 (13:31 +0200)]
Fix --user option in DeleteLocalPasswords

Bug: T201009
Change-Id: I69c14741f578b59cd73e5c8c5576f8c250825a30

5 years agoMerge "resourceloader: Improve mw.loader tests"
jenkins-bot [Wed, 12 Sep 2018 10:54:58 +0000 (10:54 +0000)]
Merge "resourceloader: Improve mw.loader tests"

5 years agoMerge "resourceloader: Configure eslint to disallow $ and require inside startup"
jenkins-bot [Wed, 12 Sep 2018 10:54:52 +0000 (10:54 +0000)]
Merge "resourceloader: Configure eslint to disallow $ and require inside startup"

5 years agoMerge "resourceloader: Optimise mw.now() definition"
jenkins-bot [Wed, 12 Sep 2018 10:29:32 +0000 (10:29 +0000)]
Merge "resourceloader: Optimise mw.now() definition"

5 years agoUse NumberInputWidget in HTMLFloatField
mainframe98 [Thu, 6 Sep 2018 12:21:46 +0000 (14:21 +0200)]
Use NumberInputWidget in HTMLFloatField

The PHP variant of this widget was introduced in 0.27.0.
Using NumberInputWidget has the advantage that HTMLFloatField and
HTMLIntField can now be infused as a JavaScript NumberInputWidget.

Bug: T203656
Change-Id: I5d6a913de38d12a21c9bfb1ce9790574d98a5a1b

5 years agoMerge "Improve page display title handling for category pages"
jenkins-bot [Wed, 12 Sep 2018 07:25:46 +0000 (07:25 +0000)]
Merge "Improve page display title handling for category pages"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 12 Sep 2018 06:20:43 +0000 (08:20 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4138398bcaf37ff156f075f01ef2efc719d2dc40

5 years agoMerge "Go search to consider fragment only title invalid"
jenkins-bot [Wed, 12 Sep 2018 05:18:09 +0000 (05:18 +0000)]
Merge "Go search to consider fragment only title invalid"

5 years agoUpdate OOUI to v0.28.2
Volker E [Wed, 12 Sep 2018 00:30:16 +0000 (17:30 -0700)]
Update OOUI to v0.28.2

Release notes:
 https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.28.2

Bug: T190581
Bug: T202477
Bug: T203766
Bug: T203813
Depends-on: I8af1bfd86322f9dce8a5e406f0b41e5dbcd9686a
Change-Id: Ice05fc7b2b4fae1741c3211c5909ba64bbbf28c4

5 years agoMerge "ContribsPager: Factor revision check out of formatRow"
jenkins-bot [Tue, 11 Sep 2018 22:56:49 +0000 (22:56 +0000)]
Merge "ContribsPager: Factor revision check out of formatRow"

5 years agoContribsPager: Factor revision check out of formatRow
jdlrobson [Thu, 26 Jul 2018 08:51:58 +0000 (16:51 +0800)]
ContribsPager: Factor revision check out of formatRow

This is needed by MobileFrontend. Also helps with readability
and understanding what is going on inside the larger formatRow
method.

Bug: T199066
Change-Id: I679f4bf4305ca5b0fd523e844a01f06b4bd38b5c