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

Issue 23129015: Initialize RenderWidget(Host)(View)s with correct visibility state (Closed)

Created:
7 years, 4 months ago by jamesr
Modified:
7 years, 3 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, jam, penghuang+watch_chromium.org, joi+watch-content_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su, miu+watch_chromium.org, Ian Vollick, ccameron
Visibility:
Public.

Description

Initialize RenderWidget(Host)(View)s with correct visibility state Currently, newly constructed RenderWidget(Host|View)*s assume they are visible until they are notified otherwise. We've had a long list of bugs where widgets created in the background would not receive any hidden notification and would continue to operate as if they were visible. For examples see bugs 118269, 142061, 155365 and 272962. This makes the visibility of a widget a construction-time parameter and sets the correct state at construction sites. Most widgets are created to be visible. Notable exceptions are swapped-out widgets and widgets created for background navigations. The initial widget visibility state is passed down to the render process so the content::RenderWidget and Blink have the correct state from the start. RenderViewHostManager is a bit tricky since it can construct new RenderViewHost instances on the fly due to navigation. This patch adds a bool IsHidden function to RVHManager::Delegate so the manager can ask the WebContentsImpl for the correct initial state. BUG=20831, 155365, 272962 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218548

Patch Set 1 #

Total comments: 15

Patch Set 2 : Compile fix aura, improve comment in RWHI #

Total comments: 2

Patch Set 3 : #

Total comments: 3

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -149 lines) Patch
M chrome/browser/ui/browser_navigator.cc View 1 2 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/ui/tabs/tab_strip_model.cc View 1 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_view_host_factory.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_factory.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 5 chunks +11 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_gtk.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_guest_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/smooth_scroll_gesture_controller_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/test_render_view_host.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/text_input_client_mac_unittest.mm View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/interstitial_page_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/render_view_host_manager.h View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M content/browser/web_contents/render_view_host_manager.cc View 1 2 4 chunks +8 lines, -4 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 6 chunks +12 lines, -6 lines 0 comments Download
M content/common/view_messages.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M content/public/browser/web_contents.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/web_contents.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M content/public/test/render_view_test.cc View 1 chunk +4 lines, -3 lines 0 comments Download
D content/renderer/render_process_visibility_manager.h View 1 chunk +0 lines, -32 lines 0 comments Download
D content/renderer/render_process_visibility_manager.cc View 1 chunk +0 lines, -37 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 3 chunks +11 lines, -15 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 5 chunks +10 lines, -4 lines 0 comments Download
M content/renderer/render_view_impl_params.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl_params.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/render_widget.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/render_widget.cc View 6 chunks +6 lines, -6 lines 0 comments Download
M content/renderer/render_widget_fullscreen.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
jamesr
Scott, could you review? Thanks! Charlie - please take a look in particular at the ...
7 years, 4 months ago (2013-08-19 19:59:23 UTC) #1
sky
https://codereview.chromium.org/23129015/diff/1/chrome/browser/ui/browser_navigator.cc File chrome/browser/ui/browser_navigator.cc (right): https://codereview.chromium.org/23129015/diff/1/chrome/browser/ui/browser_navigator.cc#newcode354 chrome/browser/ui/browser_navigator.cc:354: // TODO(sky): Figure out why this is needed. Without ...
7 years, 4 months ago (2013-08-19 20:21:47 UTC) #2
jamesr
On 2013/08/19 20:21:47, sky wrote: > https://codereview.chromium.org/23129015/diff/1/content/renderer/render_widget.cc > File content/renderer/render_widget.cc (left): > > https://codereview.chromium.org/23129015/diff/1/content/renderer/render_widget.cc#oldcode242 > ...
7 years, 4 months ago (2013-08-19 20:34:18 UTC) #3
sky
On Mon, Aug 19, 2013 at 1:34 PM, <jamesr@chromium.org> wrote: > On 2013/08/19 20:21:47, sky ...
7 years, 4 months ago (2013-08-19 20:44:29 UTC) #4
jamesr
On 2013/08/19 20:44:29, sky wrote: > > That's what we prefer in Blink as well, ...
7 years, 4 months ago (2013-08-19 21:02:19 UTC) #5
sky
LGTM
7 years, 4 months ago (2013-08-19 21:08:14 UTC) #6
Charlie Reis
Looks pretty reasonable to me. A few comments below. https://codereview.chromium.org/23129015/diff/1/content/browser/renderer_host/render_view_host_impl.h File content/browser/renderer_host/render_view_host_impl.h (right): https://codereview.chromium.org/23129015/diff/1/content/browser/renderer_host/render_view_host_impl.h#newcode113 content/browser/renderer_host/render_view_host_impl.h:113: ...
7 years, 4 months ago (2013-08-19 22:18:02 UTC) #7
jamesr
PTAL, creis@. I think I've addressed all feedback here. jschuh@ - could you review the ...
7 years, 4 months ago (2013-08-19 23:50:39 UTC) #8
Charlie Reis
Thanks, LGTM! Don't forget to update the last bit of the CL description as well. ...
7 years, 4 months ago (2013-08-20 02:09:58 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/23129015/34002
7 years, 4 months ago (2013-08-20 20:42:40 UTC) #10
commit-bot: I haz the power
Change committed as 218548
7 years, 4 months ago (2013-08-20 20:47:10 UTC) #11
Cris Neckar
IPC changes LGTM
7 years, 4 months ago (2013-08-20 20:48:48 UTC) #12
no sievers
This causes a regression on Android (crbug.com/284427) - am not saying it's this patches fault, ...
7 years, 3 months ago (2013-09-17 18:42:08 UTC) #13
jamesr
7 years, 3 months ago (2013-09-17 19:35:28 UTC) #14
Message was sent while issue was closed.
The same problem exists on aura (and probably other platforms).  We're debugging
this in https://code.google.com/p/chromium/issues/detail?id=286259 and have a
patch in https://codereview.chromium.org/23866013/.  Can you check if that fixes
the android case?

Powered by Google App Engine
This is Rietveld 408576698