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

...rry picked from commit 3010edd727863a657a3ef784ed7cbce4844e5c4a)

(cherry picked from commit 664f2ea949a0503dfc54a82e373882ab59fb559a)