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

Issue 11776010: overscroll: Take a screenshot at more appropriate times. (Closed)

Created:
7 years, 11 months ago by sadrul
Modified:
7 years, 11 months ago
Reviewers:
Charlie Reis
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

overscroll: Make sure screenshot is taken correctly for swapped out RenderViews. When a RenderView is swapped out, it navigates to a swapped-out url (swappedout://), and thus corrupts the paint content of the actual view. To fix this issue, prevent a swapped-out RenderView from painting. Also, make sure the screenshot is taken in the browser side before the RenderViewHost is swapped out. BUG=160668 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175995

Patch Set 1 : . #

Patch Set 2 : . #

Total comments: 3

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 6

Patch Set 5 : . #

Total comments: 1

Patch Set 6 : improved-test #

Patch Set 7 : . #

Total comments: 4

Patch Set 8 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -11 lines) Patch
M content/browser/web_contents/navigation_controller_impl.h View 1 2 3 4 5 4 chunks +11 lines, -3 lines 0 comments Download
M content/browser/web_contents/navigation_controller_impl.cc View 1 2 3 4 5 3 chunks +8 lines, -6 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_view_aura_browsertest.cc View 1 2 3 4 5 6 7 2 chunks +91 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
sadrul
(To refresh the memory after the break: the original CL that introduced this was: https://codereview.chromium.org/11635059)
7 years, 11 months ago (2013-01-07 16:11:54 UTC) #1
Charlie Reis
https://codereview.chromium.org/11776010/diff/9001/content/browser/web_contents/navigation_controller_impl.cc File content/browser/web_contents/navigation_controller_impl.cc (right): https://codereview.chromium.org/11776010/diff/9001/content/browser/web_contents/navigation_controller_impl.cc#newcode140 content/browser/web_contents/navigation_controller_impl.cc:140: // Returns whether a screenshot should be taken because ...
7 years, 11 months ago (2013-01-07 19:50:23 UTC) #2
sadrul
https://codereview.chromium.org/11776010/diff/9001/content/browser/web_contents/navigation_controller_impl.cc File content/browser/web_contents/navigation_controller_impl.cc (right): https://codereview.chromium.org/11776010/diff/9001/content/browser/web_contents/navigation_controller_impl.cc#newcode1576 content/browser/web_contents/navigation_controller_impl.cc:1576: else if (reload_type == NO_RELOAD) On 2013/01/07 19:50:23, creis ...
7 years, 11 months ago (2013-01-08 00:16:29 UTC) #3
sadrul
On 2013/01/08 00:16:29, sadrul wrote: > https://codereview.chromium.org/11776010/diff/9001/content/browser/web_contents/navigation_controller_impl.cc > File content/browser/web_contents/navigation_controller_impl.cc (right): > > https://codereview.chromium.org/11776010/diff/9001/content/browser/web_contents/navigation_controller_impl.cc#newcode1576 > ...
7 years, 11 months ago (2013-01-08 03:00:25 UTC) #4
Charlie Reis
Let's take a step back here, since I think I'm starting to understand the underlying ...
7 years, 11 months ago (2013-01-08 21:50:55 UTC) #5
sadrul
On 2013/01/08 21:50:55, creis wrote: > Let's take a step back here, since I think ...
7 years, 11 months ago (2013-01-08 23:43:01 UTC) #6
Charlie Reis
Nice! I'm ok with either approach, and I'd probably lean towards patch set 4 (to ...
7 years, 11 months ago (2013-01-09 00:49:23 UTC) #7
sadrul
https://codereview.chromium.org/11776010/diff/3003/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/11776010/diff/3003/content/browser/web_contents/web_contents_impl.cc#newcode2689 content/browser/web_contents/web_contents_impl.cc:2689: controller_.TakeScreenshot(); On 2013/01/09 00:49:23, creis wrote: > nit: Please ...
7 years, 11 months ago (2013-01-09 17:44:19 UTC) #8
sadrul
[snip] > Do you think it might be necessary to call SetHidden(false) when the renderer ...
7 years, 11 months ago (2013-01-09 19:27:58 UTC) #9
Charlie Reis
Sounds reasonable. LGTM with nits. https://codereview.chromium.org/11776010/diff/18010/content/browser/web_contents/web_contents_view_aura_browsertest.cc File content/browser/web_contents/web_contents_view_aura_browsertest.cc (right): https://codereview.chromium.org/11776010/diff/18010/content/browser/web_contents/web_contents_view_aura_browsertest.cc#newcode29 content/browser/web_contents/web_contents_view_aura_browsertest.cc:29: void Dummy(RenderViewHost* host) { ...
7 years, 11 months ago (2013-01-09 23:33:31 UTC) #10
sadrul
7 years, 11 months ago (2013-01-09 23:37:58 UTC) #11
Awesome! Thanks for the great review!

https://codereview.chromium.org/11776010/diff/18010/content/browser/web_conte...
File content/browser/web_contents/web_contents_view_aura_browsertest.cc (right):

https://codereview.chromium.org/11776010/diff/18010/content/browser/web_conte...
content/browser/web_contents/web_contents_view_aura_browsertest.cc:29: void
Dummy(RenderViewHost* host) {
On 2013/01/09 23:33:31, creis wrote:
> nit: DummyCallback

Done.

https://codereview.chromium.org/11776010/diff/18010/content/browser/web_conte...
content/browser/web_contents/web_contents_view_aura_browsertest.cc:403: // Tests
that screenshot is taken correct when navigation causes a
On 2013/01/09 23:33:31, creis wrote:
> nit: correctly

Done.

Powered by Google App Engine
This is Rietveld 408576698