Bug 877602 - Ensure the viewport-remeasure code runs when it's supposed to. r=Cwiiis a=akeybl