Page MenuHomePhabricator

mw-default-size should be removed/made optional
Open, MediumPublic

Description

For better interoperability with basic CE editors, we shouldn't let mw-default-size override the image size specified in the width/height attributes.

We should omit the size specification iff the bounding box specified by width/height is equal to the default one. (A data-parsoid attribute can be used to preserve an explicit bounding box if one exists in the source, but this should be an unusual case.)

Need to think through the issues here, this might require adding an imageinfo pass to the wts and/or more expicitly passing the original image dimensions in data-parsoid (or data-mw).


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:52 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz62938.

See bug 62881, which wants to add the original image dimensions to data-mw.

Arlolra triaged this task as Medium priority.Nov 26 2014, 10:29 PM
Arlolra subscribed.

At the moment, we are using mw-default-size to indicate that the image should be scaled from it's "default" size, whether that's a thumbnail or an unscaled image (the latter is not yet supported in wikitext).

Change 779105 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Manualthumb does not do automatic scaling

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

Change 779143 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Drop sizing when serializing frame or manualthumb

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

Change 779575 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/core@master] Don't apply mw-default-size class to framed / manualthumb media

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

Change 779105 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Manualthumb does not do automatic scaling

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

Change 779143 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Drop sizing when serializing frame or manualthumb

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

Change 779949 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/TimedMediaHandler@master] Disable a few parserTests

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

Change 779950 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/TimedMediaHandler@master] Don't apply mw-default-size class to framed / manualthumb media

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

Change 779949 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Disable a few parserTests

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

Change 779575 merged by jenkins-bot:

[mediawiki/core@master] Don't apply mw-default-size class to framed / manualthumb media

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

Change 779950 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Don't apply mw-default-size class to framed / manualthumb media

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

Change 784338 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/vendor@master] Bump parsoid to 0.16.0-a6

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

Change 784341 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/vendor@wmf/1.39.0-wmf.8] Bump parsoid to 0.16.0-a6

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

Change 784338 merged by jenkins-bot:

[mediawiki/vendor@master] Bump parsoid to 0.16.0-a6

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

Change 784341 abandoned by Arlolra:

[mediawiki/vendor@wmf/1.39.0-wmf.8] Bump parsoid to 0.16.0-a6

Reason:

Will just ride the train next week

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

Pppery subscribed.

All relevant patches appear to have been merged. Can this be closed as resolved?

No response, closing.

@Pppery Sorry, this task is on my radar and I will update it shortly.

Change 659467 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/core@master] [WIP] Does upright get the default class?

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

Change 659467 abandoned by Arlolra:

[mediawiki/core@master] [WIP] Does upright get the default class?

Reason:

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