Here are two commits: the patch for this ticket, and a fixup to our regression tests. I didn't see a good way to test for "orientationchange" events, but by following the code flow, I believe the orientation data will be correctly spoofed.
r=mcs, r=brade
These changes look good. Should we also skip dispatching of the orientation change events when ShouldResistFingerprinting() returns true? Generating the events will allow a website to detect that my device can change orientation.
r=mcs, r=brade
These changes look good. Should we also skip dispatching of the orientation change events when ShouldResistFingerprinting() returns true? Generating the events will allow a website to detect that my device can change orientation.
Thanks for the review. Here's a new version that blocks "orientationchange" and "mozorientationchange" events from being dispatched. I also blocked the use of 'screen.mozLockOrientation' and 'screen.mozUnlockOrientation' for a similar reason.
Thanks for the review. Here's a new version that blocks "orientationchange" and "mozorientationchange" events from being dispatched. I also blocked the use of 'screen.mozLockOrientation' and 'screen.mozUnlockOrientation' for a similar reason.