|
|
Fire null Device Motion events only once.
This CL makes sure that the all-null events are fired only once. This lets the developers determine that no motion information can be provided and allows to save battery.
Summarized this CL also implements the following features:
- Unregister controller when receiving a null event.
- Don't fire controllers removed or added during event dispatch.
- Purge the controllers asap, i.e. not only on dispatch. This is also necessary to save battery in the case of Device Orientation events which fire only when substantially changed.
Layout-Tests:
- Tests for firing all null or partial null events.
- Tests no firing of listeners added during event dispatch.
- Tests firing last available event in case of multiple iframes.
BUG= 263415
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155340
Total comments: 18
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+462 lines, -24 lines) |
Patch |
 |
A |
LayoutTests/fast/dom/DeviceMotion/add-during-dispatch.html
|
View
|
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/dom/DeviceMotion/add-during-dispatch-expected.txt
|
View
|
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/dom/DeviceMotion/fire-last-event.html
|
View
|
1
|
1 chunk |
+85 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/dom/DeviceMotion/fire-last-event-expected.txt
|
View
|
|
1 chunk |
+29 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
LayoutTests/fast/dom/DeviceMotion/null-values.html
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/dom/DeviceMotion/null-values-expected.txt
|
View
|
|
1 chunk |
+49 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/dom/DeviceMotion/script-tests/add-during-dispatch.js
|
View
|
|
1 chunk |
+71 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/dom/DeviceMotion/script-tests/null-values.js
|
View
|
|
1 chunk |
+101 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceMotionController.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceMotionController.cpp
|
View
|
1
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceMotionData.h
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceMotionData.cpp
|
View
|
1
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceMotionDispatcher.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceMotionDispatcher.cpp
|
View
|
1
|
2 chunks |
+13 lines, -8 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceOrientationData.h
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceOrientationData.cpp
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
|
View
|
1
|
2 chunks |
+12 lines, -7 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceSensorEventController.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceSensorEventController.cpp
|
View
|
|
4 chunks |
+14 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceSensorEventDispatcher.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/DeviceSensorEventDispatcher.cpp
|
View
|
1
|
3 chunks |
+20 lines, -6 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/NewDeviceOrientationController.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/modules/device_orientation/NewDeviceOrientationController.cpp
|
View
|
1
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
Total messages: 10 (0 generated)
|