Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Issue 143823004: Implement DeviceLight (Closed)

Created:
6 years, 11 months ago by riju_
Modified:
6 years, 7 months ago
CC:
blink-reviews, jamesr, arv+blink, dglazkov+blink, watchdog-blink-watchlist_google.com
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Implement DeviceLight Initial implementation, behind a runtime flag. This CL is meant for the blink side. The android and Mac side code will be followed up in subsequent CLs. Content/Chrome side CL with Android implementation -> https://codereview.chromium.org/152893002/ Spec: https://dvcs.w3.org/hg/dap/raw-file/default/light/Overview.html Intent to Implement mail: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/AAtN0xjI9Gc BUG=336424 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173798

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : WebRuntime Features export #

Patch Set 4 : #

Patch Set 5 : Rebase #

Patch Set 6 : Add Layout Tests + Rebase #

Patch Set 7 : rebase #

Patch Set 8 : DeviceLight API working fine (make the flag back to status=experimental) #

Total comments: 12

Patch Set 9 : Work in Adam's comments #

Total comments: 18

Patch Set 10 : Incorporate Chris's comments #

Patch Set 11 : Chris's comments #

Patch Set 12 : fix const #

Patch Set 13 : rebase after r169270 #

Total comments: 8

Patch Set 14 : fix webruntimefeatures #

Total comments: 12

Patch Set 15 : Event not Oilpan-ed yet. Add a test back #

Total comments: 6

Patch Set 16 : remove script dir + rebase #

Patch Set 17 : Layout test fix #

Total comments: 4

Patch Set 18 : fix Tim's comments #

Total comments: 2

Patch Set 19 : Initialize m_lastDeviceLightData to -1 #

Total comments: 13

Patch Set 20 : Fix Chris's comments #

Patch Set 21 : rebase after r172146 #

Total comments: 5

Patch Set 22 : Tim's comments #

Patch Set 23 : Rebase after r172920 #

Total comments: 24

Patch Set 24 : Chris's comments #

Total comments: 6

