lhc/web/wiklou.git
5 years agoUpgrade wikimedia/remex-html to 2.0.0
Kunal Mehta [Tue, 14 Aug 2018 20:38:37 +0000 (13:38 -0700)]
Upgrade wikimedia/remex-html to 2.0.0

Depends-On: Ie13945649314853cbd5707363f3a10da55752743
Change-Id: Ib6c8aaa797c128c273cde8095eb0bb1527fc0e21

5 years agoMerge "rdbms: Avoid numRows() warnings for mysqli after table creation"
jenkins-bot [Tue, 14 Aug 2018 20:24:40 +0000 (20:24 +0000)]
Merge "rdbms: Avoid numRows() warnings for mysqli after table creation"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 14 Aug 2018 20:03:52 +0000 (22:03 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Idca283c3e5caa43b345988307d55b263e6fa9fc0

5 years agordbms: Avoid numRows() warnings for mysqli after table creation
Aaron Schulz [Tue, 14 Aug 2018 18:42:45 +0000 (11:42 -0700)]
rdbms: Avoid numRows() warnings for mysqli after table creation

Bug: T201900
Change-Id: Ie86a7b8e680d79ad3f9be6ca4ec260b0589e5d0e

5 years agoMerge "resourceloader: Optimise getCombinedVersion() with string concat"
jenkins-bot [Tue, 14 Aug 2018 18:52:08 +0000 (18:52 +0000)]
Merge "resourceloader: Optimise getCombinedVersion() with string concat"

5 years agoMerge "resourceloader: Remove support for `state(name, state)` signature"
jenkins-bot [Tue, 14 Aug 2018 18:41:06 +0000 (18:41 +0000)]
Merge "resourceloader: Remove support for `state(name, state)` signature"

5 years agoMerge "Move l10n_cache table to a separate DB for sqlite via the installer"
jenkins-bot [Tue, 14 Aug 2018 18:32:33 +0000 (18:32 +0000)]
Merge "Move l10n_cache table to a separate DB for sqlite via the installer"

5 years agoMove l10n_cache table to a separate DB for sqlite via the installer
Aaron Schulz [Thu, 5 Jul 2018 11:58:48 +0000 (12:58 +0100)]
Move l10n_cache table to a separate DB for sqlite via the installer

This does not set 'db' as the cache type so that admins can still
easily set the cache directory to use the file-based cdb system.
If they do not, then at least the second DB file will be used to
avoid heavy contention.

Bug: T93097
Change-Id: Ib3912f00cf12de99801ebda4f06135b2987ce71a

5 years agoMerge "Avoid MapCacheLRU error when MessageCache fails to load"
jenkins-bot [Tue, 14 Aug 2018 16:32:07 +0000 (16:32 +0000)]
Merge "Avoid MapCacheLRU error when MessageCache fails to load"

5 years agoMerge "Improve MapCacheLRU error message"
jenkins-bot [Tue, 14 Aug 2018 16:24:50 +0000 (16:24 +0000)]
Merge "Improve MapCacheLRU error message"

5 years agoFix typos
Fomafix [Tue, 14 Aug 2018 07:56:35 +0000 (09:56 +0200)]
Fix typos

Bug: T201491
Change-Id: I25a27d11faabe2f5fa02950c7a4fb58b13fb3662

5 years agoAvoid MapCacheLRU error when MessageCache fails to load
Aaron Schulz [Tue, 14 Aug 2018 06:03:27 +0000 (23:03 -0700)]
Avoid MapCacheLRU error when MessageCache fails to load

Bug: T201893
Change-Id: I6093113a3ffa8092dea3351a6ed6c815c7ff7162

5 years agoImprove MapCacheLRU error message
Aaron Schulz [Tue, 14 Aug 2018 05:52:22 +0000 (22:52 -0700)]
Improve MapCacheLRU error message

Bug: T201893
Change-Id: I74ef2cf31d83186f68e676da1b80c4c44ca28d69

5 years agoParser: Add accessors needed by CodeMirror
Kunal Mehta [Tue, 14 Aug 2018 05:44:48 +0000 (22:44 -0700)]
Parser: Add accessors needed by CodeMirror

Change-Id: Ia2d98baf6caed2cd779cb00aceba5785cf13d633

5 years agoMerge "JavaScriptMinifier: Turn $goto into a generic $model"
jenkins-bot [Tue, 14 Aug 2018 01:25:44 +0000 (01:25 +0000)]
Merge "JavaScriptMinifier: Turn $goto into a generic $model"

5 years agoMerge "Make MapCacheLRU throw errors for bad $field arguments"
jenkins-bot [Tue, 14 Aug 2018 01:17:17 +0000 (01:17 +0000)]
Merge "Make MapCacheLRU throw errors for bad $field arguments"

5 years agoMake MapCacheLRU throw errors for bad $field arguments
Aaron Schulz [Thu, 19 Jul 2018 09:50:28 +0000 (10:50 +0100)]
Make MapCacheLRU throw errors for bad $field arguments

Change-Id: Ibde33e0ff671d3428b73c66766478f58763726e1

5 years agoresourceloader: Optimise getCombinedVersion() with string concat
Timo Tijhof [Tue, 14 Aug 2018 00:39:45 +0000 (01:39 +0100)]
resourceloader: Optimise getCombinedVersion() with string concat

This is used many times in the hot path. The main motivation for
this is to reduce memory churn in that path.

By building up a string directly instead of first mapping into an
array, and than using Array#join() - we avoid some of that churn.

It terms of speed, avoiding Array#join resulted in the same
or better performance for the browsers I tested.

|                | Chrome 60     | Safari 11.1   | Firefox 61
| map+join       | 241K/s (± 2%) | 189K/s (± 5%) | 161K/s (± 6%)
| forEach+concat | 297K/s (± 1%) | 398K/s (± 2%) | 159K/s (± 13%)
| reduce         | 437K/s (± 2%) | 396K/s (± 1%) | 138K/s (± 12%)

For Chrome and Safari, 'reduce' were marked "fastest".
For Firefox, JSPerf marked all three as fastest due to the
variable ranges overlapping. Re-runs produced similar results,
each time with three cases laid out in a slightly different order
in the 130-165K/s range. The test used a copy of en.wikipedia's
current registry with the module queue of a random article.
https://jsperf.com/array-map-and-join-vs-string-concat/1

Change-Id: Ifbd8f6509ac118657c5ad2833f54fd6e8e63f9ce

5 years agoMerge "Use separate insert/delete statements to work around Blazegraph bug"
jenkins-bot [Tue, 14 Aug 2018 00:31:39 +0000 (00:31 +0000)]
Merge "Use separate insert/delete statements to work around Blazegraph bug"

5 years agoresourceloader: Remove support for `state(name, state)` signature
Timo Tijhof [Mon, 13 Aug 2018 23:55:48 +0000 (00:55 +0100)]
resourceloader: Remove support for `state(name, state)` signature

This has no usage in non-test code anywhere in Wikimedia Git,
and was only used in the test suite for mw.loader in core,
and in the test suite for the NavigationTiming extension.

The core usage is as part of this commit. The usage in NavTiming
is updated by I240ced4e65988f9.

Bug: T127328
Depends-On: I240ced4e65988f96c7ece3772378c2c9a335fb9a
Change-Id: Ic17c797e528feaf07a4777709d705615fea353e5

5 years agoMerge "rdbms: add "maxReadRows" limit to TransactionProfiler"
jenkins-bot [Mon, 13 Aug 2018 23:26:37 +0000 (23:26 +0000)]
Merge "rdbms: add "maxReadRows" limit to TransactionProfiler"

5 years agoUse separate insert/delete statements to work around Blazegraph bug
Stanislav Malyshev [Mon, 6 Aug 2018 23:40:29 +0000 (16:40 -0700)]
Use separate insert/delete statements to work around Blazegraph bug

Bug https://github.com/blazegraph/database/issues/100 happens on DELETE/INSERT
but not on separate delete and insert, try to work around it

Change-Id: Iba6a98dde6f4bea9051cd6dee91fb19db5eca10e
Bug: T201217

5 years agoMerge "Use LB server configuration to force DB domains in ExternalStorageDB"
jenkins-bot [Mon, 13 Aug 2018 22:30:44 +0000 (22:30 +0000)]
Merge "Use LB server configuration to force DB domains in ExternalStorageDB"

5 years agoMerge "Add @since to LoadBalancer getServerInfo() per a3096440627"
jenkins-bot [Mon, 13 Aug 2018 22:23:18 +0000 (22:23 +0000)]
Merge "Add @since to LoadBalancer getServerInfo() per a3096440627"

5 years agoMerge "benchmarks: Add benchmark for JavaScriptMinifier"
jenkins-bot [Mon, 13 Aug 2018 21:51:34 +0000 (21:51 +0000)]
Merge "benchmarks: Add benchmark for JavaScriptMinifier"

5 years agoMerge "benchmarks: Add a default to the 'file' option of benchmarkTidy.php"
jenkins-bot [Mon, 13 Aug 2018 21:47:32 +0000 (21:47 +0000)]
Merge "benchmarks: Add a default to the 'file' option of benchmarkTidy.php"

5 years agordbms: add "maxReadRows" limit to TransactionProfiler
Aaron Schulz [Mon, 2 Jul 2018 11:19:23 +0000 (12:19 +0100)]
rdbms: add "maxReadRows" limit to TransactionProfiler

Change-Id: I008fc1857c7aa43d93f43361803d5e52c4ddf089

5 years agoMerge "Legacy: remove unused style rules for floatleft/right"
jenkins-bot [Mon, 13 Aug 2018 20:06:20 +0000 (20:06 +0000)]
Merge "Legacy: remove unused style rules for floatleft/right"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 13 Aug 2018 19:53:21 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I5e43c646bdd57b075c804b687981ed17c4c1bc81

5 years agoAdd @since to LoadBalancer getServerInfo() per a3096440627
Aaron Schulz [Mon, 13 Aug 2018 19:05:49 +0000 (12:05 -0700)]
Add @since to LoadBalancer getServerInfo() per a3096440627

Change-Id: I31de4449dca774f4da580a40581c5b82678be478

5 years agoUse LB server configuration to force DB domains in ExternalStorageDB
Aaron Schulz [Sun, 12 Aug 2018 10:14:54 +0000 (03:14 -0700)]
Use LB server configuration to force DB domains in ExternalStorageDB

This is for backwards-compatibility for pre 14ee3f210782 external store
configuration that relied on not using the main wiki DB name(s).

Bug: T200471
Change-Id: Ie60cae64e32ff2532565cbd79c8e084634a61cce

5 years agoMerge "Upgrade wikimedia/timestamp to 2.0.0"
jenkins-bot [Mon, 13 Aug 2018 18:19:14 +0000 (18:19 +0000)]
Merge "Upgrade wikimedia/timestamp to 2.0.0"

5 years agoJavaScriptMinifier: Turn $goto into a generic $model
Timo Tijhof [Mon, 13 Aug 2018 16:03:06 +0000 (17:03 +0100)]
JavaScriptMinifier: Turn $goto into a generic $model

In preparation for merging $push and $pop into it as well, so
that the state changes that happen for a particular state/type
are declared in the same place.

Bug: T201606
Change-Id: Idd12786d625621af949e7e6487e4c1655f61f295

5 years agobenchmarks: Add benchmark for JavaScriptMinifier
Timo Tijhof [Mon, 13 Aug 2018 16:23:53 +0000 (17:23 +0100)]
benchmarks: Add benchmark for JavaScriptMinifier

Bug: T201606
Change-Id: I40fe0b2799b210e552b96f9fadc2b394928ec729

5 years agoMerge "Upgrade wikimedia/xmp-reader to 0.6.0"
jenkins-bot [Mon, 13 Aug 2018 17:21:44 +0000 (17:21 +0000)]
Merge "Upgrade wikimedia/xmp-reader to 0.6.0"

5 years agobenchmarks: Add a default to the 'file' option of benchmarkTidy.php
Timo Tijhof [Mon, 13 Aug 2018 16:12:01 +0000 (17:12 +0100)]
benchmarks: Add a default to the 'file' option of benchmarkTidy.php

* Move the fixture to its own directory.
* Add a default to the 'file' option.
* Use loadFile() so that it works by default without requiring
  the user to unzip it first.

Change-Id: I9edf2c19ce5730b72bad3a33c60eda588072a3cf

5 years agoMerge "Call overrideMwServices() in TitlePermissionTest"
jenkins-bot [Mon, 13 Aug 2018 16:44:59 +0000 (16:44 +0000)]
Merge "Call overrideMwServices() in TitlePermissionTest"

5 years agoUpgrade wikimedia/timestamp to 2.0.0
Kunal Mehta [Mon, 13 Aug 2018 10:47:00 +0000 (03:47 -0700)]
Upgrade wikimedia/timestamp to 2.0.0

Depends-On: I7da0cc44f9bcf5a5b421ddc11a00f92c54dbb1dd
Change-Id: Idaed8761df04e7bf644e765644dda22f0fd044d7

5 years agoUpgrade wikimedia/xmp-reader to 0.6.0
Kunal Mehta [Mon, 13 Aug 2018 10:43:13 +0000 (03:43 -0700)]
Upgrade wikimedia/xmp-reader to 0.6.0

Depends-On: I5aa61e855603304a2862570d719f18ec5b7b6d9f
Change-Id: Ia79aed5e1110c5949f79a3410ccd6881f3b94b7d

5 years agoAdd the 'full' option explicitly to dumpTextPass.php.
Ariel T. Glenn [Mon, 13 Aug 2018 06:31:48 +0000 (09:31 +0300)]
Add the 'full' option explicitly to dumpTextPass.php.

Broken since  4abb45939234fe94ce1a78f3ef171a01b2e40511 (2015) but
hidden since maintenance scripts would pass through all opts,
even those not specifically added.

Bug: T201803
Change-Id: Ic55bf3d970d768b796848a77abf7b0eb6616c013

5 years agoMerge "Add benchmark script demonstrating TitleValue is slower than Title"
jenkins-bot [Mon, 13 Aug 2018 05:45:50 +0000 (05:45 +0000)]
Merge "Add benchmark script demonstrating TitleValue is slower than Title"

5 years agoMerge "Add type hint Language where possible"
jenkins-bot [Mon, 13 Aug 2018 04:16:45 +0000 (04:16 +0000)]
Merge "Add type hint Language where possible"

5 years agoCall overrideMwServices() in TitlePermissionTest
Kunal Mehta [Mon, 13 Aug 2018 02:46:23 +0000 (19:46 -0700)]
Call overrideMwServices() in TitlePermissionTest

Bug: T201776
Change-Id: I59918311e3dd01d133d5acebf8d1907fe8aef818

5 years agoAdd benchmark script demonstrating TitleValue is slower than Title
Kunal Mehta [Mon, 13 Aug 2018 01:57:39 +0000 (18:57 -0700)]
Add benchmark script demonstrating TitleValue is slower than Title

Change-Id: I9fe5b35f0f5196830cf75eae33195d14d0a66238

5 years agoMerge "Add PHPUnit test to ApiQueryDisabled"
jenkins-bot [Sun, 12 Aug 2018 22:50:15 +0000 (22:50 +0000)]
Merge "Add PHPUnit test to ApiQueryDisabled"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 12 Aug 2018 19:53:59 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3c0f2ea05084ef85809c425d9350ded303f8dda8

5 years agoMerge "JavaScriptMinifier: Add test case for another line-break bug"
jenkins-bot [Sun, 12 Aug 2018 17:51:55 +0000 (17:51 +0000)]
Merge "JavaScriptMinifier: Add test case for another line-break bug"

5 years agoLegacy: remove unused style rules for floatleft/right
Derk-Jan Hartman [Sun, 12 Aug 2018 11:10:18 +0000 (13:10 +0200)]
Legacy: remove unused style rules for floatleft/right

These rules for paragraphs inside floatleft/right to have font-style
italic were copied in in 2004 in commit e285b0b5f1b20637e40ef789b99fc06614d92d91

But as far as I can tell they were never in use and definetly no
longer are. From core we use these classes solely to align inline
images (or these days renderer File transclusions). But as far as I
can tell no where do these feature <p> (intentionally).

Time to get rid of it I think.

Change-Id: I6f70466def688d0cb671909c71eba566ff4a4a9b

5 years agoChange linkstoimage and related messages from "link" to "use"
Amire80 [Tue, 20 Mar 2018 11:30:08 +0000 (13:30 +0200)]
Change linkstoimage and related messages from "link" to "use"

These messages don't discuss links to images. For example,
[[:File:Information.svg]], which is an actual *link*, won't appear
in this list, but only [[File:Information.svg]].

As the page https://translatewiki.net/w/i.php?title=Special:Translations&message=MediaWiki%3ALinkstoimage
shows, it is already translated as "uses" to some languages.

The comparable message "globalusage-of-file" also says "use"
and not "link".

Change-Id: I659bc267240d609032a1cd2c6af479df9c09fceb

5 years agoMerge "JavaScriptMinifier: Move test case for 'x++' to provideLineBreaker()"
jenkins-bot [Sun, 12 Aug 2018 09:45:57 +0000 (09:45 +0000)]
Merge "JavaScriptMinifier: Move test case for 'x++' to provideLineBreaker()"

5 years agoAdd type hint Language where possible
Fomafix [Wed, 4 Oct 2017 19:02:29 +0000 (21:02 +0200)]
Add type hint Language where possible

Also use ?? instead of ?: to check for null.

Change-Id: I058b61d7e06cdefecdafa82f60109cc386e2a809

5 years agoRemove outdated comment
Aryeh Gregor [Sun, 5 Aug 2018 09:43:57 +0000 (12:43 +0300)]
Remove outdated comment

After 1174776e, there is no list to update.

Change-Id: I76ed6c36ab4aa5fb00e0bb7b582e83076e73fc41

5 years agoMerge "Delete autoload.ide.php"
jenkins-bot [Sun, 12 Aug 2018 07:36:34 +0000 (07:36 +0000)]
Merge "Delete autoload.ide.php"

5 years agoMerge "Add type hint for ParserOutput"
jenkins-bot [Sun, 12 Aug 2018 07:03:19 +0000 (07:03 +0000)]
Merge "Add type hint for ParserOutput"

5 years agoMerge "SpecialMyLanguage: Get content language from service"
jenkins-bot [Sun, 12 Aug 2018 06:50:07 +0000 (06:50 +0000)]
Merge "SpecialMyLanguage: Get content language from service"

5 years agoMerge "Give pages with ~~~~ a different cache TTL"
jenkins-bot [Sun, 12 Aug 2018 06:43:52 +0000 (06:43 +0000)]
Merge "Give pages with ~~~~ a different cache TTL"

5 years agoGive pages with ~~~~ a different cache TTL
Aryeh Gregor [Mon, 6 Aug 2018 17:48:15 +0000 (20:48 +0300)]
Give pages with ~~~~ a different cache TTL

This was supposed to already be the case, but it wasn't. The flag that
was set got cleared and never did anything.

Change-Id: Ide960f8cb9228f9a9d68c540369f122ada0a2a6f

5 years agoMass conversion of $wgContLang to service
Aryeh Gregor [Sun, 29 Jul 2018 12:24:54 +0000 (15:24 +0300)]
Mass conversion of $wgContLang to service

Brought to you by vim macros.

Bug: T200246
Change-Id: I79e919f4553e3bd3eb714073fed7a43051b4fb2a

5 years agoJavaScriptMinifier: Add test case for another line-break bug
Timo Tijhof [Sat, 11 Aug 2018 23:24:56 +0000 (00:24 +0100)]
JavaScriptMinifier: Add test case for another line-break bug

Discovered by adding a test case that uses file_get_contents()
to pass jquery.js, and then scan the PHPUnit output for an entry
containing `return` by itself on a line where the next line
is isn't `;` - then reducing it to a test case as small as possible.

This was reduced from the definition of jQuery.event.addProp.

Bug: T201606
Change-Id: I1f907436c32630102e60e3ded7092dbeb9669fe8

5 years agoJavaScriptMinifier: Move test case for 'x++' to provideLineBreaker()
Timo Tijhof [Sat, 11 Aug 2018 23:24:10 +0000 (00:24 +0100)]
JavaScriptMinifier: Move test case for 'x++' to provideLineBreaker()

Easier to read.

Bug: T201606
Change-Id: Ie12910edf5ab6a9d7246000ca78a3c9208aeb152

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 11 Aug 2018 20:01:49 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iece552d53e6035f2586516be12ae785fba31f1ad

5 years agoMerge "Localize some special pages into Korean (ko)"
jenkins-bot [Sat, 11 Aug 2018 19:04:38 +0000 (19:04 +0000)]
Merge "Localize some special pages into Korean (ko)"

5 years agoMerge "JavaScriptMinifier: Fix bad state after '{}' in property value"
jenkins-bot [Sat, 11 Aug 2018 15:40:43 +0000 (15:40 +0000)]
Merge "JavaScriptMinifier: Fix bad state after '{}' in property value"

5 years agoMerge "JavaScriptMinifier: Add better line-breaker tests"
jenkins-bot [Sat, 11 Aug 2018 15:40:35 +0000 (15:40 +0000)]
Merge "JavaScriptMinifier: Add better line-breaker tests"

5 years agoMerge "Update LinkHolderArray to use ContentLanguage"
jenkins-bot [Sat, 11 Aug 2018 08:07:54 +0000 (08:07 +0000)]
Merge "Update LinkHolderArray to use ContentLanguage"

5 years agoMerge "Update CoreParserFunctions to use ContentLanguage"
jenkins-bot [Sat, 11 Aug 2018 07:59:14 +0000 (07:59 +0000)]
Merge "Update CoreParserFunctions to use ContentLanguage"

5 years agoMerge "Use ParserFactory in a bunch of places"
jenkins-bot [Sat, 11 Aug 2018 07:52:16 +0000 (07:52 +0000)]
Merge "Use ParserFactory in a bunch of places"

5 years agoMerge "Clean up AuthManagerTest a bit"
jenkins-bot [Sat, 11 Aug 2018 07:41:20 +0000 (07:41 +0000)]
Merge "Clean up AuthManagerTest a bit"

5 years agoUpdate LinkHolderArray to use ContentLanguage
Aryeh Gregor [Mon, 30 Jul 2018 17:42:42 +0000 (20:42 +0300)]
Update LinkHolderArray to use ContentLanguage

Bug: T200246
Change-Id: Ic954f7752fda8e2a1f34a64b85cce27774014666

5 years agoUpdate CoreParserFunctions to use ContentLanguage
Aryeh Gregor [Thu, 26 Jul 2018 12:39:15 +0000 (15:39 +0300)]
Update CoreParserFunctions to use ContentLanguage

Bug: T200246
Change-Id: I4e32195b46967d70e69eeccf3ecd1887e8ae7da8

5 years agoUse ParserFactory in a bunch of places
Aryeh Gregor [Fri, 3 Aug 2018 08:43:00 +0000 (11:43 +0300)]
Use ParserFactory in a bunch of places

I wasn't sure how to convert the rest of the occurrences in core (there
are a significant number).

