Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Media Controls] Avoid SECURITY_DCHECK when casting events
Both MediaControlsOrientationLockDelegate and MediaControlsRotateToFullscreenDelegate would incorrectly call ToDeviceOrientationEvent on synthetic events created by the webpage whose type name was "deviceorientation", even if they weren't instances of DeviceOrientationEvent. This patch fixes that. It also checks that the events are trusted, to avoid using deviceorientation values synthesized by the webpage (other event listeners in these classes don't use values from the event object, so it's less important for them to be trusted). Bug: 761613,760737 Change-Id: I318d10e3b6dd84277a47b06546fd4c3ebcdb03cb Reviewed-on: https://chromium-review.googlesource.com/647929 Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Commit-Queue: John Mellor <johnme@chromium.org> Cr-Commit-Position: refs/heads/master@{#499515}
- Loading branch information