Fix for the WebInputEventBuilderTest.TestMouseEventScale content_unittests failures on the DrMemory Windows builder.

The test attempts to force a device scale factor via the force-device-scale-factor command line switch. While this works
well in isolation, the test would fail if another test before it forces the device scale factor to something else.

Reason being the device scale factor code uses static variables to determine if the scale factor has been forced and
caches the value. This is done as an optimization as there are lots of calls to the GetDPIScale and related functions.

Fix is to get rid of the static variables used to track if we checked for a forced device scale factor and the forced
scale factor value. These are now global variables which can be reset via a static function
Display::ResetForceDeviceScaleFactor.

The WebInputEventBuilderTest.TestMouseEventScale test calls the above function to reset the forced device scale factor
state.

BUG=411634
TBR=cpu

Review URL: https://codereview.chromium.org/992383002

Cr-Commit-Position: refs/heads/master@{#320049}
3 files changed