WebKit Bugzilla
Attachment 346279 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-20180801090752.patch (text/plain), 3.57 KB, created by
Aditya Keerthi
on 2018-08-01 09:07:53 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aditya Keerthi
Created:
2018-08-01 09:07:53 PDT
Size:
3.57 KB
patch
obsolete
>Subversion Revision: 234459 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 7b97a4fcc8f735414c08c33fea1b3c86d16ced06..ceb754f6842ae74362c812ea291d2deab1c02acc 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,22 @@ >+2018-08-01 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 its view to fill its 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-08-01 Commit Queue <commit-queue@webkit.org> > > Unreviewed, rolling out r234443 and r234445. >diff --git a/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm b/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm >index ec4f3576c097790fa2a2a0440cc40d9a5b8573c6..609bac31f56aa5aaebf03c2e318c1554a58e95a7 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 = adoptNS([[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 7b712b0826e311cb8bfb29c969a86caf4288dee5..f3af8b62da5720f59b5fe4035510b90aa4803958 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; > > using namespace WebKit; >
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