DescriptionRenderWidgetHostImpl'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 #
Messages
Total messages: 16 (0 generated)
|