Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ea28020d4d412557991fa342390443d323a3805a
https://github.com/WebKit/WebKit/commit/ea28020d4d412557991fa342390443d323a3805a
Author: Aditya Keerthi <[email protected]>
Date: 2024-01-11 (Thu, 11 Jan 2024)
Changed paths:
A LayoutTests/fast/forms/ios/dismiss-date-picker-on-rotation-expected.txt
A LayoutTests/fast/forms/ios/dismiss-date-picker-on-rotation.html
M Source/WebKit/UIProcess/ios/forms/WKDatePickerPopoverController.mm
Log Message:
-----------
REGRESSION (268069@main): [iOS] Rotating from landscape to portrait causes
date picker to run off screen
https://bugs.webkit.org/show_bug.cgi?id=267397
rdar://118972687
Reviewed by Wenson Hsieh.
268069@main modified date picker presentation to use
`UIPopoverPresentationController`, rather than
`_UIDatePickerOverlayPresentation`.
`_UIDatePickerOverlayPresentation` automatically handled dismissing the picker
on rotation and view size changes, but `UIPopoverPresentationController` does
not.
This results in the date picker being presented at an incorrect location after
rotation, as the view remains presented, and the old layout information is still
used.
Fix by explicitly dismissing the picker on rotation and view size changes,
matching
system date/time pickers.
* LayoutTests/fast/forms/ios/dismiss-date-picker-on-rotation-expected.txt:
Added.
* LayoutTests/fast/forms/ios/dismiss-date-picker-on-rotation.html: Added.
* Source/WebKit/UIProcess/ios/forms/WKDatePickerPopoverController.mm:
(-[WKDatePickerPopoverController dismissDatePickerAnimated:]):
(-[WKDatePickerPopoverController dismissDatePicker]):
(-[WKDatePickerPopoverController
viewWillTransitionToSize:withTransitionCoordinator:]):
Only dismiss the date picker if it is already presented by checking for
`isBeingPresented` and `isBeingDismissed`.
Canonical link: https://commits.webkit.org/272922@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes