Bug 848625 - make image editing work after orientation changes r=djf(che...

...rry picked from commit 3010edd727863a657a3ef784ed7cbce4844e5c4a)