Merge "Correctly set the viewport on window resize."