Simplify logic for detecting dimensions between inline/iFrame