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

Issue 169403006: Screen Orientation API: screen.orientation & orientationchange event (Closed)

Created:
6 years, 10 months ago by Inactive
Modified:
6 years, 10 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, jamesr, dglazkov+blink, kenneth.r.christiansen, Peter Beverloo, mlamouri (slow - plz ping)
Visibility:
Public.

Description

Screen Orientation API: screen.orientation & orientationchange event Screen Orientation API: add implemention for screen.orientation attribute, keep it updated via the ScreenOrientationController and notify client of orientation changes via the 'orientationchange' event. The layout test infrastructure is still missing to test this. It will be added in a follow-up patch. R=abarth BUG=162827 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167477

Patch Set 1 #

Total comments: 19

Patch Set 2 : Take feedback into consideration #

Total comments: 6

Patch Set 3 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+353 lines, -15 lines) Patch
A LayoutTests/screen_orientation/orientation-attribute.html View 1 1 chunk +12 lines, -0 lines 0 comments Download
A + LayoutTests/screen_orientation/orientation-attribute-expected.txt View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/modules.gypi View 1 1 chunk +4 lines, -0 lines 0 comments Download
M Source/modules/screen_orientation/ScreenOrientation.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/screen_orientation/ScreenOrientation.cpp View 1 3 chunks +48 lines, -12 lines 0 comments Download
A Source/modules/screen_orientation/ScreenOrientationController.h View 1 1 chunk +36 lines, -0 lines 0 comments Download
A Source/modules/screen_orientation/ScreenOrientationController.cpp View 1 2 1 chunk +61 lines, -0 lines 0 comments Download
A Source/modules/screen_orientation/ScreenOrientationDispatcher.h View 1 1 chunk +39 lines, -0 lines 0 comments Download
A Source/modules/screen_orientation/ScreenOrientationDispatcher.cpp View 1 1 chunk +100 lines, -0 lines 0 comments Download
M Source/web/FrameLoaderClientImpl.cpp View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M public/platform/Platform.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
A public/platform/WebScreenOrientation.h View 1 1 chunk +19 lines, -0 lines 0 comments Download
A public/platform/WebScreenOrientationListener.h View 1 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
Inactive
6 years, 10 months ago (2014-02-17 17:55:29 UTC) #1
Inactive
https://codereview.chromium.org/169403006/diff/1/Source/modules/screen_orientation/ScreenOrientation.cpp File Source/modules/screen_orientation/ScreenOrientation.cpp (right): https://codereview.chromium.org/169403006/diff/1/Source/modules/screen_orientation/ScreenOrientation.cpp#newcode41 Source/modules/screen_orientation/ScreenOrientation.cpp:41: if (ScreenOrientationController* controller = ScreenOrientationController::from(page())) I looked at the ...
6 years, 10 months ago (2014-02-17 18:23:12 UTC) #2
abarth-chromium
https://codereview.chromium.org/169403006/diff/1/Source/modules/screen_orientation/ScreenOrientation.cpp File Source/modules/screen_orientation/ScreenOrientation.cpp (right): https://codereview.chromium.org/169403006/diff/1/Source/modules/screen_orientation/ScreenOrientation.cpp#newcode20 Source/modules/screen_orientation/ScreenOrientation.cpp:20: controller->addObserver(this); Under what circumstances can |controller| be zero. I'd ...
6 years, 10 months ago (2014-02-18 01:34:27 UTC) #3
abarth-chromium
http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/ might be a good model to look at.
6 years, 10 months ago (2014-02-18 01:37:51 UTC) #4
abarth-chromium
Notice that the DeviceOrientationDispatcher is static, which means you don't have the tricky coupling to ...
6 years, 10 months ago (2014-02-18 01:40:03 UTC) #5
abarth-chromium
It's also interesting to notice how DeviceOrientationDispatcher deals with the collection being mutated during iteration. ...
6 years, 10 months ago (2014-02-18 01:43:29 UTC) #6
mlamouri (slow - plz ping)
It is worth pointing that the Screen Orientation API has one small difference compared to ...
6 years, 10 months ago (2014-02-18 11:19:23 UTC) #7
mlamouri (slow - plz ping)
https://codereview.chromium.org/169403006/diff/1/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/169403006/diff/1/Source/web/WebViewImpl.cpp#newcode415 Source/web/WebViewImpl.cpp:415: provideScreenOrientationTo(m_page.get()); You probably want to call |provideScreenOrientationTo| before ScreenOrientationController::from()...
6 years, 10 months ago (2014-02-18 17:08:55 UTC) #8
abarth-chromium
Hum... I don't think we should add a synchronous IPC call to implement this feature. ...
6 years, 10 months ago (2014-02-18 17:50:34 UTC) #9
Inactive
On 2014/02/18 17:50:34, abarth wrote: > Hum... I don't think we should add a synchronous ...
6 years, 10 months ago (2014-02-18 19:05:42 UTC) #10
abarth-chromium
On 2014/02/18 19:05:42, Chris Dumez wrote: > I still hope to land an implementation without ...
6 years, 10 months ago (2014-02-18 19:09:50 UTC) #11
Inactive
On 2014/02/18 19:09:50, abarth wrote: > On 2014/02/18 19:05:42, Chris Dumez wrote: > > I ...
6 years, 10 months ago (2014-02-18 19:17:22 UTC) #12
mlamouri (slow - plz ping)
On 2014/02/18 17:50:34, abarth wrote: > Hum... I don't think we should add a synchronous ...
6 years, 10 months ago (2014-02-18 20:13:11 UTC) #13
Inactive
On 2014/02/18 20:13:11, Mounir Lamouri wrote: > On 2014/02/18 17:50:34, abarth wrote: > > Hum... ...
6 years, 10 months ago (2014-02-18 20:24:22 UTC) #14
abarth-chromium
Even if we were shipping window.orientation, that doesn't mean we should add more synchronous APIs. ...
6 years, 10 months ago (2014-02-18 20:40:23 UTC) #15
Inactive
I updated the CL to use the same design as for the device_orientation module. Please ...
6 years, 10 months ago (2014-02-18 20:52:46 UTC) #16
mlamouri (slow - plz ping)
On 2014/02/18 20:40:23, abarth wrote: > Even if we were shipping window.orientation, We are shipping ...
6 years, 10 months ago (2014-02-19 15:10:11 UTC) #17
abarth-chromium
On 2014/02/19 15:10:11, Mounir Lamouri wrote: > It's all about compromise. How painful is that ...
6 years, 10 months ago (2014-02-19 18:44:57 UTC) #18
abarth-chromium
LGTM https://codereview.chromium.org/169403006/diff/270001/Source/modules/screen_orientation/ScreenOrientationController.cpp File Source/modules/screen_orientation/ScreenOrientationController.cpp (right): https://codereview.chromium.org/169403006/diff/270001/Source/modules/screen_orientation/ScreenOrientationController.cpp#newcode25 Source/modules/screen_orientation/ScreenOrientationController.cpp:25: ASSERT(document); We don't usually have this ASSERT here. ...
6 years, 10 months ago (2014-02-19 18:51:49 UTC) #19
abarth-chromium
Thanks for iterating on the design. This approach looks much cleaner.
6 years, 10 months ago (2014-02-19 18:52:07 UTC) #20
Inactive
https://codereview.chromium.org/169403006/diff/270001/Source/modules/screen_orientation/ScreenOrientationController.cpp File Source/modules/screen_orientation/ScreenOrientationController.cpp (right): https://codereview.chromium.org/169403006/diff/270001/Source/modules/screen_orientation/ScreenOrientationController.cpp#newcode25 Source/modules/screen_orientation/ScreenOrientationController.cpp:25: ASSERT(document); On 2014/02/19 18:51:49, abarth wrote: > We don't ...
6 years, 10 months ago (2014-02-19 19:04:50 UTC) #21
abarth-chromium
On 2014/02/19 19:04:50, Chris Dumez wrote: > Yes, I need to make sure we construct ...
6 years, 10 months ago (2014-02-19 21:39:04 UTC) #22
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 10 months ago (2014-02-19 22:01:52 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/169403006/380001
6 years, 10 months ago (2014-02-19 22:14:56 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/169403006/380001
6 years, 10 months ago (2014-02-19 23:11:24 UTC) #25
commit-bot: I haz the power
6 years, 10 months ago (2014-02-20 07:47:30 UTC) #26
Message was sent while issue was closed.
Change committed as 167477

Powered by Google App Engine
This is Rietveld 408576698