forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide RenderWidgetHostViewChildFrame if Occluded
The RenderWidgetHostView::WasOccluded and ~::WasUnOccluded are not overridden. On MacOSX minimizing the browser leads to calling WebContents::WasOccluded which is therefore not triggering the visibility of child RenderWidgets. This CL implements the methods for RWHVCF and adds a test which verifies requestAnimationFrame is throttled for occluded child renderer processes. Bug: 903455 Change-Id: If836a872e6372abf31017cc81dcaa3e7d31d65b9 Reviewed-on: https://chromium-review.googlesource.com/c/1357303 Reviewed-by: Ken Buchanan <kenrb@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Commit-Queue: Ehsan Karamad <ekaramad@chromium.org> Cr-Commit-Position: refs/heads/master@{#614162}
- Loading branch information
1 parent
76d39b3
commit a03e158
Showing
5 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!doctype html> | ||
<h1>This page contains a RAF loop and does some measurements of the interval</h1> | ||
<script> | ||
var recent_time_stamps = new Array(10); | ||
var raf_count = 0; | ||
|
||
function reset_count() { | ||
raf_count = 0; | ||
} | ||
function on_raf(t) { | ||
raf_count++; | ||
recent_time_stamps.shift(); | ||
recent_time_stamps.push(t); | ||
window.requestAnimationFrame(on_raf); | ||
} | ||
window.requestAnimationFrame(on_raf); | ||
</script> |