layout: Stop going to the DOM for iframe sizes

r? @larsbergstrom