|| !p8_container || !p8_frame)
		{
			p8_update_layout_hash = -1;
			requestAnimationFrame(p8_update_layout);
			return;
		}

		p8_layout_frames ++;

		// assumes frame doesn't have padding
		
		var is_fullscreen=(document.fullscreenElement || document.mozFullScreenElement || document.webkitIsFullScreen || document.msFullscreenElement);
		var frame_width = p8_frame.offsetWidth;
		var frame_height = p8_frame.offsetHeight;

		if (is_fullscreen)
		{
			// same as window
			frame_width = window.innerWidth;
			f