Patch Set 25 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+524 lines, -13 lines) Patch
A LayoutTests/fast/dom/DeviceLight/create-event.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +38 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/DeviceLight/create-event-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/DeviceLight/window-property.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/DeviceLight/window-property-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +13 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/webexposed/global-constructors-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/events/EventTypeNames.in View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
A + Source/modules/device_light/DOMWindowDeviceLight.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -8 lines 0 comments Download
A Source/modules/device_light/DeviceLightController.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +47 lines, -0 lines 0 comments Download
A Source/modules/device_light/DeviceLightController.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +105 lines, -0 lines 0 comments Download
A Source/modules/device_light/DeviceLightDispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +41 lines, -0 lines 0 comments Download
A Source/modules/device_light/DeviceLightDispatcher.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +75 lines, -0 lines 0 comments Download
A Source/modules/device_light/DeviceLightEvent.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +56 lines, -0 lines 0 comments Download
A Source/modules/device_light/DeviceLightEvent.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +43 lines, -0 lines 0 comments Download
A Source/modules/device_light/DeviceLightEvent.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +10 lines, -0 lines 0 comments Download
A + Source/modules/device_light/WindowDeviceLight.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -3 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 chunks +9 lines, -0 lines 0 comments Download
M Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/FrameLoaderClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +3 lines, -0 lines 0 comments Download
M public/platform/Platform.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +8 lines, -2 lines 0 comments Download
A public/platform/WebDeviceLightListener.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (0 generated)
riju_
Hi Adam, I put this CL as a monolithic chunk just to get and idea ...
6 years, 9 months ago (2014-03-04 17:30:11 UTC) #1
abarth-chromium
I'm not sure everyone on the blink-dev thread was on board. Do you think we ...
6 years, 9 months ago (2014-03-04 18:55:12 UTC) #2
abarth-chromium
This CL generally looks fine from a technical point of view. Below are some very ...
6 years, 9 months ago (2014-03-04 18:59:31 UTC) #3
riju_
Thanks for the comments. Yes I agree we need to get a consensus on blink-dev ...
6 years, 9 months ago (2014-03-05 15:47:27 UTC) #4
Inactive
https://codereview.chromium.org/143823004/diff/350001/Source/core/frame/Window.idl File Source/core/frame/Window.idl (right): https://codereview.chromium.org/143823004/diff/350001/Source/core/frame/Window.idl#newcode181 Source/core/frame/Window.idl:181: [RuntimeEnabled=DeviceLight] attribute EventHandler ondevicelight; I don't know that the ...
6 years, 9 months ago (2014-03-07 19:29:52 UTC) #5
abarth-chromium
https://codereview.chromium.org/143823004/diff/350001/Source/core/frame/Window.idl File Source/core/frame/Window.idl (right): https://codereview.chromium.org/143823004/diff/350001/Source/core/frame/Window.idl#newcode181 Source/core/frame/Window.idl:181: [RuntimeEnabled=DeviceLight] attribute EventHandler ondevicelight; On 2014/03/07 19:29:52, Chris Dumez ...
6 years, 9 months ago (2014-03-08 06:44:19 UTC) #6
Inactive
On 2014/03/08 06:44:19, abarth wrote: > https://codereview.chromium.org/143823004/diff/350001/Source/core/frame/Window.idl > File Source/core/frame/Window.idl (right): > > https://codereview.chromium.org/143823004/diff/350001/Source/core/frame/Window.idl#newcode181 > ...
6 years, 9 months ago (2014-03-08 13:51:48 UTC) #7
Inactive
On 2014/03/08 06:44:19, abarth wrote: > https://codereview.chromium.org/143823004/diff/350001/Source/core/frame/Window.idl > File Source/core/frame/Window.idl (right): > > https://codereview.chromium.org/143823004/diff/350001/Source/core/frame/Window.idl#newcode181 > ...
6 years, 9 months ago (2014-03-08 15:36:32 UTC) #8
riju_
Thanks Chris for the comments. I will wait for [1] to go in. Then I ...
6 years, 9 months ago (2014-03-10 16:17:25 UTC) #9
riju_
Hi Adam, PTAL. I hope it is OK if I add the Layout tests in ...
6 years, 9 months ago (2014-03-18 16:48:55 UTC) #10
abarth-chromium
https://codereview.chromium.org/143823004/diff/440001/Source/modules/device_light/DeviceLightController.cpp File Source/modules/device_light/DeviceLightController.cpp (right): https://codereview.chromium.org/143823004/diff/440001/Source/modules/device_light/DeviceLightController.cpp#newcode80 Source/modules/device_light/DeviceLightController.cpp:80: startUpdating(); What happens when visibilityState() changes? Don't we need ...
6 years, 9 months ago (2014-03-18 22:48:53 UTC) #11
riju_
https://codereview.chromium.org/143823004/diff/440001/Source/modules/device_light/DeviceLightController.cpp File Source/modules/device_light/DeviceLightController.cpp (right): https://codereview.chromium.org/143823004/diff/440001/Source/modules/device_light/DeviceLightController.cpp#newcode80 Source/modules/device_light/DeviceLightController.cpp:80: startUpdating(); On 2014/03/18 22:48:53, abarth wrote: > What happens ...
6 years, 9 months ago (2014-03-19 12:28:13 UTC) #12
abarth-chromium
On 2014/03/19 12:28:13, riju_ wrote: > https://codereview.chromium.org/143823004/diff/440001/Source/modules/device_light/DeviceLightController.cpp#newcode80 > Source/modules/device_light/DeviceLightController.cpp:80: startUpdating(); > On 2014/03/18 22:48:53, abarth ...
6 years, 9 months ago (2014-03-19 17:11:11 UTC) #13
riju_
On 2014/03/19 17:11:11, abarth wrote: > On 2014/03/19 12:28:13, riju_ wrote: > > > https://codereview.chromium.org/143823004/diff/440001/Source/modules/device_light/DeviceLightController.cpp#newcode80 ...
6 years, 9 months ago (2014-03-20 11:31:39 UTC) #14
sof
https://codereview.chromium.org/143823004/diff/460001/Source/modules/device_light/DeviceLightEvent.h File Source/modules/device_light/DeviceLightEvent.h (right): https://codereview.chromium.org/143823004/diff/460001/Source/modules/device_light/DeviceLightEvent.h#newcode27 Source/modules/device_light/DeviceLightEvent.h:27: static PassRefPtrWillBeRawPtr<DeviceLightEvent> create() Make this PassRefPtr<> only for now; ...
6 years, 9 months ago (2014-03-20 16:27:14 UTC) #15
riju_
https://codereview.chromium.org/143823004/diff/460001/Source/modules/device_light/DeviceLightEvent.h File Source/modules/device_light/DeviceLightEvent.h (right): https://codereview.chromium.org/143823004/diff/460001/Source/modules/device_light/DeviceLightEvent.h#newcode27 Source/modules/device_light/DeviceLightEvent.h:27: static PassRefPtrWillBeRawPtr<DeviceLightEvent> create() On 2014/03/20 16:27:15, sof wrote: > ...
6 years, 9 months ago (2014-03-20 20:12:28 UTC) #16
sof
On 2014/03/20 20:12:28, riju_ wrote: > https://codereview.chromium.org/143823004/diff/460001/Source/modules/device_light/DeviceLightEvent.h > File Source/modules/device_light/DeviceLightEvent.h (right): > > https://codereview.chromium.org/143823004/diff/460001/Source/modules/device_light/DeviceLightEvent.h#newcode27 > ...
6 years, 9 months ago (2014-03-20 20:24:21 UTC) #17
riju_
On 2014/03/20 20:24:21, sof wrote: > On 2014/03/20 20:12:28, riju_ wrote: > > > https://codereview.chromium.org/143823004/diff/460001/Source/modules/device_light/DeviceLightEvent.h ...
6 years, 9 months ago (2014-03-20 21:20:13 UTC) #18
riju_
Hi Adam, PTAL and let me know if there are any more blockers for this ...
6 years, 9 months ago (2014-03-21 10:17:39 UTC) #19
abarth-chromium
I'm sorry, but I'm tired of reviewing this CL. It's getting better, but at this ...
6 years, 9 months ago (2014-03-21 13:04:12 UTC) #20
riju_
Hi Adam, Sorry for the delay. I was doing the content side part. A put ...
6 years, 8 months ago (2014-04-03 17:52:53 UTC) #21
timvolodine
a few nits.. https://codereview.chromium.org/143823004/diff/560001/Source/modules/device_light/DeviceLightController.cpp File Source/modules/device_light/DeviceLightController.cpp (right): https://codereview.chromium.org/143823004/diff/560001/Source/modules/device_light/DeviceLightController.cpp#newcode49 Source/modules/device_light/DeviceLightController.cpp:49: return DeviceLightDispatcher::instance().latestDeviceLightData(); can lux sensor value ...
6 years, 8 months ago (2014-04-08 12:59:55 UTC) #22
riju_
Thanks Tim for the comments. https://codereview.chromium.org/143823004/diff/560001/Source/modules/device_light/DeviceLightController.cpp File Source/modules/device_light/DeviceLightController.cpp (right): https://codereview.chromium.org/143823004/diff/560001/Source/modules/device_light/DeviceLightController.cpp#newcode49 Source/modules/device_light/DeviceLightController.cpp:49: return DeviceLightDispatcher::instance().latestDeviceLightData(); On 2014/04/08 ...
6 years, 8 months ago (2014-04-10 12:22:10 UTC) #23
timvolodine
https://codereview.chromium.org/143823004/diff/600001/Source/modules/device_light/DeviceLightDispatcher.h File Source/modules/device_light/DeviceLightDispatcher.h (right): https://codereview.chromium.org/143823004/diff/600001/Source/modules/device_light/DeviceLightDispatcher.h#newcode36 Source/modules/device_light/DeviceLightDispatcher.h:36: double m_lastDeviceLightData; is this initialized somewhere? preferably such that ...
6 years, 8 months ago (2014-04-10 12:43:13 UTC) #24
riju_
https://codereview.chromium.org/143823004/diff/600001/Source/modules/device_light/DeviceLightDispatcher.h File Source/modules/device_light/DeviceLightDispatcher.h (right): https://codereview.chromium.org/143823004/diff/600001/Source/modules/device_light/DeviceLightDispatcher.h#newcode36 Source/modules/device_light/DeviceLightDispatcher.h:36: double m_lastDeviceLightData; On 2014/04/10 12:43:13, timvolodine wrote: > is ...
6 years, 8 months ago (2014-04-10 14:10:40 UTC) #25
riju_
On 2014/04/10 14:10:40, riju_ wrote: > https://codereview.chromium.org/143823004/diff/600001/Source/modules/device_light/DeviceLightDispatcher.h > File Source/modules/device_light/DeviceLightDispatcher.h (right): > > https://codereview.chromium.org/143823004/diff/600001/Source/modules/device_light/DeviceLightDispatcher.h#newcode36 > ...
6 years, 8 months ago (2014-04-14 14:50:10 UTC) #26
Inactive
https://codereview.chromium.org/143823004/diff/620001/LayoutTests/fast/dom/DeviceLight/window-property-expected.txt File LayoutTests/fast/dom/DeviceLight/window-property-expected.txt (right): https://codereview.chromium.org/143823004/diff/620001/LayoutTests/fast/dom/DeviceLight/window-property-expected.txt#newcode6 LayoutTests/fast/dom/DeviceLight/window-property-expected.txt:6: FAIL typeof window.DeviceLightEvent == 'object' should be true. Was ...
6 years, 8 months ago (2014-04-15 15:56:11 UTC) #27
timvolodine
https://codereview.chromium.org/143823004/diff/620001/Source/modules/device_light/DeviceLightController.cpp File Source/modules/device_light/DeviceLightController.cpp (right): https://codereview.chromium.org/143823004/diff/620001/Source/modules/device_light/DeviceLightController.cpp#newcode86 Source/modules/device_light/DeviceLightController.cpp:86: stopUpdating(); On 2014/04/15 15:56:12, Chris Dumez wrote: > This ...
6 years, 8 months ago (2014-04-17 14:35:52 UTC) #28
riju_
Chris , Tim : thanks for all the help and comments. I will add the ...
6 years, 8 months ago (2014-04-22 13:11:28 UTC) #29
riju_
Hi All, PTAL.
6 years, 7 months ago (2014-04-28 12:39:01 UTC) #30
timvolodine
https://codereview.chromium.org/143823004/diff/770001/Source/modules/device_light/DeviceLightController.cpp File Source/modules/device_light/DeviceLightController.cpp (right): https://codereview.chromium.org/143823004/diff/770001/Source/modules/device_light/DeviceLightController.cpp#newcode86 Source/modules/device_light/DeviceLightController.cpp:86: if (eventType != EventTypeNames::devicelight || window->hasEventListeners(EventTypeNames::devicelight)) { the logic ...
6 years, 7 months ago (2014-04-29 14:48:40 UTC) #31
riju_
https://codereview.chromium.org/143823004/diff/770001/Source/modules/device_light/DeviceLightController.cpp File Source/modules/device_light/DeviceLightController.cpp (right): https://codereview.chromium.org/143823004/diff/770001/Source/modules/device_light/DeviceLightController.cpp#newcode86 Source/modules/device_light/DeviceLightController.cpp:86: if (eventType != EventTypeNames::devicelight || window->hasEventListeners(EventTypeNames::devicelight)) { On 2014/04/29 ...
6 years, 7 months ago (2014-04-29 15:59:41 UTC) #32
riju_
6 years, 7 months ago (2014-04-30 10:43:08 UTC) #33
riju_
On 2014/04/30 10:43:08, riju_ wrote: Friendly ping : Tim, PTAL
6 years, 7 months ago (2014-05-06 11:37:47 UTC) #34
timvolodine
lgtm thanks! you'll need owners approval to land this. we'll also need some more Layout ...
6 years, 7 months ago (2014-05-06 12:27:48 UTC) #35
Inactive
https://codereview.chromium.org/143823004/diff/800001/LayoutTests/fast/dom/DeviceLight/create-event.html File LayoutTests/fast/dom/DeviceLight/create-event.html (right): https://codereview.chromium.org/143823004/diff/800001/LayoutTests/fast/dom/DeviceLight/create-event.html#newcode1 LayoutTests/fast/dom/DeviceLight/create-event.html:1: <html> Missing DOCTYPE https://codereview.chromium.org/143823004/diff/800001/LayoutTests/fast/dom/DeviceLight/create-event.html#newcode9 LayoutTests/fast/dom/DeviceLight/create-event.html:9: var event = document.createEvent('DeviceLightEvent'); ...
6 years, 7 months ago (2014-05-06 12:58:07 UTC) #36
riju_
Thanks Tim ! Yes all the other Layout tests will be added in the next ...
6 years, 7 months ago (2014-05-09 12:00:20 UTC) #37
Inactive
lgtm (with nits) but I am not an OWNER for most of these folders. https://codereview.chromium.org/143823004/diff/860001/LayoutTests/fast/dom/DeviceLight/create-event.html ...
6 years, 7 months ago (2014-05-09 13:12:46 UTC) #38
riju_
Thanks Chris for all the review comments. https://codereview.chromium.org/143823004/diff/860001/LayoutTests/fast/dom/DeviceLight/create-event.html File LayoutTests/fast/dom/DeviceLight/create-event.html (right): https://codereview.chromium.org/143823004/diff/860001/LayoutTests/fast/dom/DeviceLight/create-event.html#newcode4 LayoutTests/fast/dom/DeviceLight/create-event.html:4: <script src="../../../resources/js-test.js"></script> ...
6 years, 7 months ago (2014-05-09 13:45:34 UTC) #39
riju_
hi Adam, i think the CL is in a better shape now. Please have a ...
6 years, 7 months ago (2014-05-09 16:30:24 UTC) #40
abarth-chromium
lgtm Looks perfect! Thanks so much, and sorry for being grump earlier in the review.
6 years, 7 months ago (2014-05-10 00:23:08 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rijubrata.bhaumik@intel.com/143823004/880001
6 years, 7 months ago (2014-05-10 00:24:26 UTC) #42
commit-bot: I haz the power
Change committed as 173798
6 years, 7 months ago (2014-05-10 00:42:47 UTC) #43
commit-bot: I haz the power
Failed to apply patch for Source/modules/device_light/DOMWindowDeviceLight.h: File exist but was about to be overwriten Patch: ...
6 years, 7 months ago (2014-05-10 00:43:52 UTC) #44
riju_
6 years, 7 months ago (2014-05-12 10:49:35 UTC) #45
Message was sent while issue was closed.
On 2014/05/10 00:23:08, abarth wrote:
> lgtm
> 
> Looks perfect!  Thanks so much, and sorry for being grump earlier in the
review.

No worries :) Thanks all !!

Powered by Google App Engine
This is Rietveld 408576698