Commit graph

1187 commits

Author SHA1 Message Date
Moritz Schubotz 9326e7459b Add alt tag for SVG image
We use the checked version of the TeX string and
not the original user input string to ensure that
the layout is the same and no mediawiki specific
macros such as \reals is needed to render the alt
text with a regular LaTeX installation.

Bug: T136915
Change-Id: I40cdf4ec49a4d071773af6943dbe101b8d41ed87
2016-06-06 16:08:15 +00:00
Moritz Schubotz 14ec229cf9 Add tracking category for math errors
Bug: T134872
Change-Id: I6d0bce34aacfba27bedda23f6395001dae9c6568
2016-06-06 12:06:22 +00:00
Translation updater bot 81156bfc08 Localisation updates from https://translatewiki.net.
Change-Id: Ie6f21fca6209b8db4d474a74926ed943451545e1
2016-06-05 22:20:57 +02:00
Marko Obrovac d722bc51f4 Send a no-cache content request on mathpurge=true
When the user specifies the mathpurge=true query parameter, the Math
extension needs to prompt RESTBase to regenerate the renders for all
formulae on the page and consequently issue Varnish purge requests. This
behaviour is achieved by including the `Cache-Control: no-cache` header
when requesting a render. Since RESTBase regenerates all of the renders
when it receives the header, send it only for the first content request;
if subsequent content requests are made, RESTBase will already have the
new renders.

Bug: T136205
Change-Id: I44482ccc1d8afdf6d40dcf8965d8debe83ef7e17
2016-06-03 14:10:57 +02:00
Moritz Schubotz 2fc8fa6ccd Fix: Update png fallback
In Ifdd75ce51076b098af67a96b5dcb0fc0726d2b00
I missed to update the png fallback mechanism
given the fact that SVG is now a <img element
as well and no longer a <meta tag.

Bug: T136905
Change-Id: If1b4fb11cfb50eab98f847674fdbef2cd0e43e37
2016-06-03 10:10:06 +02:00
Moritz Schubotz 349d7cfc16 Use img instead of meta tags for SVGs
* replace meta tag with img tag
* remove js workaround for IE

Bug: T136709
Change-Id: Ifdd75ce51076b098af67a96b5dcb0fc0726d2b00
2016-06-02 12:12:32 +02:00
Moritz Schubotz 76fcd6e42c Fix iterator in batchGetMathML
In case there was an error with a check request the SVG size
information was not assigned to the correct SVG image.
This was due to this obvious bug in the batchGetMathML
iterator.

Bug: T136688
Change-Id: Ib2660597a6fb6ef96ba0c5c0ee0fa396b0ea3a24
2016-06-02 10:42:15 +02:00
Translation updater bot fcbf2ba093 Localisation updates from https://translatewiki.net.
Change-Id: If7c4017659043211df00bf39d1b79372c9f31dcc
2016-05-29 22:30:11 +02:00
jenkins-bot b47f9cde91 Merge "Update Gemfile.lock to match Gemfile" 2016-05-28 10:20:04 +00:00
Kunal Mehta 1bd300e896 build: Updating mediawiki/mediawiki-codesniffer to 0.7.2
Change-Id: I8f8573720a245514bb2985c765de120b2eabb4f9
2016-05-27 18:21:41 -07:00
Ed Sanders dba9d04c8c Load math styles with VE
We could load them async in the view node and the dialog
but the file is so small.

Bug: T136407
Change-Id: I7feb63cc2d8cb8975b714066aef1934c248f4ca1
2016-05-27 15:04:30 +01:00
James D. Forrester 9b6f6c7300 Follow-up 3f456b1: Fix typo in function call
Bug: T132736
Change-Id: I36862baf287efe275d5b5fdc3bef911b7815a762
2016-05-26 09:22:33 -07:00
Gergő Tisza da292a14ed Update Gemfile.lock to match Gemfile
Change-Id: I5cae1720be75a957d08beaa65a878008a654cb86
2016-05-26 13:43:08 +02:00
Gergő Tisza 343a32cff6 Update mediawiki_api gem to 1.7.1
Required for selenium test compatibility with AuthManager

Bug: T135884
Change-Id: Ied73b999f410b5b67350ca68032910a262105f3a
2016-05-26 01:34:35 +02:00
Ed Sanders 7ce033ebe7 Remove grunt-cli
Now included by grunt.

Change-Id: I79f2533f9e245e85728ec34c3094780c769a954a
2016-05-24 14:24:51 +01:00
Ed Sanders f370bac1a4 Update stylelint config version
Change-Id: I078ca58a605d6784c4673373911ab89d55c78c16
2016-05-24 13:54:49 +01:00
Frédéric Wang be7be3becb Remove woff fonts
1) Because enabling native MathML now requires special configuration steps
  from the users, they can as well just check their math font setup. Hence we
  remove the Web font fallback.
