New issue
Advanced search Search tips
Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Launch-OWP
Launch-Accessibility: NA
Launch-Exp-Leadership: ----
Launch-Leadership: ----
Launch-Legal: NA
Launch-M-Approved: 59-Dev
Launch-M-Target: 59-Dev
Launch-Privacy: NA
Launch-Security: NA
Launch-Test: NA
Launch-UI: NA

Blocked on:
issue 651767

Blocking:
issue 674593



Sign in to add a comment
link

Issue 697598: Deprecate non-standard DeviceOrientation Event initialization functions

Reported by reillyg@chromium.org, Mar 1 2017 Project Member

Issue description

Change description:
Remove the DeviceOrientationEvent.initDeviceOrientationEvent and DeviceMotionEvent.initDeviceMotionEvent functions.

Changes to API surface:

 * Remove DeviceOrientationEvent.initDeviceOrientationEvent
 * Remove DeviceMotionEvent.initDeviceMotionEvent

Links:
Public standards discussion: https://w3c.github.io/deviceorientation/spec-source-orientation.html

Support in other browsers:
Internet Explorer: Deprecated in Edge
Firefox: Shipped
Safari: Shipped
 

Comment 1 by foolip@chromium.org, Mar 3 2017

I think this ought to be blocked on shipping the constructors. If it's shipped everywhere, which seems to be the case, I think we should also default to standardizing instead of removing, but is there something extra icky about there init*Event() methods?

Use counters:
https://www.chromestatus.com/metrics/feature/timeline/popularity/865
https://www.chromestatus.com/metrics/feature/timeline/popularity/866

That very low usage makes it not unthinkable to remove even though we have interop, but some upside to it would be nice.

Comment 2 by reillyg@chromium.org, Mar 3 2017

Clarifying the usage a bit I've found a couple things by searching HTTP Archive which reference these functions:

 * TypeScript has annotations for these functions. Removal will have no effect.
 * Opal (Ruby-to-Javascript transpiler) has bindings for these functions but will attempt to use the constructor first.
 * VR View used to use these functions to generate synthetic DeviceMotionEvents but this code was removed.

Comment 3 by reillyg@chromium.org, Mar 3 2017

Blockedon: 651767
Adding the constructor launch bug as a blocker.

Comment 4 by reillyg@chromium.org, Mar 3 2017

I'm not sure if this counts as Firefox signaling deprecation but MDN lists initEvent() as deprecated:

https://developer.mozilla.org/en-US/docs/Web/API/Event/initEvent

It does not document these methods at all.

Comment 5 by reillyg@chromium.org, Mar 6 2017

Labels: -M-58 -Launch-M-Target-58-Dev Launch-Legal-NA Launch-M-Target-59-Dev Launch-Security-NA Launch-Test-NA
Summary: Deprecate non-standard DeviceOrientation Event initialization functions (was: Remove non-standard DeviceOrientation Event initialization functions)
foolip@ suggests taking this a bit more slowly so I'm going to change this to a deprecation.

We've missed the M-58 branch point so retargeting for M-59.

Comment 6 by foolip@chromium.org, Mar 9 2017

Blocking: 674593

Comment 7 by foolip@chromium.org, Mar 9 2017

reillyg@, is there no Blink>Foo component that covers this? Of the blocking bugs on issue 674593, this is the only one where I don't know which component to pick. (Doesn't matter since you're working on it, just seems odd.)

Comment 8 by bugdroid1@chromium.org, Mar 17 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0921e8319f228e406019b434701ac9f181ee8ea1

commit 0921e8319f228e406019b434701ac9f181ee8ea1
Author: reillyg <reillyg@chromium.org>
Date: Fri Mar 17 19:27:01 2017

Remove non-standard DeviceOrientation Event initializers.

This patch removes DeviceOrientationEvent.initDeviceOrientationEvent
and DeviceMotionEvent.initDeviceMotionEvent and rewrites the LayoutTests
to use the constructors for these objects instead.

https://www.w3.org/TR/2016/CR-orientation-event-20160818/

BUG= 697598 

Review-Url: https://codereview.chromium.org/2728963004
Cr-Commit-Position: refs/heads/master@{#457849}

[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/LayoutTests/device_orientation/motion/optional-event-properties-expected.txt
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/LayoutTests/device_orientation/motion/optional-event-properties.html
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/LayoutTests/device_orientation/orientation/optional-event-properties-expected.txt
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/LayoutTests/device_orientation/orientation/optional-event-properties.html
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[delete] https://crrev.com/6f7dd6b21b0aa119cc9415a1b714bb106646a066/third_party/WebKit/Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/Source/bindings/modules/v8/custom/custom.gni
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.cpp
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.h
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.idl
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.h
[modify] https://crrev.com/0921e8319f228e406019b434701ac9f181ee8ea1/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.idl

Comment 9 by reillyg@chromium.org, Mar 17 2017

Labels: Launch-M-Approved-59-Dev
Status: Fixed (was: Assigned)
Marking launch approved per LGTMs on the blink-dev Intent to Deprecate and Remove thread:

https://groups.google.com/a/chromium.org/d/msg/blink-dev/XlnBk6qzkuw/u5TZshloEAAJ

Comment 10 by reillyg@chromium.org, Apr 19 2017

Components: -IO>DeviceOrientation Blink>Sensor

Sign in to add a comment