DescriptionOnly call UpdateScrollOffsetDelegate once on setting delegate.
This fixes a crash in virtual viewport mode caused by UpdateScrollOffsetDelegate
being called before the outer viewport's scroll delegate was set. This would
happen when SetRootLayerScrollOffsetDelegate is called, the call to the inner
scroll layer's SetScrollOffsetDelegate would call UpdateScrollOffsetDelegate
when setting the total scroll offset. This call would try to read the outer
viewport's scroll delegate causing the crash.
This CL moves the UpdateScrollOffsetDelegate from SetTotalScrollOffset to the
call sites. This allows SetRootLayerScrollOffsetDelegate to set the delegate
on both layers before updating it.
BUG=
Committed: https://crrev.com/6747f55261727d3061af4cdc4fbd9d3201ac187e
Cr-Commit-Position: refs/heads/master@{#301172}
Patch Set 1 #Patch Set 2 : Moved UpdateScrollOffsetDelegate out of SetTotalScrollOffset #Patch Set 3 : Fixed crash in cc_unittests #
Messages
Total messages: 12 (3 generated)
|