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

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

Created:
6 years, 7 months ago by Inactive
Modified:
6 years, 6 months ago
CC:
blink-reviews, 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 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175264

Patch Set 1 #

Patch Set 2 : Simplify patch #

Patch Set 3 : Update as per spec #

Patch Set 4 : Remove outdated code #

Patch Set 5 : Fix flaky test #

Patch Set 6 : Revert change to orientationchange-event.html #

Patch Set 7 : Second attempt to fix the flakiness #

Patch Set 8 : Rebase now that dependency patch has landed #

Total comments: 12

Patch Set 9 : Take feedback into consideration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -2 lines) Patch
A LayoutTests/screen_orientation/page-visibility.html View 1 2 3 4 5 6 7 8 1 chunk +47 lines, -0 lines 0 comments Download
M Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M Source/modules/screen_orientation/ScreenOrientationController.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -1 line 0 comments Download
M Source/modules/screen_orientation/ScreenOrientationController.cpp View 1 2 3 4 5 6 7 8 3 chunks +26 lines, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
Inactive
I do not unregister the ScreenOrientationController as an observer when the page is not visible ...
6 years, 7 months ago (2014-05-12 15:13:11 UTC) #1
Inactive
On 2014/05/12 15:13:11, Chris Dumez wrote: > I do not unregister the ScreenOrientationController as an ...
6 years, 7 months ago (2014-05-12 21:04:25 UTC) #2
Inactive
On 2014/05/12 21:04:25, Chris Dumez wrote: > On 2014/05/12 15:13:11, Chris Dumez wrote: > > ...
6 years, 7 months ago (2014-05-12 21:23:56 UTC) #3
mlamouri (slow - plz ping)
On 2014/05/12 21:23:56, Chris Dumez wrote: > On 2014/05/12 21:04:25, Chris Dumez wrote: > > ...
6 years, 7 months ago (2014-05-13 05:17:17 UTC) #4
Inactive
On 2014/05/13 05:17:17, Mounir Lamouri wrote: > On 2014/05/12 21:23:56, Chris Dumez wrote: > > ...
6 years, 7 months ago (2014-05-13 15:23:54 UTC) #5
mlamouri (slow - plz ping)
On 2014/05/13 15:23:54, Chris Dumez wrote: > Considering we are moving toward using WebScreenInfo, I ...
6 years, 7 months ago (2014-05-15 07:43:22 UTC) #6
Inactive
On 2014/05/15 07:43:22, Mounir Lamouri wrote: > On 2014/05/13 15:23:54, Chris Dumez wrote: > > ...
6 years, 7 months ago (2014-05-27 19:31:50 UTC) #7
mlamouri (slow - plz ping)
Thanks for the patch :) https://codereview.chromium.org/280283002/diff/100001/LayoutTests/screen_orientation/page-visibility.html File LayoutTests/screen_orientation/page-visibility.html (right): https://codereview.chromium.org/280283002/diff/100001/LayoutTests/screen_orientation/page-visibility.html#newcode41 LayoutTests/screen_orientation/page-visibility.html:41: assert_equals(screen.orientation, "portrait-primary"); We should ...
6 years, 6 months ago (2014-05-28 14:05:33 UTC) #8
Inactive
https://codereview.chromium.org/280283002/diff/100001/LayoutTests/screen_orientation/page-visibility.html File LayoutTests/screen_orientation/page-visibility.html (right): https://codereview.chromium.org/280283002/diff/100001/LayoutTests/screen_orientation/page-visibility.html#newcode41 LayoutTests/screen_orientation/page-visibility.html:41: assert_equals(screen.orientation, "portrait-primary"); On 2014/05/28 14:05:33, Mounir Lamouri wrote: > ...
6 years, 6 months ago (2014-05-28 15:27:28 UTC) #9
Inactive
+jochen
6 years, 6 months ago (2014-05-28 17:04:31 UTC) #10
Inactive
Mounir, what do you think?
6 years, 6 months ago (2014-05-29 13:54:03 UTC) #11
mlamouri (slow - plz ping)
LGTM. Thanks! :)
6 years, 6 months ago (2014-05-29 14:56:37 UTC) #12
Inactive
jochen, could you please take a look as well?
6 years, 6 months ago (2014-05-30 13:22:43 UTC) #13
jochen (gone - plz use gerrit)
lgtm
6 years, 6 months ago (2014-06-02 07:25:35 UTC) #14
mlamouri (slow - plz ping)
The CQ bit was checked by mlamouri@chromium.org
6 years, 6 months ago (2014-06-02 09:13:38 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/280283002/120001
6 years, 6 months ago (2014-06-02 09:13:49 UTC) #16
commit-bot: I haz the power
6 years, 6 months ago (2014-06-02 09:30:11 UTC) #17
Message was sent while issue was closed.
Change committed as 175264

Powered by Google App Engine
This is Rietveld 408576698