Commit 96034ad8 authored by David Jean's avatar David Jean Committed by Commit Bot

[ios] Fix tab grid layout issue in multi-windows

Bug: 1096035,1076852
Change-Id: I386b8127fd0aed588226b6068553e086a7bba18c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2273158Reviewed-by: default avataredchin <edchin@chromium.org>
Commit-Queue: David Jean <djean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#783854}
parent 6f0226fe
...@@ -204,10 +204,10 @@ ...@@ -204,10 +204,10 @@
// |-traitCollectionDidChange:| is not properly called when the view rotates // |-traitCollectionDidChange:| is not properly called when the view rotates
// while it is in a ViewController deeper in the ViewController hierarchy. Use // while it is in a ViewController deeper in the ViewController hierarchy. Use
// self.traitCollection since iOS 13 where the bug is fixed in UIKit. // self.traitCollection since iOS 13 where the bug is fixed in UIKit.
return UIApplication.sharedApplication.keyWindow.traitCollection return self.window.traitCollection.verticalSizeClass ==
.verticalSizeClass == UIUserInterfaceSizeClassRegular && UIUserInterfaceSizeClassRegular &&
UIApplication.sharedApplication.keyWindow.traitCollection self.window.traitCollection.horizontalSizeClass ==
.horizontalSizeClass == UIUserInterfaceSizeClassCompact; UIUserInterfaceSizeClassCompact;
} }
@end @end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment