Bug 889765 - [MMS] Resizing algorithm is not working properly

- Fix bug : https://bugzilla.mozilla.org/show_bug.cgi?id=889765.