Description[Mac] Re-layout download shelf when danger state of item changes.
Updating the width of the DownloadItemController view is not sufficient
since the sibling items also need to be moved around.
In addition, the width of DownloadItemController view should be set
based on its preferred size (already done by
DownloadShelfController:layoutItems) rather than relative to its current
frame. This is because the DownloadItemController may be in the middle
of an animation, and thus its frame may not reflect its desired size.
While we are at it, add some unit tests for DownloadItemController,
refactor the user experience event logic, and deal with the possibility
that the DownloadItem and the DownloadItemController may be destroyed at
different times.
BUG=409999
Committed: https://crrev.com/bc3dd93004f36e6ad0662d0ecf8819c55dddc479
Cr-Commit-Position: refs/heads/master@{#295401}
Patch Set 1 #Patch Set 2 : Add tests #
Total comments: 6
Patch Set 3 : Fix lifetime issues and add more tests #
Messages
Total messages: 15 (2 generated)
|