Chrome in particular would end up with fairly small and inconsistent
background sizes when using background-size: contain;. This makes sense
according to the docs at
https://developer.mozilla.org/en-US/docs/Web/CSS/background-size, which
doesn't specify that the background actually has to fill the entire element.
background-size: 100% 100%; does force full-size scaling, which is what we
want. Verified to work as expected in Chrome 38 on Linux.
Change-Id: I508e08dac1480491efcd1d27cfac16187bfbd4fe
HTML tidy will strip empty spans, so don't use one for the fallback image. We
use a meta element instead, as that does not normally render at all & doesn't
have any default styling coming with it.
Change-Id: I5bcbbc9468433e3c8722c09ce813a6f5ac741333
- Use span with a background-image instead of <img> for the fallback SVG so
that they don't load in Gecko.
- Make the image fallback a span inline-block so that it can have a dimension.
Bug: 71929
Change-Id: I7f820cd5766db1fece452ebfc72915a55e42c82e
- Merge fallback-svg and fallback-png into one fallback-image class.
- Move the vertical centering of PNG to MathTexvc and ext.math.js.
- Remove "img" from ext.math.css to reduce CSS specificity and make
style easier to override by user stylesheets.
- Add a comment about the !important rules for centering in
display mode.
- Only load ext.math.scripts in MathML mode.
Bug: 71955
Change-Id: If8ee1cf6453257a0a2f6aa186d4007954a8e5d8e
- Remove the special handling for the PNG fallback in
getFallbackImageUrl, getFallbackImage and getClassName.
- Make these functions private and remove useless parameters.
Bug: 71912
Change-Id: I569f2dd3d32a0c9690a5d9674a1c6ae0b8698f08
- remove the default "display: none" style on the SVG fallback
- remove the IE CSS hacks from ext.math.css
- add a client-side implementation of the PNG fallback
Bug: 71912
Change-Id: I91b11313aae25c4d05f8f2333d2f21537c9b8887
When MathPlayer is installed, we show the MathML instead of the SVG fallback.
This will in particular allow the sync highlighting feature of MathPlayer.
This also introduces a module ext.math.js that could be used to do some
Javascript postprocessing.
Bug: 71748
Change-Id: I438a20032c312d12321ca4c5686bcfd107656b37
- These images currently return server errors
- We don't really want to load PNG images for browsers that support MathML or
SVG.
Bug: 69702
Change-Id: Idd339623efd19a0726b43a6c4adc2fcd832511f6
- Mark the png and svg fallback as aria-hidden="true".
- For browsers without good enough MathML visual rendering,
hide the <math> tag in a way that still makes it accessible to
screen readers.
Bug: 66537
Change-Id: I7ecf07a4da669d927e11265fd497a813786c6410
Use the cached function isInDatabase rather than readFromDatabase to
avoid unnecessary read operations on the database.
Currently, readFromDatabase is usually called only once during instance
livetime. But after I455b41c8b8d918f4c34f6c115194d227a8394e0a has bben
merged chances are that it's called twice.
Change-Id: I6434195ad1d323a578a8fdca1b4555e11ab30a15
Currently the error reporting in MathML mode is
misleading.
The old error message suggested that the MathML
produced is not well formed.
This change displays the actual error
message occurred during the conversion process.
Change-Id: I6a8201107f9280f0cba97509f19b97d8e248c99f
In the default style MathML was rendered as inline and
not as display-style which was consistent to the current
behaviour of the PNG rendering.
By using the 'inline-TeX' rendering type the
display rendering is done independent of the rendering
of the surrounding block layout.
Change-Id: I87e669d5dc71d6937d4cc987d306b3c4648773c4
The PNG fallback for old IE versions worked
only if the PNG image was already stored in the
database.
This change enables the Specialpage that displays
the PNG images to create new PNG images and to
show them directly.
To test this commit you need an old IE version
(IE<9). If you don't have access you can use
an online service such as http://netrenderer.com.
Change-Id: I74163da94e2d7a2f07d78bfe0f5ce134564ba97f
Beginning from Mathoid 0.2.5 the specification
of a height and width attribute of the image will be required.
This patch gets those information from the SVG and copies
them to the img tag.
See also
Bug: 20202
Bug: 68295
Change-Id: I93e26a9f538acf21aea1501144bb1dd886ae0410
In some cases for example if the vagrant role
mobilefrontend is enabled the stylesheets are not
processed on mobile devices.
Without a default setting for the display attribute
all elements are displayed at the same time.
Change-Id: Ic0e95effaf0b413ec4c5878e1cfd5c269daa44c3
Beginning from mathoid 0.2.5 displaystyle is the default
option. This property has to be removed as default.
Change-Id: I3c176f4227f32709f6db4014e1e3b435c3c853c4
Currently, the PNG fallback is hidden in the MathML mode and the MathML & SVG
are respectively hidden and visible by default; the visibility of the
SVG/MathML output is only changed for Gecko. This does not work well for
IE < 9, which does not support SVG. This commit tries to improve the selection
of PNG, SVG or MathML according to the browser capatibility.
Change-Id: Ie9b0fdb66c51fbf6be98df092ce4de29fbba6068
This change allows to registered users
to test the new MathML rendering mode.
Invalid settings for math rendering mode
will default to MathMathML.
Change-Id: I75f24cb762609d6728247e3758fcc18f2ebfc6e6
Currently the method render always returns
a html string that can be a string that
represents the correct result or a rendered
error message.
This change splits rendering and
fetching of the HTML output.
This simplifies the logic of the rendering
and caching mechanism.
Now the render method returns a boolean that
indicates if the rendering was sucessful or
not.
Step 2/2
Warning: Errors in this change might affect
caching logic and squid caches.
Change-Id: I00502b84212ed70cdf63bd69916a35afbd6fdbc1
Currently the method render always returns
a html string that can be a string that
represents the correct result or a rendered
error message.
This change adds a mechanism that allows
to fetch the HTML output.
In a followup commit the rendering function
is changed to return a boolean value rather
than the rendering result.
This will simplify the error handling and caching.
Change-Id: I80760493e391911c41eb69d75a93c6a34db8852e
The LaTeXML class contains some code that is
not specific to LaTeXML but to MathML.
This code can be shared between LaTeXML and Mathoid.
This change introduces a new class called MathMathML
and moves the shared code from the LaTeXML class to this
new class.
Bug: 65973
Change-Id: I50517ba83f9a0d2aa8e237f062f18e4319ddbac8