Page MenuHomePhabricator

ve.dm.MWImageModel.prototype.resetDefaultDimensions: Calling `this.scalable.setDefaultDimensions( {} );` is a no-op
Closed, ResolvedPublic1 Story Points

Description

ve.dm.MWImageModel.prototype.resetDefaultDimensions calls this.scalable.setDefaultDimensions( {} );, however, ve.dm.Scalable.prototype.setDefaultDimensions does nothing if the dimensions object isn't valid, and {} isn't.

The call is in there since the first revision of MWImageModel (rEVED37b3c07b26bf6df8b80c2ce87e5283977d022b4e), and at the time the call did actually do something. This was changed later in rGVED42c35ddbabdb: Fallback options for receiving bad information into Scalable object.

I have no idea if this is causing any real problems. It's possible that whatever this was meant to do is now being done somewhere else, and it should be removed. It's possible that it should be replaced by a call to clearDefaultDimensions().

Event Timeline

matmarex created this task.Feb 5 2016, 10:36 PM
matmarex raised the priority of this task from to Needs Triage.
matmarex updated the task description. (Show Details)
matmarex added a subscriber: matmarex.
Restricted Application added a project: VisualEditor. · View Herald TranscriptFeb 5 2016, 10:36 PM
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript

Change 268900 had a related patch set uploaded (by Esanders):
MWImageMode: Use clearDefaultDimensions

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

Jdforrester-WMF triaged this task as Low priority.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.
Jdforrester-WMF set Security to None.
Jdforrester-WMF edited a custom field.

Change 268900 merged by jenkins-bot:
MWImageModel: Use clearDefaultDimensions

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