Bug: T200881
Change-Id: I114bba946cd3ea8a293121e275588c3c4d174f94

5 years agoIntroduce ParserFactory service
Aryeh Gregor [Fri, 3 Aug 2018 08:25:15 +0000 (11:25 +0300)]
Introduce ParserFactory service

Bug: T200881
Change-Id: I257e78200983cb10afb76de1f07dd1b9d531c52a

5 years agoMerge "Improve MediaWikiVersionFetcherTest"
jenkins-bot [Sat, 11 Aug 2018 01:01:15 +0000 (01:01 +0000)]
Merge "Improve MediaWikiVersionFetcherTest"

5 years agoJavaScriptMinifier: Fix bad state after '{}' in property value
Timo Tijhof [Fri, 10 Aug 2018 22:23:08 +0000 (23:23 +0100)]
JavaScriptMinifier: Fix bad state after '{}' in property value

Previously, $push contained:

self::PROPERTY_EXPRESSION_OP => [
self::TYPE_PAREN_OPEN => self::PROPERTY_EXPRESSION_OP
],

But $pop contained:

self::PROPERTY_EXPRESSION_OP => [ self::TYPE_BRACE_CLOSE => true ]

This meant that when a closing brace was found inside a property
expression, it would wrongly pop the stack, eventhough we are still
inside the property expression.

