Correctly respond to size class changes in Download Manager.
Old code used IsCompactWidth() function inside viewWillTransitionToSize: callback to check the current size class. This is incorrect and would return previous size class instead of new size class. New code uses willTransitionToTraitCollection: instead, which provides correct new size class. Also download bar width for regular size class is now anchored to superview width with 0.6 multiplier. This is because anchoring to constant (what old code tried to do) would require more complex logic and is not really much better than anchoring to multiplier. Bug: 823698,791806 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: Ide994e3d76b773d20d462d782f370a0491009916 Reviewed-on: https://chromium-review.googlesource.com/973464Reviewed-by:edchin <edchin@chromium.org> Commit-Queue: Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#544914}
Showing
Please register or sign in to comment