Commit graph

2171 commits

Author SHA1 Message Date
Translation updater bot b7e363ffeb Localisation updates from https://translatewiki.net.
Change-Id: I30033d79ebef3d46ca72f26e4315a21060957bce
2021-10-20 08:37:18 +02:00
Translation updater bot b16603d107 Localisation updates from https://translatewiki.net.
Change-Id: I803518d790211edf0f061238dbd6a661fbb1338b
2021-10-18 15:20:40 +02:00
Alexander Vorwerk ee2867db2d MediaWikiTestCase -> MediaWikiIntegrationTestCase
MediaWikiTestCase has been renamed to MediaWikiIntegrationTestCase in 1.34.

Bug: T293043
Change-Id: Icef9bbb1c515b775ccdcf6bc692c8c2cab4ae503
2021-10-12 00:51:10 +02:00
libraryupgrader bc39807052 build: Updating npm dependencies
* @wdio/mocha-framework: 7.5.3 → 7.14.1
  * https://npmjs.com/advisories/1002401 (CVE-2021-3807)
* ansi-regex: 5.0.0 → 5.0.1
  * https://npmjs.com/advisories/1002401 (CVE-2021-3807)

Additional changes:
* composer.json: Updated phpcs command in composer test (T280592).
* composer.json: Added phpcs command to scripts (T280592).

Change-Id: I0db8f640048bf8ea25367776d7d05ef508668974
2021-10-09 07:27:19 +00:00
Translation updater bot fb12c0f9be Localisation updates from https://translatewiki.net.
Change-Id: Id5f070e7a6cb301a4e18bcd0d846ba98e1f7c363
2021-10-08 09:21:11 +02:00
Ed Sanders 1091cf6458 Move var declarations inline
Change-Id: Ib550a7443daea339d3e40f3ff1d9c0febf5159f8
2021-10-05 17:04:47 +01:00
physikerwelt (Moritz Schubotz) b51408c4aa Remove empty string workaround
Old versions of Math returned

<dl>
<dd>iso-8859-1</dd>
</dl>

for empty math tags. This is no longer the case today.

Moreover, a problem in the png2svg conversion was fixed
in mathoid recently Iaf41f61335b4af51f758b64427c6e661ee36fb1b
This version of mathoid is now used in production.

Therefore, we can remove the handling of the special case.

Bug: T10372
Change-Id: Id835f7041a19f9519e7d5640b69a02b4b8a3397e
2021-10-03 14:42:25 +02:00
Reedy df89742072 Remove global namespace class aliases
Depends-On: I7e8e7f5ec0ac2f995489a559e88fc55ab877e06e
Change-Id: Ie3f5d5880363777eda4608fe8753a69e7ff3c5f9
2021-10-01 16:30:09 +00:00
Petr Pchelko cfc2f4f319 Register 'math' parser option
Instead of modifying a page rendering hash,
use the proper mechanism of parser option
registration. The cache is still split on parser
option value. The 'math' option is lazy, since
not all pages contain 'math' tag and we want to
avoid an user preference lookup for every parse.

WARNING: this will invalidate ParserCache for
all pages that contain <math> tags, but according
to Moritz, this is about 1% of all pages, so we
should be fine.

Setting up the test is still rather hard and weird
due to very hacky rendering mode to user option
converter, and math renderer interaction with the DB.
This will be cleaned up later.

Depends-On: I92b3e18fabef4eecac2ec2a4844f1be2716e5d89
Change-Id: I3bce04684070ad306685dabbc51267def25773cd
2021-09-30 06:55:54 -07:00
Petr Pchelko b458303fed Move rendering modes name resolution to MathConfig
Change-Id: Ie1926f1da02f6ab585d3efbc71abe1716dac66e5
2021-09-30 06:29:36 -07:00
Petr Pchelko a3306b24df Clean up handling of user preferences
Change-Id: I3e8f0a0be16d92a411de796b8e25df3a7760099f
2021-09-29 10:28:03 -07:00
Petr Pchelko 9b7205599c Move math configuration methods into a service
This is doing a bulk of the job of creating a service
for working with math modes configuration. There's
still things to do, like moving math mode names,
and perhaps depending on default user options to
provide a bit more convenience, but that will be the
next step.

Change-Id: I1259a93651920f44104f2f5135e3e620c858be8d
2021-09-28 13:31:08 -07:00
Translation updater bot 95fdf5f64a Localisation updates from https://translatewiki.net.
Change-Id: Iaec519c295a1bb72da6449fcf07c0fe8a86f9236
2021-09-23 12:27:47 +02:00
Translation updater bot 647f5f6495 Localisation updates from https://translatewiki.net.
Change-Id: I44410ae0a38eac66b8b0e8ab48d10c248a981797
2021-09-21 08:09:12 +02:00
Jakob Warkotsch 950b150e8c FP: Change PropertyId to NumericPropertyId
See ADR 22 for more info.

