Last modified: 2014-10-19 14:56:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T22202, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20202 - Web performance: texvc math images do not specify width and height attributes
Web performance: texvc math images do not specify width and height attributes
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
Math (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Derk-Jan Hartman
http://en.wikipedia.org/wiki/White_dwarf
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-12 22:11 UTC by Brion Vibber
Modified: 2014-10-19 14:56 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2009-08-12 22:11:08 UTC
The <img> tags generated by our math module do not list the width or height; this can delay page rendering while the image is loaded, or cause the page to reflow and jump around after the loading is complete:

<img class="tex" alt="E_k \approx \frac{N (\Delta p)^2}{2m} \approx \frac{N \hbar^2 n^{2/3}}{2m} \approx \frac{M^{2/3} N^{5/3} \hbar^2}{2m R^2}." src="http://upload.wikimedia.org/math/b/7/e/b7e74c9f6c091d2c1e157e29381a5132.png" />

Note we probably need to change the math table so we actually record the size...
Comment 1 Bryan Baron 2009-10-26 02:21:12 UTC
Specifying this will change the rendering behavior?
Comment 2 p858snake 2009-10-26 02:27:39 UTC
Kind of, the browser whilst reading the page source and loading it will know the dimensions and then reserve that area till the image loads (or fails depending on the browser). 
Comment 3 Derk-Jan Hartman 2013-05-26 20:29:15 UTC
On the MathTexvc's callTexvc(), run php's getimagesize() on the temp file result. (we need field 0 and field 1)

Get connection to master, write values in new column(s)
Read these values from slave in getMathImageHTML()

http://php.net/manual/en/function.getimagesize.php
Comment 4 physikerwelt 2014-02-08 16:55:15 UTC
@TheDJ: Are you still woking on this? I wanted to clean up old bugzilla messages.
Comment 5 Derk-Jan Hartman 2014-04-17 14:43:22 UTC
no, i'm not working on it, but i still think we should add it.

generate file, use phpimagesize, store values in db, use them in generated html.
Comment 6 Gerrit Notification Bot 2014-04-27 16:21:02 UTC
Change 129974 had a related patch set uploaded by TheDJ:
Math: Retrieve dimensions of math images

https://gerrit.wikimedia.org/r/129974
Comment 7 Derk-Jan Hartman 2014-04-27 16:22:17 UTC
Done mostly as a proof of concept now
Comment 8 Gerrit Notification Bot 2014-07-20 13:38:43 UTC
Change 144939 had a related patch set uploaded by Physikerwelt:
Add width and height to SVG image

https://gerrit.wikimedia.org/r/144939
Comment 9 Gerrit Notification Bot 2014-07-26 14:38:13 UTC
Change 144939 merged by Frédéric Wang:
Add width and height to SVG image

https://gerrit.wikimedia.org/r/144939
Comment 10 Frédéric Wang 2014-07-26 14:39:06 UTC
(In reply to Gerrit Notification Bot from comment #9)
> Change 144939 merged by Frédéric Wang:
> Add width and height to SVG image
> 
> https://gerrit.wikimedia.org/r/144939

This is really only for the SVG images. The PNG still need some width/height attributes, IIUC.
Comment 11 Gerrit Notification Bot 2014-10-12 15:09:26 UTC
Change 129974 abandoned by Physikerwelt:
Math: Retrieve dimensions of math images

Reason:
conserved in https://www.mediawiki.org/wiki/Extension:Math/Roadmap#Bugs_and_Roadmap_and_random_thoughts_.28From_the_discussion_page.29 feel free to restore if any development on that is planned

https://gerrit.wikimedia.org/r/129974

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links