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

Issue 14779010: Don't expect ack for ViewMsg_OnResize if backing size is empty (Closed)

Created:
7 years, 7 months ago by Xianzhu
Modified:
7 years, 7 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
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Don't expect ack for ViewMsg_OnResize if backing size is empty The renderer won't send ack for ViewMsg_OnResize if backing size is empty. This happens on Android in some cases, e.g. when a tab is created in background because the backing is only created when the tab is shown. Previously on Android we let RWHV return empty view bounds when backing is empty but it prevents the renderer from getting the correct view bounds. Now remove the above logic from RWHV_android and change RWHI not to expect ack when backing size is empty. Also changed RenderWidget not to send ack on the next paint in the cases that the host is not expecting the ack. This doesn't change the actual behavior because RenderWidget won't send UpdateRect corresponding to the Resize request in the cases, but just ensures the correctness. This is a part of the fix to bug 168568. Also need to change the Java code to set the correct view size as early as possible. BUG=168568 TEST=RenderWidgetHostTest.Resize (content_unittests), RenderWidgetTest.OnResize (content_browsertests) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=200210

Patch Set 1 #

Total comments: 2

Patch Set 2 : Also change RenderWidget #

Total comments: 2

Patch Set 3 : Keep short_circuit_size_update condition #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -15 lines) Patch
M content/browser/renderer_host/render_widget_host_impl.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 4 chunks +28 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M content/public/test/render_widget_test.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/test/render_widget_test.cc View 1 1 chunk +40 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 2 chunks +10 lines, -4 lines 0 comments Download
M content/renderer/render_widget_browsertest.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Xianzhu
7 years, 7 months ago (2013-05-08 22:24:16 UTC) #1
Xianzhu
ping...
7 years, 7 months ago (2013-05-10 17:13:57 UTC) #2
aelias_OOO_until_Jul13
Looks correct to me, but +piman for OWNERS as I'm not supposed to review outside ...
7 years, 7 months ago (2013-05-10 20:04:54 UTC) #3
piman
https://codereview.chromium.org/14779010/diff/1/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/14779010/diff/1/content/browser/renderer_host/render_widget_host_impl.cc#newcode516 content/browser/renderer_host/render_widget_host_impl.cc:516: if (!new_size.IsEmpty() && !physical_backing_size_.IsEmpty() && size_changed) I don't see ...
7 years, 7 months ago (2013-05-10 20:12:06 UTC) #4
Xianzhu
https://codereview.chromium.org/14779010/diff/1/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/14779010/diff/1/content/browser/renderer_host/render_widget_host_impl.cc#newcode516 content/browser/renderer_host/render_widget_host_impl.cc:516: if (!new_size.IsEmpty() && !physical_backing_size_.IsEmpty() && size_changed) On 2013/05/10 20:12:06, ...
7 years, 7 months ago (2013-05-10 20:25:03 UTC) #5
piman
On 2013/05/10 20:25:03, Xianzhu wrote: > https://codereview.chromium.org/14779010/diff/1/content/browser/renderer_host/render_widget_host_impl.cc > File content/browser/renderer_host/render_widget_host_impl.cc (right): > > https://codereview.chromium.org/14779010/diff/1/content/browser/renderer_host/render_widget_host_impl.cc#newcode516 > ...
7 years, 7 months ago (2013-05-10 20:39:46 UTC) #6
Xianzhu
> > No. Make me understand why that is the case. Sorry, I misread your ...
7 years, 7 months ago (2013-05-10 20:47:53 UTC) #7
piman
On Fri, May 10, 2013 at 1:47 PM, <wangxianzhu@chromium.org> wrote: > > No. Make me ...
7 years, 7 months ago (2013-05-13 20:48:30 UTC) #8
Xianzhu
On 2013/05/13 20:48:30, piman wrote: > > A test is always good. > But more ...
7 years, 7 months ago (2013-05-13 21:30:40 UTC) #9
piman
On Mon, May 13, 2013 at 2:30 PM, <wangxianzhu@chromium.org> wrote: > On 2013/05/13 20:48:30, piman ...
7 years, 7 months ago (2013-05-13 21:45:50 UTC) #10
Xianzhu
On 2013/05/13 21:45:50, piman wrote: > > Noticed that it only happens in compositing mode. ...
7 years, 7 months ago (2013-05-14 18:49:16 UTC) #11
piman
On Tue, May 14, 2013 at 11:49 AM, <wangxianzhu@chromium.org> wrote: > On 2013/05/13 21:45:50, piman ...
7 years, 7 months ago (2013-05-14 19:16:37 UTC) #12
Xianzhu
PTAL. Changed according to the above discussions.
7 years, 7 months ago (2013-05-14 21:20:12 UTC) #13
piman
Great! Thanks for the test. I think there's one thing left, but outside of it ...
7 years, 7 months ago (2013-05-14 22:19:43 UTC) #14
Xianzhu
https://codereview.chromium.org/14779010/diff/17002/content/renderer/render_widget.cc File content/renderer/render_widget.cc (left): https://codereview.chromium.org/14779010/diff/17002/content/renderer/render_widget.cc#oldcode409 content/renderer/render_widget.cc:409: } else if (!RenderThreadImpl::current()->short_circuit_size_updates()) { On 2013/05/14 22:19:43, piman ...
7 years, 7 months ago (2013-05-14 22:34:25 UTC) #15
piman
lgtm
7 years, 7 months ago (2013-05-14 22:36:01 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/14779010/26001
7 years, 7 months ago (2013-05-14 22:56:12 UTC) #17
commit-bot: I haz the power
7 years, 7 months ago (2013-05-15 08:58:46 UTC) #18
Message was sent while issue was closed.
Change committed as 200210

Powered by Google App Engine
This is Rietveld 408576698