Don't run resize if the content isn't visible.
Merge branch 'master' into api-1.1

Conflicts:
	scripts/cp.js