WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
187871
[iOS] Add support for input[type=color]
https://bugs.webkit.org/show_bug.cgi?id=187871
Summary
[iOS] Add support for input[type=color]
Aditya Keerthi
Reported
2018-07-20 14:27:58 PDT
This bug tracks the work required to bring input[type=color] to iOS.
Attachments
Patch
(40.44 KB, patch)
2018-07-20 16:02 PDT
,
Aditya Keerthi
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews200 for win-future
(12.94 MB, application/zip)
2018-07-20 18:41 PDT
,
EWS Watchlist
no flags
Details
Patch
(39.87 KB, patch)
2018-07-23 11:12 PDT
,
Aditya Keerthi
no flags
Details
Formatted Diff
Diff
Patch
(39.84 KB, patch)
2018-07-23 11:45 PDT
,
Aditya Keerthi
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Aditya Keerthi
Comment 1
2018-07-20 16:02:03 PDT
Created
attachment 345486
[details]
Patch
EWS Watchlist
Comment 2
2018-07-20 18:41:21 PDT
Comment on
attachment 345486
[details]
Patch
Attachment 345486
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/8604867
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 3
2018-07-20 18:41:32 PDT
Created
attachment 345495
[details]
Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Tim Horton
Comment 4
2018-07-23 10:27:52 PDT
Comment on
attachment 345486
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=345486&action=review
> Source/WebCore/html/ColorInputType.cpp:173 > +#if PLATFORM(MAC)
It feels like this ifdef is more appropriate in the platform-y Chrome code instead of here.
> Source/WebKit/UIProcess/ios/forms/WKFormColorControl.h:33 > +- (instancetype)initWithView:(WKContentView *)view;
Can this just be a UIView? It’s kind of weird to spread knowledge of WKContentView, and I don’t think it’s important in this case.
> Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm:109 > + [colorButtons addObject:[colorButtonsRow copy]];
This looks like a leak. But it’s not, because you release them in dealloc. But the array was retaining them, so the extra ref was for naught. If you did things the WebKit way this would be auto row = adoptNS([colorButtonsRow copy]); [colorButtons addObject:row.get()]; and then nothing in dealloc.
> Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm:145 > + [_colorButtons release]; > + [_colorMatrix release];
Why not RetainPtr instead of this?
> Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm:219 > + const CGFloat *components = CGColorGetComponents(uiColor.CGColor);
Why are you doing all this yourself? I’m sure we have UIColor->Color code elsewhere.
Aditya Keerthi
Comment 5
2018-07-23 10:46:41 PDT
(In reply to Tim Horton from
comment #4
)
> Comment on
attachment 345486
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=345486&action=review
> > > Source/WebKit/UIProcess/ios/forms/WKFormColorControl.h:33 > > +- (instancetype)initWithView:(WKContentView *)view; > > Can this just be a UIView? It’s kind of weird to spread knowledge of > WKContentView, and I don’t think it’s important in this case.
I made it a WKContentView because the view is passed through to another class which has WKContentView specific logic. If I changed it to a UIView here, I would need to cast to WKContentView later on. Do you prefer casting or keeping the definition as-is?
Tim Horton
Comment 6
2018-07-23 11:07:19 PDT
(In reply to Aditya Keerthi from
comment #5
)
> (In reply to Tim Horton from
comment #4
) > > Comment on
attachment 345486
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=345486&action=review
> > > > > Source/WebKit/UIProcess/ios/forms/WKFormColorControl.h:33 > > > +- (instancetype)initWithView:(WKContentView *)view; > > > > Can this just be a UIView? It’s kind of weird to spread knowledge of > > WKContentView, and I don’t think it’s important in this case. > > I made it a WKContentView because the view is passed through to another > class which has WKContentView specific logic. If I changed it to a UIView > here, I would need to cast to WKContentView later on. Do you prefer casting > or keeping the definition as-is?
No, no, leave it as is. I didn't see the WKContentView specific bit.
Aditya Keerthi
Comment 7
2018-07-23 11:12:45 PDT
Created
attachment 345585
[details]
Patch
Tim Horton
Comment 8
2018-07-23 11:27:02 PDT
Comment on
attachment 345585
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=345585&action=review
> Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm:114 > + _colorButtons = adoptNS([colorButtons copy]);
In retrospect, there's not even a real reason for this copy.
Aditya Keerthi
Comment 9
2018-07-23 11:45:03 PDT
Created
attachment 345591
[details]
Patch
WebKit Commit Bot
Comment 10
2018-07-23 12:13:15 PDT
Comment on
attachment 345591
[details]
Patch Clearing flags on attachment: 345591 Committed
r234105
: <
https://trac.webkit.org/changeset/234105
>
WebKit Commit Bot
Comment 11
2018-07-23 12:13:17 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12
2018-07-23 12:15:11 PDT
<
rdar://problem/42509854
>
Ross Kirsling
Comment 13
2018-07-23 16:52:04 PDT
Comment on
attachment 345591
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=345591&action=review
> Source/WebCore/css/html.css:887 > #endif // defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT
This #endif got left behind. :) It seems to be what's rendering text diffs invalid on WinCairo right now:
https://build.webkit.org/results/WinCairo%2064-bit%20WKL%20Release%20(Tests)/r234105%20(694)/results.html
Aditya Keerthi
Comment 14
2018-07-23 16:58:11 PDT
Sorry about that! I'll put up a patch to remove it.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug