split view: Use DCHECK(!IsDividerAnimating()) in SnapWindow
BEFORE: SplitViewController::SnapWindow bails out if called during the divider snap animation. Callers check for the divider snap animation before calling SplitViewController::SnapWindow, because correct behavior is never achieved just by allowing SplitViewController::SnapWindow to silently fail. AFTER: SplitViewController::SnapWindow has a DCHECK that fails during the divider snap animation. FYI: It behooves me to discuss why snapping a window during the divider snap animation is problematic in the first place. See [1] for my commentary about what can happen if the window becomes snapped and the divider continues to animate. Another idea would be to interrupt the divider snap animation, but that proposition is not as simple as it may sound, because if the divider is animating to an edge of the work area, then split view mode will end. [1] https://chromium-review.googlesource.com/c/chromium/src/+/1480869/1/ash/wm/splitview/split_view_controller.cc Bug: None Change-Id: Ie457e53448ffe440c738f171e4c4b0d0affcf76c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1911704Reviewed-by:Mitsuru Oshima <oshima@chromium.org> Commit-Queue: Avery Musbach <amusbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#714557}
Showing
Please register or sign in to comment