The impact is that everything after this is one level higher in
the stack than it should be, causing various other types to be
misinterpreted. Including in the following contrived example:

call( function () {
try {
} catch (e) {
obj = {
key: 1 ? 0 : {} // A
}; // B
} // C
return name === 'input';
} );

In the above, the closing brace at A would close the 'obj.key' assignment
(PROPERTY_EXPRESSION_OP), instead of waiting for the closing brace at B to
decide that.

Then the closing brace at B would wrongly close the 'catch' block (instead of
the 'obj' assignment). And lastly, the closing brace at C would close the
function body (STATEMENT).

This resulted in keyword 'return' being interpreted while in state
PAREN_EXPRESSION_OP instead of STATEMENT, where PAREN_EXPRESSION_OP is the
arguments list to `call()`. In an argument list, TYPE_RETURN is not valid,
which means we stay in that state, instead of progressing to EXPRESSION_NO_NL,
which then wrongly allows for a line break to be inserted.

Bug: T201606
Change-Id: I07b809a7ca56e282ecb48b5c89c217b4b8da6856

5 years agoJavaScriptMinifier: Add better line-breaker tests
Timo Tijhof [Fri, 10 Aug 2018 22:11:53 +0000 (23:11 +0100)]
JavaScriptMinifier: Add better line-breaker tests

Set maxLineLength to '1' instead of messing with filler content.
This makes it easy to see all potential line-breaks, instead of only
at the 999th offset.

Bug: T201606
Change-Id: I220b145c5bc8e7d1a41efacd2a6cea738545f006

5 years agoSVG: Allow , as separator in viewBox attribute value
Derk-Jan Hartman [Fri, 10 Aug 2018 22:12:36 +0000 (00:12 +0200)]
SVG: Allow , as separator in viewBox attribute value

The viewBox attribute of the <svg> element allows both whitespace and
commas to be used as field separators.
https://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute

Bug: T194192
Change-Id: Iae9be3e4fad3a8ffa411d7a76eee2f20cc39b718

5 years agoMerge "JavaScriptMinifier: Document every operator and token type, with spec ref"
jenkins-bot [Fri, 10 Aug 2018 21:08:32 +0000 (21:08 +0000)]
Merge "JavaScriptMinifier: Document every operator and token type, with spec ref"

5 years agoMerge "JavaScriptMinifier: Disambiguate token constants from state constants"
jenkins-bot [Fri, 10 Aug 2018 21:08:11 +0000 (21:08 +0000)]
Merge "JavaScriptMinifier: Disambiguate token constants from state constants"

5 years agoMerge "JavaScriptMinifier: Add test case for T201606"
jenkins-bot [Fri, 10 Aug 2018 20:58:16 +0000 (20:58 +0000)]
Merge "JavaScriptMinifier: Add test case for T201606"

5 years agoJavaScriptMinifier: Document every operator and token type, with spec ref
Timo Tijhof [Fri, 10 Aug 2018 19:34:37 +0000 (20:34 +0100)]
JavaScriptMinifier: Document every operator and token type, with spec ref

* Group related operators and token types together.

* Document what each group's members have in common for the purposes of
  parsing and the state machine.

* Add spec reference.

Also confirmed that each group matches the spec (nothing missing,
nothing extra).

Bug: T201606
Change-Id: I9128beed9ab5dcf831d4655854565f826f81c602

5 years agoJavaScriptMinifier: Disambiguate token constants from state constants
Timo Tijhof [Fri, 10 Aug 2018 18:05:42 +0000 (19:05 +0100)]
JavaScriptMinifier: Disambiguate token constants from state constants

Makes debugging a bit easier.

Bug: T201606
Change-Id: Icc660bc2dfa6af823722dd6567fb185308ac74e7

5 years agoJavaScriptMinifier: Add test case for T201606
Timo Tijhof [Fri, 10 Aug 2018 20:03:01 +0000 (21:03 +0100)]
JavaScriptMinifier: Add test case for T201606

Bug: T201606
Change-Id: I2058765c7f1cfb9e2d644f19e780926d01b9b68c

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 10 Aug 2018 19:55:04 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic6dd5141ec0d2ad00bf9d2e73662d5438591dc0c

5 years agoMerge "ServiceWiring: Avoid once used local variables"
jenkins-bot [Fri, 10 Aug 2018 16:10:46 +0000 (16:10 +0000)]
Merge "ServiceWiring: Avoid once used local variables"

5 years agoMerge "ThumbnailRenderJob: normalize parameters before generating thumb URL"
jenkins-bot [Fri, 10 Aug 2018 11:16:19 +0000 (11:16 +0000)]
Merge "ThumbnailRenderJob: normalize parameters before generating thumb URL"

5 years agoServiceWiring: Avoid once used local variables
Fomafix [Thu, 26 Jul 2018 20:23:07 +0000 (22:23 +0200)]
ServiceWiring: Avoid once used local variables

Also make the indenting and wrapping of the lines like in the other
functions.

Change-Id: I87adf7dfe518425e38a15406a432d1f91917d4e1

5 years agoMerge "Add language support for Mon (mnw)"
jenkins-bot [Fri, 10 Aug 2018 09:58:55 +0000 (09:58 +0000)]
Merge "Add language support for Mon (mnw)"

5 years agoImprove MediaWikiVersionFetcherTest
Aryeh Gregor [Fri, 10 Aug 2018 08:26:57 +0000 (11:26 +0300)]
Improve MediaWikiVersionFetcherTest

Let's test that the value is actually correct, not just that it's a
string.

Change-Id: I4d76a48696a838ee6882ffce10d024f7518dcd4a

5 years agoMerge "Don't require a list of services in tests"
jenkins-bot [Fri, 10 Aug 2018 04:54:17 +0000 (04:54 +0000)]
Merge "Don't require a list of services in tests"

5 years agoMerge "Alphabetize service lists"
jenkins-bot [Fri, 10 Aug 2018 04:51:47 +0000 (04:51 +0000)]
Merge "Alphabetize service lists"

5 years agoDon't require a list of services in tests
Aryeh Gregor [Tue, 7 Aug 2018 16:33:20 +0000 (19:33 +0300)]
Don't require a list of services in tests

We already have two lists in other files, there's no need for a third.

Change-Id: I516a26e1170834b27aafeb0049a5893ec965d820

5 years agoAlphabetize service lists
Aryeh Gregor [Fri, 3 Aug 2018 08:05:44 +0000 (11:05 +0300)]
Alphabetize service lists

Adding everything at the end makes the list arbitrarily ordered, and
also invites lots of merge conflicts as new things are added.

Change-Id: I58bcca4fa79140f5d5f2f6ef447e67035cc37aae

5 years agoMerge "resourceloader: Move add() outside loop to optimise sortDependencies()"
jenkins-bot [Fri, 10 Aug 2018 01:42:43 +0000 (01:42 +0000)]
Merge "resourceloader: Move add() outside loop to optimise sortDependencies()"

