New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 765401 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Implement STOPPED state for mobile

Project Member Reported by panicker@chromium.org, Sep 14 2017

Issue description

On mobile when we stop timers (and loading next) we are transitioning into the STOPPED state.
We should fire the corresponding pagehide event with StopReason, per the Lifecycle proposal.

When we discussed this at lifecycle-sync I had concerns around ambiguity for developers as we incrementally stop more / different things.
Philip and I discussed this and agreed that firing the event as a signal is strictly better than not doing so -- from developer perspective.

 
Cc: -fmea...@chromium.org
Owner: fmea...@chromium.org
Components: Blink>PageLifecycle
(we have a bug component now!)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/631a7c6383774d8d42bd3935bb0de4896555dd98

commit 631a7c6383774d8d42bd3935bb0de4896555dd98
Author: Fadi Meawad <fmeawad@chromium.org>
Date: Tue Nov 07 02:07:17 2017

[PageLifecycle] Plumb the stopped signal from WebViewScheduler to Page

We current stop a renderer scheduler (i.e. stop all timers and stop some
task from running). As part of the lifecycle project, we would like to
inform developers when their pages are stopped.

This CL is the first part, where we plumb the stopped signal from the
scheduler to the page. The next step would be to invoke a callback on
the page that indicates that the page was stopped.

Parts of this CL are extracted from panicker@'s CL
https://chromium-review.googlesource.com/c/chromium/src/+/731264

Bug:  765401 
Change-Id: Ice3c6b2468eccac591fc4630adc801762bea0255
Reviewed-on: https://chromium-review.googlesource.com/752222
Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
Reviewed-by: Shubhie Panicker <panicker@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514354}
[modify] https://crrev.com/631a7c6383774d8d42bd3935bb0de4896555dd98/third_party/WebKit/Source/core/exported/WebViewImpl.cpp
[modify] https://crrev.com/631a7c6383774d8d42bd3935bb0de4896555dd98/third_party/WebKit/Source/core/exported/WebViewImpl.h
[modify] https://crrev.com/631a7c6383774d8d42bd3935bb0de4896555dd98/third_party/WebKit/Source/core/page/BUILD.gn
[modify] https://crrev.com/631a7c6383774d8d42bd3935bb0de4896555dd98/third_party/WebKit/Source/core/page/Page.cpp
[modify] https://crrev.com/631a7c6383774d8d42bd3935bb0de4896555dd98/third_party/WebKit/Source/core/page/Page.h
[add] https://crrev.com/631a7c6383774d8d42bd3935bb0de4896555dd98/third_party/WebKit/Source/core/page/PageLifecycleState.h
[modify] https://crrev.com/631a7c6383774d8d42bd3935bb0de4896555dd98/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler.h
[modify] https://crrev.com/631a7c6383774d8d42bd3935bb0de4896555dd98/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3085594d142c3a1ea01a671807385e2c0696beb9

commit 3085594d142c3a1ea01a671807385e2c0696beb9
Author: Fadi Meawad <fmeawad@chromium.org>
Date: Thu Dec 14 18:28:30 2017

[PageLifecycle] Call onfreeze/onresume when a frame is stopped/re-activated

As part of page lifecycle, we need to notify the page that it is getting
STOPPED. This CL introduced window.onfreeze, a new callback that will
fire when the page is STOPPED. If the page is resumed and not killed,
then window.onresume is called.

Currently, the page is stopped on Android after being backgrounded for a
few minutes. More stopping scenarios are being added. When a page is
stopped, all the timers will stop firing, and any load activities will
be halted. The onfreeze is the last callback made to the page before
it is either resumed or killed. When the page re-enters the ACTIVE or
HIDDEN states, window.onresume is called.

This feature is currently under a "test" RuntimeEnabled flag.

Bug:  765401 
Change-Id: I09486e4298a80f4a08c6c8d78bf060745e81d687
Reviewed-on: https://chromium-review.googlesource.com/764503
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Shubhie Panicker <panicker@chromium.org>
Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524119}
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/events/event_type_names.json5
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/exported/WebViewImpl.cpp
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/frame/DOMWindowEventHandlers.h
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/frame/Frame.h
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/frame/LocalFrame.h
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/frame/RemoteFrame.h
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/frame/WindowEventHandlers.idl
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/page/Page.cpp
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/core/page/PageLifecycleState.h
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/third_party/WebKit/Source/platform/runtime_enabled_features.json5
[modify] https://crrev.com/3085594d142c3a1ea01a671807385e2c0696beb9/tools/metrics/histograms/histograms.xml

Comment 5 by ojan@chromium.org, May 8 2018

Cc: -ojan@chromium.org
Cc: fmea...@chromium.org
Owner: panicker@chromium.org
I think this bug should be marked fixed, but I will leave it to panicker@ to verify.
Status: Assigned (was: Available)
Status: Fixed (was: Assigned)

Sign in to add a comment