Bug 1107759 - Fix window resizing and replace dpi support with pixel ratio. r=fabrice