5 years agoThumbnailRenderJob: normalize parameters before generating thumb URL
Gergő Tisza [Thu, 9 Aug 2018 22:11:36 +0000 (00:11 +0200)]
ThumbnailRenderJob: normalize parameters before generating thumb URL

PagedTiffHandler in particular will fail the generate a param string
for non-normalized parameters.

Also improve logging while we are at it.

Bug: T201305
Change-Id: I40e188f6525187303b6773990b887838b80630e0

5 years agoMerge "SVG: SVG unit parser support for wider range of number"
jenkins-bot [Thu, 9 Aug 2018 20:36:55 +0000 (20:36 +0000)]
Merge "SVG: SVG unit parser support for wider range of number"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 9 Aug 2018 20:03:06 +0000 (22:03 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I23d98f7e9ae86025f71787febca049cc9a28695c

5 years agoAdd language support for Mon (mnw)
MarcoAurelio [Thu, 9 Aug 2018 18:52:13 +0000 (20:52 +0200)]
Add language support for Mon (mnw)

Bug: T201583
Change-Id: Ic03b910c3cfc2419ece783d04adb486570416ba3

5 years agoMerge "search: Use @width-breakpoint-tablet instead of @deviceWidthTablet"
jenkins-bot [Thu, 9 Aug 2018 18:30:53 +0000 (18:30 +0000)]
Merge "search: Use @width-breakpoint-tablet instead of @deviceWidthTablet"

5 years agoDelete autoload.ide.php
Aryeh Gregor [Thu, 9 Aug 2018 18:15:04 +0000 (21:15 +0300)]
Delete autoload.ide.php

Unmaintained and possibly doesn't work.  If this works and someone
actually wants it to continue working, please step up to maintain it,
preferably without copy-paste and with tests.

Bug: T173899
Change-Id: I19378f8ddcd004af1c92cb45cafe2366ae2f353f

5 years agoMerge "Tests can't call resetGlobalServices()"
jenkins-bot [Thu, 9 Aug 2018 18:16:01 +0000 (18:16 +0000)]
Merge "Tests can't call resetGlobalServices()"