Title: [275532] trunk/Source/WebKit
- Revision
- 275532
- Author
- [email protected]
- Date
- 2021-04-06 10:54:10 -0700 (Tue, 06 Apr 2021)
Log Message
[iOS] Prevent background blur when presenting date/time pickers
https://bugs.webkit.org/show_bug.cgi?id=224189
<rdar://problem/76220352>
Reviewed by Wenson Hsieh.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/forms/WKDateTimeInputControl.mm:
(-[WKDateTimePicker _contextMenuInteraction:styleForMenuWithConfiguration:]):
Presenting a UIContextMenuInteraction results in the application of a
blur effect to the background view. However, the peripheral presented
when interacting with a UIDatePicker across the rest of the system
does not blur the background.
To align our behavior with the rest of the system, remove the blur
effect by specifying an empty UIVisualEffect for the
_UIContextMenuStyle's preferredBackgroundEffects. The empty effect
must be explicitly specified, since setting an empty array will result
in the default effect being applied.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (275531 => 275532)
--- trunk/Source/WebKit/ChangeLog 2021-04-06 17:28:13 UTC (rev 275531)
+++ trunk/Source/WebKit/ChangeLog 2021-04-06 17:54:10 UTC (rev 275532)
@@ -1,3 +1,26 @@
+2021-04-06 Aditya Keerthi <[email protected]>
+
+ [iOS] Prevent background blur when presenting date/time pickers
+ https://bugs.webkit.org/show_bug.cgi?id=224189
+ <rdar://problem/76220352>
+
+ Reviewed by Wenson Hsieh.
+
+ * Platform/spi/ios/UIKitSPI.h:
+ * UIProcess/ios/forms/WKDateTimeInputControl.mm:
+ (-[WKDateTimePicker _contextMenuInteraction:styleForMenuWithConfiguration:]):
+
+ Presenting a UIContextMenuInteraction results in the application of a
+ blur effect to the background view. However, the peripheral presented
+ when interacting with a UIDatePicker across the rest of the system
+ does not blur the background.
+
+ To align our behavior with the rest of the system, remove the blur
+ effect by specifying an empty UIVisualEffect for the
+ _UIContextMenuStyle's preferredBackgroundEffects. The empty effect
+ must be explicitly specified, since setting an empty array will result
+ in the default effect being applied.
+
2021-04-06 Alex Christensen <[email protected]>
Revert part of crash fix to keep test infrastructure
Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (275531 => 275532)
--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2021-04-06 17:28:13 UTC (rev 275531)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2021-04-06 17:54:10 UTC (rev 275532)
@@ -1213,6 +1213,7 @@
@interface _UIContextMenuStyle : NSObject <NSCopying>
@property (nonatomic) _UIContextMenuLayout preferredLayout;
@property (nonatomic) BOOL hasInteractivePreview;
+@property (nonatomic, strong) NSArray *preferredBackgroundEffects;
+ (instancetype)defaultStyle;
@end
Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm (275531 => 275532)
--- trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm 2021-04-06 17:28:13 UTC (rev 275531)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm 2021-04-06 17:54:10 UTC (rev 275532)
@@ -163,6 +163,7 @@
{
_UIContextMenuStyle *style = [_UIContextMenuStyle defaultStyle];
style.hasInteractivePreview = YES;
+ style.preferredBackgroundEffects = @[ [UIVisualEffect emptyEffect] ];
style.preferredLayout = _UIContextMenuLayoutAutomatic;
return style;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes