Changeset 234461 in webkit
- Timestamp:
- Aug 1, 2018 10:26:17 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r234459 r234461 1 2018-08-01 Aditya Keerthi <akeerthi@apple.com> 2 3 [iOS] Color picker should have a border when presented in a popover 4 https://bugs.webkit.org/show_bug.cgi?id=188207 5 6 Reviewed by Wenson Hsieh. 7 8 The color picker should have a border when presented in a popover. This matches 9 the behavior of color pickers in other parts of iOS. 10 11 Since the popover will resize its view to fill its size, we first place the 12 color picker in a container view. The container view can then fill the popover, 13 while the smaller color picker is centered in it's container - creating the 14 appearance of a border. 15 16 * UIProcess/ios/forms/WKFormColorControl.mm: 17 (-[WKColorPopover initWithView:]): 18 * UIProcess/ios/forms/WKFormColorPicker.mm: 19 1 20 2018-08-01 Commit Queue <commit-queue@webkit.org> 2 21 -
trunk/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm
r234105 r234461 36 36 #pragma mark - WKColorPopover 37 37 38 static const CGFloat colorPopoverWidth = 290; 39 static const CGFloat colorPopoverCornerRadius = 9; 40 38 41 @interface WKColorPopover : WKFormRotatingAccessoryPopover<WKFormControl> { 39 42 RetainPtr<NSObject<WKFormControl>> _innerControl; … … 53 56 54 57 RetainPtr<UIViewController> popoverViewController = adoptNS([[UIViewController alloc] init]); 58 RetainPtr<UIView> controlContainerView = adoptNS([[UIView alloc] initWithFrame:CGRectMake(0, 0, colorPopoverWidth, colorPopoverWidth)]); 59 55 60 UIView *controlView = [_innerControl controlView]; 56 [popoverViewController setView:controlView]; 57 [popoverViewController setPreferredContentSize:controlView.frame.size]; 61 [controlView setCenter:[controlContainerView center]]; 62 [controlView.layer setCornerRadius:colorPopoverCornerRadius]; 63 [controlView setClipsToBounds:YES]; 64 [controlContainerView addSubview:controlView]; 65 66 [popoverViewController setView:controlContainerView.get()]; 67 [popoverViewController setPreferredContentSize:[controlContainerView size]]; 58 68 59 69 #pragma clang diagnostic push -
trunk/Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm
r234458 r234461 43 43 static const CGFloat additionalKeyboardAffordance = 80; 44 44 static const CGFloat colorSelectionIndicatorBorderWidth = 4; 45 static const CGFloat colorSelectionIndicatorCornerRadius = 13;45 static const CGFloat colorSelectionIndicatorCornerRadius = 9; 46 46 static const CGFloat pickerWidthForPopover = 280; 47 static const CGFloat topColorMatrixPadding = 8;47 static const CGFloat topColorMatrixPadding = 5; 48 48 49 49 using namespace WebKit;
Note: See TracChangeset
for help on using the changeset viewer.