Bug: T289125
Change-Id: Id6293612a102d2785f5fee984af431e1219b64c0
2021-09-17 10:47:14 +02:00
Volker E 0bd9089692 styles: Remove obsolete -moz- vendor prefixed rules
Bug: T278670
Change-Id: If785ee709db742de7790fc4febe9fe89451c8924
2021-09-14 04:22:48 -07:00
Translation updater bot 2c98842973 Localisation updates from https://translatewiki.net.
Change-Id: Id29acf8e6cdd1a265c75fbdcff0adf5c475c98f6
2021-09-13 08:29:55 +02:00
libraryupgrader 1e15355fdf build: Updating composer dependencies
* mediawiki/mediawiki-phan-config: 0.10.6 → 0.11.0
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

Change-Id: I6c13f1e5d7488e269b5ca6f26ee4aa7cc22638c1
2021-09-09 11:08:17 +00:00
libraryupgrader d3157775eb build: Updating stylelint-config-wikimedia to 0.11.1
Change-Id: Iac691192671e13e35c1a370c60b482bca04f99f2
2021-09-04 21:00:07 +00:00
physikerwelt (Moritz Schubotz) 817a56acc3
Allow rendering of <math>0</math>
Bug: T288846
Change-Id: I5c5cd3e759b245b028c42f19ba6199b8f6f48aaa
2021-08-26 11:27:54 +02:00
libraryupgrader 1e1c7cb3f6 build: Updating path-parse to 1.0.7
* https://npmjs.com/advisories/1773 (CVE-2021-23343)

Change-Id: I0491788c7307a01b5ec454144790713a908ade65
2021-08-25 08:23:49 +00:00
Translation updater bot 90492a1086 Localisation updates from https://translatewiki.net.
Change-Id: I1767aee4db3d82a68975f02d27f32285c1497ec7
2021-08-23 09:04:07 +02:00
physikerwelt (Moritz Schubotz) efe35e9a09 build: Remove phan warning
MathLaTeXML is now in src. Thus the extra phan config is
no longer required.

Change-Id: Iceddc2582893fb40d02abc3f406db42c740499b8
2021-08-20 04:09:00 +00:00
Translation updater bot 40a9f37f9b Localisation updates from https://translatewiki.net.
Change-Id: I2a072230f9af63100a36e3707be6977e857a5df5
2021-08-19 08:13:39 +02:00
jenkins-bot 6e7339418e Merge "Support null content in parser tag hook" 2021-08-13 20:49:48 +00:00
Petr Pchelko 2c4d8bbcf7 Support null content in parser tag hook
Bug: T288846
Change-Id: I1f3e8012db83c98f3057b01f1bd563ef327be8d3
2021-08-13 13:06:38 -07:00
Petr Pchelko 551340ee11 Skip wikibase tests if wikibase is not loaded
When running tests locally I don't want to install wikibase
if I'm not working on wikibase-math integration. It's
annoying that some of the tests fail in this schenario.

Depends-On: Id996abdb353547b95d795494ba961b9a215ef2ef
Change-Id: I836c7a3bab5393b7482e985d9148226373ae0a58
2021-08-13 18:43:42 +00:00
Petr Pchelko da8e918fb3 Enable most tests which were previously disabled
Additionally - remove RestbaseInterface::checkBackend.
When HTTP requests are banned from unit tests this method
makes no sence.

MathoidCli tests were not reenabled cause it's a bit hard
to mock shell acceess. Hopefully as part of Shellbox
transition we can have MockShell trait in core and reenable
those tests

Bug: T265628
Depends-On: I350ed59af603a0504704af3265787a4be8f2dc2a
Change-Id: I294d0ed905193850dc38cb3071eb9b31c8863121
2021-08-12 08:57:58 -07:00
jenkins-bot 8345a5ba9e Merge "First pass at cleaning up error handling" 2021-08-11 16:07:45 +00:00
Petr Pchelko 0cd6acd3f7 First pass at cleaning up error handling
The overall aim is to make renderer and checker
proper services and stop storing each operation
state in them. This patch reduces the number of
places where we store the lastError. I've decided
to stop here in the first pass so that the patch
doesn't grow out of proportion.

Change-Id: Ice7e1f9f2f074d62ef1819355a510ce0b0335d88
2021-08-11 06:05:33 -07:00
jenkins-bot 9bc4ece1f3 Merge "MathLateXML: override getPostData" 2021-08-10 20:02:47 +00:00
Petr Pchelko 404315973e MathLateXML: override getPostData
Instead of having a separate method for getting the post data
in MathLateXML, we can just override getPostData method from
parent and make the makeRequest method signature much simpler.

Change-Id: I07b683856885396ff7b6b5a40df79399828c8214
2021-08-10 12:12:53 -07:00
Translation updater bot 00d809bbd6 Localisation updates from https://translatewiki.net.
Change-Id: I9421e6b2d66b9bca9ea85bfb559ee61d7ec8a7e0
2021-08-09 08:24:30 +02:00
jenkins-bot 4ad4a17317 Merge "Add JS unit test" 2021-08-05 16:08:32 +00:00
physikerwelt (Moritz Schubotz) be9d701825
Add JS unit test
Add a first test to check that the testing framework is functional.

Bug: T288074
Change-Id: If4a6d14f14d7b964db31781b3caf23eb383c06c1
2021-08-05 09:54:10 +02:00
Petr Pchelko 44ad3fbdf9 MathMathML::batchEvaluate - only pass MathRenderer
We do not need a ParserObject in the batchEvaluate,
so only pass in the MathRenderer

Change-Id: Id2e8cad709c08a0225597cb1fbf85289830f828b
2021-08-05 07:09:59 +00:00
jenkins-bot 32185cd9d0 Merge "Remove deprecated feature to declare multiple mathoid hosts" 2021-08-05 07:00:13 +00:00
jenkins-bot 6bea1c3dd0 Merge "Make use of MockHttpTrait instead of custom mechanism" 2021-08-05 06:59:26 +00:00
jenkins-bot b00ec91ff6 Merge "Create Math.RendererFactory service" 2021-08-04 12:53:00 +00:00
jenkins-bot 1171ac128a Merge "Switch parser hooks to a new-style hook handler" 2021-08-04 12:46:17 +00:00
Petr Pchelko ddff31bb0d Remove deprecated feature to declare multiple mathoid hosts
This is not the job of an extension to be a load balancer.
This feature was already deprecated and is not used in WMF prod.

Change-Id: I950dbaf45bc40d9d9ed61b1c98b339d3d38326fc
2021-08-03 09:21:43 -07:00
Translation updater bot a18acb7c7e Localisation updates from https://translatewiki.net.
Change-Id: I21b1a6ed1a30bdccc5e32d4ee1ee32e08ddd9b23
2021-08-03 08:11:54 +02:00
Petr Pchelko 45090ad369 Make use of MockHttpTrait instead of custom mechanism
Depends-On: I4c3aab6ab88695729b4f398dacf3575fbdb4dad4
Change-Id: I60b192c9b9c2ae434fb3f9aff8c460e0fc0806b1
2021-08-02 13:46:44 -07:00
Petr Pchelko e6507e95d7 Create Math.RendererFactory service
Change-Id: I474d746bae81ddf4322814c45141c981ecdb077b
2021-08-02 11:57:57 -07:00
Petr Pchelko e9bc5d3a42 Switch parser hooks to a new-style hook handler
Change-Id: Ie09e4cfb31a8aaea6f21d7472ae3a067dcc7c40b
2021-07-31 08:17:29 -07:00
Petr Pchelko ed08441fa3 Remove ParserTestTables hook handler.
This hook is no longer needed by core so it's not
called anymore.

See I5124789fac333a664b73b4b4a1e801ecc0a618ca

Change-Id: I9a554b4e70a2564834e1df4058b1ad5cb98a56e3
2021-07-30 13:00:46 +00:00
libraryupgrader e447231adb build: Updating npm dependencies
* postcss: 7.0.35 → 7.0.36
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* ws: 7.3.0 → 7.5.3
  * https://npmjs.com/advisories/1748 (CVE-2021-32640)
* glob-parent: 5.1.1 → 5.1.2
  * https://npmjs.com/advisories/1751 (CVE-2020-28469)
* trim-newlines: 3.0.0 → 3.0.1
  * https://npmjs.com/advisories/1753 (CVE-2021-33623)
* normalize-url: 4.5.0 → 4.5.1
  * https://npmjs.com/advisories/1755 (CVE-2021-33502)

Change-Id: I41ee23a4e2fdb467df8bd06ed55d844274794b78
2021-07-29 11:41:26 +00:00
Translation updater bot 877f9a6fd0 Localisation updates from https://translatewiki.net.
Change-Id: I30295355466186350eca43120a4b83e324e20a27
2021-07-29 08:45:03 +02:00
sahil e371e23dc1 selenium: Update wdio-mediawiki
wdio-mediawiki v1.1.1:
- Includes wdio-defaults.conf.js file that vastly simplifies wdio.conf.js.
- Replaces @wdio/spec-reporter with @wdio/dot-reporter.
- Introduces video recording.

Bug: T283597
Change-Id: Id488159c2a5b12d1b44a7037fa3038a2a541b2f1
2021-07-28 16:43:40 +05:30
vladshapik a024908d5f Avoid using deprecated Parser::getUser
Bug: T287168
Change-Id: If3443b879ee01c3cbdbf94d1a690bd9c3bf182b1
2021-07-27 17:50:25 +03:00