mediawiki-extensions-Multim.../tests/qunit/mmv/ui
Gergő Tisza c594a5610a Make max-height computation more stable
Instead of setting the parent's height as max height of the
<img> element, find the first parent which has a non-automatic
height (that would be .mw-mmv-image-wrapper).

With the old structure, the height of the parent element could
be determined by the height of the image, which would then be
written back into the max-height of the image, messing up the
aspect ratio. I did not see this in the wild, but it was easy
to reproduce by changing the timing of the resize handler (in
particular, I tried to call the resize handler before loading
the new resolution, to make the UI more responsive, and ran
into this problem). This cannot happen anymore now.

This also fix a bug on some browsers (IE 10, maybe iOS Safari)
where the size of the image could be slightly larger than the
available space, and the bottom of the image was obscured by
the metadata panel. I am still not sure how exactly that
happened, but it was related to the <img> parents with automatic
heights having incorrect height. After making sure the <img>
has a max-height derived from an element with non-automatic
height, I cannot reproduce the bug on IE 10 anymore.

Change-Id: I193aefc42e6d6072717643659a9e4c0c8b7c7e93
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/698
Bug: 66244
2014-06-17 21:20:00 +00:00
..
mmv.ui.canvas.test.js Make max-height computation more stable 2014-06-17 21:20:00 +00:00
mmv.ui.canvasButtons.test.js Rename Buttons to CanvasButtons 2014-03-28 00:10:04 +00:00
mmv.ui.categories.test.js Make categories behave 2014-04-08 19:58:13 +00:00
mmv.ui.description.test.js Merge MultiLightbox into MultimediaViewer 2014-02-25 02:00:13 +00:00
mmv.ui.fileUsage.test.js Use mw-mmv CSS prefix consistently for all things 2014-03-31 21:33:12 +00:00
mmv.ui.metadataPanel.test.js Tooltips for loads of things 2014-06-12 12:27:04 -07:00
mmv.ui.metadataPanelScroller.test.js Toggle metadata panel on up/down keypress 2014-06-10 20:10:42 +00:00
mmv.ui.permission.test.js Make $.animate a noop in some tests to avoid conflicts 2014-03-29 20:56:06 +01:00
mmv.ui.progressBar.test.js Refactor progressbar & blur handling 2014-05-01 21:09:28 +00:00
mmv.ui.reuse.dialog.test.js Load oojs-ui on demand when "use this file" is clicked 2014-04-14 11:50:05 +02:00
mmv.ui.reuse.download.test.js Use original URL when setting download for original 2014-06-09 18:30:07 +00:00
mmv.ui.reuse.embed.test.js Fix text selection behavior in reuse panel 2014-05-21 22:00:46 +00:00
mmv.ui.reuse.share.test.js Fix text selection behavior in reuse panel 2014-05-21 22:00:46 +00:00
mmv.ui.reuse.tab.test.js Add share panel, replace reuse 2014-03-19 02:06:21 +00:00
mmv.ui.reuse.utils.test.js Download tab, basic download and preview 2014-04-02 23:00:28 +00:00
mmv.ui.stripeButtons.test.js Use Repo.isCommons() for deciding whether an image is from Commons 2014-06-11 21:14:14 +00:00
mmv.ui.test.js Add named timeouts to mw.mmv.ui.Element 2014-04-07 21:20:59 +00:00
mmv.ui.truncatableTextField.test.js Add truncatable text field, use for some fields 2014-04-09 15:53:37 -07:00