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

Issue 261983005: Stop firing orientationchange events at pages that are not visible (Closed)

Created:
6 years, 7 months ago by Inactive
Modified:
6 years, 7 months ago
CC:
blink-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, adamk+blink_chromium.org, rwlbuis, lgombos, Peter Beverloo
Visibility:
Public.

Description

Stop firing orientationchange events at pages that are not visible Stop firing 'orientationchange' events to pages that are not visible as per the specification: https://w3c.github.io/screen-orientation/#handling-screen-orientation-changes This avoids having background pages handle 'orientationchange' events and wasting battery. As indicated in the specification, screen.orientation keeps returning the old orientation if the orientation changes while the page is not visible. R=mounir@chromium.org, jochen@chromium.org BUG=162827 TEST=screen_orientation/page-visibility.html

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Fix flaky test #

Patch Set 4 : Simplify test case #

Total comments: 1

Messages

Total messages: 5 (0 generated)
Inactive
This requires the following Chromium-side change (to improve test infrastructure) for the layout tests to ...
6 years, 7 months ago (2014-05-02 20:24:21 UTC) #1
mlamouri (slow - plz ping)
I think the fullscreen check should be made by the embedder, not Blink. Depending on ...
6 years, 7 months ago (2014-05-02 20:26:52 UTC) #2
Inactive
On 2014/05/02 20:26:52, Mounir Lamouri wrote: > I think the fullscreen check should be made ...
6 years, 7 months ago (2014-05-02 21:07:32 UTC) #3
sof
https://codereview.chromium.org/261983005/diff/60001/Source/modules/screen_orientation/ScreenOrientation.cpp File Source/modules/screen_orientation/ScreenOrientation.cpp (right): https://codereview.chromium.org/261983005/diff/60001/Source/modules/screen_orientation/ScreenOrientation.cpp#newcode163 Source/modules/screen_orientation/ScreenOrientation.cpp:163: stopListeningForFullscreenExit(); With Oilpan, this is a somewhat problematic cleanup ...
6 years, 7 months ago (2014-05-08 21:41:17 UTC) #4
Inactive
6 years, 7 months ago (2014-05-12 17:49:32 UTC) #5
On 2014/05/02 21:07:32, Chris Dumez wrote:
> On 2014/05/02 20:26:52, Mounir Lamouri wrote:
> > I think the fullscreen check should be made by the embedder, not Blink.
> > Depending on the situation, the embedder might allow the screen orientation
> lock
> > to happen even if the document isn't fullscreen.
> 
> As far as I understood, both Firefox and Internet Explorer only allow screen
> orientation locking while in fullscreen, right? Do you have concrete plans to
> behave differently for Chrome? Do you have use cases for allowing screen
locking
> when not in fullscreen?

Mounir, ping?

Adam, Peter, if you have an opinion, feel free to pitch in as well.

One clarification as well, if this gets implemented on Chrome side instead. Does
this mean this would be in closed-source code for Android? I seem to remember
that Android's TestShell does not support the fullscreen API but I may be wrong.
It is not a big deal either way, I just want to understand better the
implications.

Powered by Google App Engine
This is Rietveld 408576698