Page MenuHomePhabricator Calling `this.scalable.setDefaultDimensions( {} );` is a no-op
Closed, ResolvedPublic1 Estimated Story Points

Description calls this.scalable.setDefaultDimensions( {} );, however, 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 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 subscribers: StudiesWorld, Aklapper. · View Herald Transcript

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

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