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

Issue 18413004: Fix false positive/negative resize_ack_pending_ in RenderWidgetHostImpl. (Closed)

Created:
7 years, 5 months ago by Kibeom Kim (inactive)
Modified:
7 years, 5 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

RenderWidgetHostImpl's resize_ack_pending_ should set to true only when RenderWidget::Resize(...) is expected to send ack. But resize_ack_pending_ could be false positive or false negative. It caused crbug.com/246154 and this CL fixes the both false cases by setting resize_ack_pending_ correctly. Example false positive: Let's say RenderWidget::Resize(...) is called twice by RenderWidgetHostImpl::WasResized(), with the following arguments. #1 new_size : 100x100 physical_backing_size : 0x0 #2 new_size : 100x100 physical_backing_size : 200x200 Then it doesn't send ack for the both cases because #1 has an empty physical_backing_size and #2 doesn't change new_size from the previous call. However, RenderWidgetHostImpl::WasResized() sets resize_ack_pending_ true #2, because current_size_ is updated only when we have ack back, so current_size_ wasn't updated for #1 and RenderWidget can think the current_size_ is about to change to 100x100 at #2. Example false negative: Again, consider this sequence of arguments: #1 new_size : 100x100 #2 new_size : 0x0 #3 new_size : 100x100 RenderWidget sends acks at #1 and #3. Then RenderWidget's current_size_ is not updated at #2 so RenderWidget thinks current_size_ is not changed for #3, thus does not expect ack. BUG=246154 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=211524

Patch Set 1 #

Patch Set 2 : working. #

Patch Set 3 : fix candidate #

Patch Set 4 : fix candidate 2 #

Patch Set 5 : Revert to Patch Set 3 #

Total comments: 6

Patch Set 6 : revised as discussed with aelias #

Patch Set 7 : Changed in_flight_size_ to last_requested_size_ and fixed test. #

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -30 lines) Patch
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 5 chunks +3 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 6 8 chunks +28 lines, -21 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Kibeom Kim (inactive)
(This is not ready for review.) @piman I would like to discuss some issues with ...
7 years, 5 months ago (2013-07-10 17:33:05 UTC) #1
Kibeom Kim (inactive)
another trivial fix candidate (patch set 4)
7 years, 5 months ago (2013-07-10 18:27:09 UTC) #2
piman
Kibeom: Can you fix the issue description to explain the change, rather than just "fix"? ...
7 years, 5 months ago (2013-07-10 22:17:47 UTC) #3
aelias_OOO_until_Jul13
I agree this change looks wrong. The attached bug says this is a new regression ...
7 years, 5 months ago (2013-07-10 22:28:41 UTC) #4
Kibeom Kim (inactive)
On 2013/07/10 22:28:41, aelias wrote: > I agree this change looks wrong. > > The ...
7 years, 5 months ago (2013-07-10 22:35:08 UTC) #5
Xianzhu
On 2013/07/10 22:35:08, Kibeom Kim wrote: > On 2013/07/10 22:28:41, aelias wrote: > > I ...
7 years, 5 months ago (2013-07-10 23:03:49 UTC) #6
aelias_OOO_until_Jul13
OK, I like the direction of PatchSet#5 better, but I suggest the following changes: https://codereview.chromium.org/18413004/diff/24001/content/browser/renderer_host/render_widget_host_impl.cc ...
7 years, 5 months ago (2013-07-10 23:20:46 UTC) #7
Kibeom Kim (inactive)
The revised fix is uploaded. The test, RenderWidgetHostTest#Resize, should be also updated. But I'll first ...
7 years, 5 months ago (2013-07-11 00:23:51 UTC) #8
Kibeom Kim (inactive)
PTAL. I noticed that gfx::Size can't have negative height/width because it silently makes to 0 ...
7 years, 5 months ago (2013-07-12 17:46:16 UTC) #9
aelias_OOO_until_Jul13
This seems sensible to me. Though it doesn't match Antoine's suggestion to fix it on ...
7 years, 5 months ago (2013-07-12 18:33:13 UTC) #10
piman
On 2013/07/12 18:33:13, aelias wrote: > This seems sensible to me. Though it doesn't match ...
7 years, 5 months ago (2013-07-12 19:22:37 UTC) #11
piman
Ok, I like this. LGTM
7 years, 5 months ago (2013-07-12 21:25:46 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kkimlabs@chromium.org/18413004/35001
7 years, 5 months ago (2013-07-12 21:31:28 UTC) #13
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 5 months ago (2013-07-12 21:43:58 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kkimlabs@chromium.org/18413004/57001
7 years, 5 months ago (2013-07-12 21:48:32 UTC) #15
commit-bot: I haz the power
7 years, 5 months ago (2013-07-13 03:51:26 UTC) #16
Message was sent while issue was closed.
Change committed as 211524

Powered by Google App Engine
This is Rietveld 408576698