2) We then can actually just remove ext.math.desktop.css since no specific
  style is necessary any more on desktop.
3) We also no longer need to add the Web font to the list of font-family on
  the <math> element. We actually just remove the whole font-family rule so
  that it is up to web engines developers & users to decide the best math font
  to use (e.g. via the "Fonts for mathematics" option in the font preference
  menu of Firefox).

Change-Id: I1818d288b0f28715a460e3163590e4d0374c42b4
2016-05-23 14:52:59 +00:00
Ed Sanders 7fa037e120 Fix watch path for css
Change-Id: I854cc44e4848ef077c5e1325ede840c6cc1d5721
2016-05-20 14:01:31 +01:00
Ed Sanders e2139b1657 build: Introduce stylelint to lint for css errors
Also update the rest of the CI world whilst we're at it.

Change-Id: Iaad2867797cccb2dd0df7758e448b553859fa62c
2016-05-19 19:16:00 +01:00
Željko Filipin c4636667d4 Fix Cucumber scenario that is broken in daily Jenkins jobs
"Welcome to Wikipedia" popup broke the scenario.

Bug: T94150
Change-Id: I5d3b41b8f3060f6edc41a5afe2c992fc6faca4e7
2016-05-16 18:11:59 +02:00
physikerwelt a5ddbd031d Catch exceptions thrown by restbase
Display the error message on the screen,
but do not throw an exception.
The extension will be available from the error log.

Bug: T134652
Change-Id: I5e88e74df6cd534d138d65251615066bab663368
2016-05-11 02:47:20 -04:00
addshore ea01eba2ae composer.json mediawiki/mediawiki-codesniffer to 0.7.1
Change-Id: I4b6fe136d1f5eac9e425c3883e1eb88383510119
2016-05-08 19:17:24 +01:00
Translation updater bot 9981e6c60e Localisation updates from https://translatewiki.net.
Change-Id: I3a0053e79a7d44c7ef0405baefd01bf83d456b86
2016-05-03 22:25:48 +02:00
Moritz Schubotz af2396cc06 Use the cached version of checkTex to improve performance
Bug: T132096
Change-Id: Ia327b4fac7d826ba24027b9f5cea8ba45c7d9017
2016-04-30 20:40:12 +00:00
jenkins-bot db767e9e5e Merge "Fixed broken Selenium test" 2016-04-27 14:53:14 +00:00
Translation updater bot 9c9374f9e6 Localisation updates from https://translatewiki.net.
Change-Id: I4db214eb8011d85c0e0e5159308961e77e7c42be
2016-04-26 22:29:22 +02:00
Željko Filipin d2ff0ef699 Fixed broken Selenium test
The test is broken on beta cluster because the formula is rendered as
meta tag. It is rendered at img tag on my mediawiki-vagrant virtual
machine. The test now works on both environments.

Bug: T128190
Change-Id: I458d618af24533d104fcac25a8d8c6468b14605a
2016-04-26 19:07:49 +02:00
jenkins-bot 289e0d3031 Merge "Remove some obsolete CSS rules that are no longer needed in Firefox ESR 45: - Use the non-math font Cambria first (fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=598900). - Set line-height to normal (fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=1187673)." 2016-04-25 18:10:44 +00:00
jenkins-bot 462178f320 Merge "Migration of browsertests* Jenkins jobs to selenium* jobs" 2016-04-25 17:05:39 +00:00
Željko Filipin 7bc7a0cabf Migration of browsertests* Jenkins jobs to selenium* jobs
selenium* jobs are a new way of running Ruby based Selenium tests. The
jobs are triggered daily.

Bug: T128190
Change-Id: Ide349ea15e0c38ff9f61d348abd61cd2349a83f6
2016-04-25 18:31:00 +02:00
Frédéric Wang d808880450 Remove some obsolete CSS rules that are no longer needed in Firefox ESR 45:
- Use the non-math font Cambria first (fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=598900).
- Set line-height to normal (fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=1187673).

Change-Id: I19836285e08c2996d611a47361bbb5f9e9eb6921
2016-04-25 16:28:11 +00:00
Moritz Schubotz f071dbcf80 Remove Firefox specific CSS styles
The Firefox specific CSS changes require a special
setup of math fonts on the system. To avoid problems
OS dependent behavior, this browser specific modifications
are removed from the ext.math.css file.
There are a couple of places, where people can overwrite
their CSS rules individually.

For example from version 1.8 the plugin 
cf. de1eec2f0d
Note that this change will make things worse for users
that chose the MathML rendering option and managed to
configure their font setup right.

Change-Id: I5a376904a01a46634eea2160e02736df74cd0b5f
2016-04-24 20:32:28 +00:00
Translation updater bot 3983dcb20b Localisation updates from https://translatewiki.net.
Change-Id: I580d4b413b5c3633e4ec154c0d6bcf3a71d48dc3
2016-04-22 22:23:22 +02:00
physikerwelt 6b984122a1 Ensure use of ; to seperate svg styles
It was reported that under certain circumstances a semicolon was
missing from the SVG style.

Bug: T132563
Change-Id: I148433657848fdc74889fcaf6d883078c46a4006
2016-04-21 08:55:21 +00:00
physikerwelt 0d55341ff9 Fix: Convert all array() syntax to []
The signature of the Hook function is not respected.
Thus parameters need to be passed by reference explicitly.
For syntax validation to pass, this requires
mediawiki-codesniffer to 0.6.0

Change-Id: I90b6501000200c1b462407b769113358eb5c762f
2016-04-19 21:41:42 +00:00
physikerwelt 6f7bcaf2c6 Update to mediawiki-codesniffer 0.6.0
Change-Id: I2a1a74c771bc00f6c1569568dfcf474f06714426
2016-04-19 17:07:21 -04:00
jenkins-bot 950c0596ca Merge "Make short mode for the math dialog" 2016-04-19 19:22:23 +00:00
Thalia a5e6d22495 Make short mode for the math dialog
When the math dialog's menuLayout height is below 450 px,
make the symbol menu and the preview element shorter, so
the input is still in view. (This works until about
280px, below which the user will need to scroll down to
use the input.

Bug: T121150
Change-Id: I9e41cce80c3f770b1e3d0e7b133470045a1afe67
2016-04-19 19:50:17 +01:00
physikerwelt 0b17471332 Use img element to display SVGs in new IEs
InternetExplorer versions that do support SVG images
have problems rendering  these in meta tags.
Replacing meta tags with img elements resolves the problem.

Bug: T132491
Change-Id: I353e911a8e2066c10d8df583cae88861a8623816
2016-04-19 17:16:50 +00:00
Translation updater bot 9b9e135b4b Localisation updates from https://translatewiki.net.
Change-Id: I53cf4fca43982872d7fcc85828d6f502c399cfd0
2016-04-16 23:13:10 +02:00
Marko Obrovac d8e172f713 Allow the number of concurrent connections to be configurable
The MultiHttpClient class allows the user to set the number of
concurrent connections it keeps open. This patch simply allows users of
the Math extension to set it when connecting to RESTBase.

Note that this patch is effectively a no-op, since MultiHttpClient's
default is (also) 50.

Bug: T132096
Change-Id: If9b6e61ffa23f8d22b3aab874058e809ff4c74b8
2016-04-13 21:31:29 +02:00
physikerwelt 6699724d65 Convert all array() syntax to []
Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Change-Id: I1d2604e3f246ede58ff8245ba2b940f258d2d80c
2016-04-13 10:18:23 -04:00
Translation updater bot 005647a686 Localisation updates from https://translatewiki.net.
Change-Id: I7bd7cc2bcedc3d561a72863b74f81673c69455cf
2016-04-12 22:53:41 +02:00
Mobrovac befca260c4 Merge "Reduce number of Restbase requests" 2016-04-12 15:53:53 +00:00
jenkins-bot 86f359ec30 Merge "Add inverse of texToClass function in comment" 2016-04-12 15:29:34 +00:00
jenkins-bot e00af78d9a Merge "Use new executeCommand method" 2016-04-12 15:20:29 +00:00
physikerwelt 2f8c92cb79 Reduce number of Restbase requests
This change reduces the number of Restbase requests to two
by bundling all requests for MathML

Bug: T132096
Change-Id: Idfc29eeeca754738fe78ca0372e6b6725065528d
2016-04-12 15:13:26 +00:00
Ed Sanders 4010978ebf Add inverse of texToClass function in comment
Change-Id: Iba9658cfb8f413eaff8cdd62b6b7b2d836c5b23d
2016-04-12 15:01:04 +01:00
Ed Sanders dba01a653e CSS code style: spaces inside parentheses
Change-Id: Ia1324fe4ee98b487b82d01ee0d9cffe284a64811
2016-04-12 14:57:27 +01:00
Ed Sanders 3f456b1931 Use new executeCommand method
Change-Id: I24afd6c94c3224a3ae1f86204ddc16c726833c7c
2016-04-12 14:56:45 +01:00