WebKit Bugzilla
Attachment 346213 Details for
Bug 188207
: [iOS] Color picker should have a border when presented in a popover
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188207-20180731160617.patch (text/plain), 3.65 KB, created by
Aditya Keerthi
on 2018-07-31 16:06:18 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aditya Keerthi
Created:
2018-07-31 16:06:18 PDT
Size:
3.65 KB
patch
obsolete
>Subversion Revision: 234260 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4f90b8d3c85cd47f248f3bac2681594ea11a6316..b4ab08d507de5aae1a20b6eb895cbe27b415b6e6 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,22 @@ >+2018-07-31 Aditya Keerthi <akeerthi@apple.com> >+ >+ [iOS] Color picker should have a border when presented in a popover >+ https://bugs.webkit.org/show_bug.cgi?id=188207 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The color picker should have a border when presented in a popover. This matches >+ the behavior of color pickers in other parts of iOS. >+ >+ Since the popover will resize it's view to fill it's size, we first place the >+ color picker in a container view. The container view can then fill the popover, >+ while the smaller color picker is centered in it's container - creating the >+ appearance of a border. >+ >+ * UIProcess/ios/forms/WKFormColorControl.mm: >+ (-[WKColorPopover initWithView:]): >+ * UIProcess/ios/forms/WKFormColorPicker.mm: >+ > 2018-07-27 Aditya Keerthi <akeerthi@apple.com> > > [iOS] WKColorPicker's selection indicator doesn't always cover the selected swatch >diff --git a/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm b/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm >index ec4f3576c097790fa2a2a0440cc40d9a5b8573c6..ee6f11f344dc594a1d1be6cd73dda802351048b3 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm >+++ b/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm >@@ -35,6 +35,9 @@ > > #pragma mark - WKColorPopover > >+static const CGFloat colorPopoverWidth = 290; >+static const CGFloat colorPopoverCornerRadius = 9; >+ > @interface WKColorPopover : WKFormRotatingAccessoryPopover<WKFormControl> { > RetainPtr<NSObject<WKFormControl>> _innerControl; > } >@@ -52,9 +55,16 @@ > _innerControl = adoptNS([[WKColorPicker alloc] initWithView:view]); > > RetainPtr<UIViewController> popoverViewController = adoptNS([[UIViewController alloc] init]); >+ RetainPtr<UIView> controlContainerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, colorPopoverWidth, colorPopoverWidth)]; >+ > UIView *controlView = [_innerControl controlView]; >- [popoverViewController setView:controlView]; >- [popoverViewController setPreferredContentSize:controlView.frame.size]; >+ [controlView setCenter:[controlContainerView center]]; >+ [controlView.layer setCornerRadius:colorPopoverCornerRadius]; >+ [controlView setClipsToBounds:YES]; >+ [controlContainerView addSubview:controlView]; >+ >+ [popoverViewController setView:controlContainerView.get()]; >+ [popoverViewController setPreferredContentSize:[controlContainerView size]]; > > #pragma clang diagnostic push > #pragma clang diagnostic ignored "-Wdeprecated-declarations" >diff --git a/Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm b/Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm >index f71ce807841070eca3fcefb27128d1ea911f6766..8b4684eda2e770c4fb3a49da5fbb066b884205d3 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm >+++ b/Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm >@@ -42,9 +42,9 @@ SOFT_LINK_CLASS(PencilKit, PKColorMatrixView) > > static const CGFloat additionalKeyboardAffordance = 80; > static const CGFloat colorSelectionIndicatorBorderWidth = 4; >-static const CGFloat colorSelectionIndicatorCornerRadius = 13; >+static const CGFloat colorSelectionIndicatorCornerRadius = 9; > static const CGFloat pickerWidthForPopover = 280; >-static const CGFloat topColorMatrixPadding = 8; >+static const CGFloat topColorMatrixPadding = 5; > #if ENABLE(DATALIST_ELEMENT) > static const size_t maxColorSuggestions = 12; > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188207
:
346213
|
346214
|
346279