Fix if framed

* windowResize dose not fire when we are in a frame.
* portrait/landscape check never change because iframe size is always the same.