Bug 959962 - Set correct width based on the padding

https://bugzilla.mozilla.org/show_bug.cgi?id=959962