Bug 192518 - WKWebView should support custom tintColor
Summary: WKWebView should support custom tintColor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-07 15:01 PST by Tim Horton
Modified: 2018-12-10 01:05 PST (History)
5 users (show)

See Also:


Attachments
Patch (7.35 KB, patch)
2018-12-07 15:03 PST, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (7.34 KB, patch)
2018-12-07 15:05 PST, Tim Horton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2018-12-07 15:01:11 PST
WKWebView should support custom tintColor
Comment 1 Tim Horton 2018-12-07 15:03:11 PST
Created attachment 356842 [details]
Patch
Comment 2 Tim Horton 2018-12-07 15:03:21 PST
<rdar://problem/37243261>
Comment 3 Tim Horton 2018-12-07 15:05:29 PST
Created attachment 356843 [details]
Patch
Comment 4 Simon Fraser (smfr) 2018-12-07 17:41:02 PST
Comment on attachment 356843 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=356843&action=review

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:2511
> +        if (!_page->editorState().isMissingPostLayoutData) {

I hate isMissingPostLayoutData. Why is it a thing?

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:2513
> +            if (caretColor.isValid())

Is it OK if caretColor is transparent black?
Comment 5 Megan Gardner 2018-12-07 17:57:45 PST
Comment on attachment 356843 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=356843&action=review

> Tools/TestWebKitAPI/ios/UIKitSPI.h:71
> +@property (nonatomic, readonly) UIColor *selectionBarColor;

Why don't we test selectionHighlightColor as well? Is that not testable?
Comment 6 Tim Horton 2018-12-08 00:49:59 PST
(In reply to Simon Fraser (smfr) from comment #4)
> Comment on attachment 356843 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=356843&action=review
> 
> > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:2511
> > +        if (!_page->editorState().isMissingPostLayoutData) {
> 
> I hate isMissingPostLayoutData. Why is it a thing?

I don’t know. I blame whsieh.

> > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:2513
> > +            if (caretColor.isValid())
> 
> Is it OK if caretColor is transparent black?

Yes.

(In reply to Megan Gardner from comment #5)
> Comment on attachment 356843 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=356843&action=review
> 
> > Tools/TestWebKitAPI/ios/UIKitSPI.h:71
> > +@property (nonatomic, readonly) UIColor *selectionBarColor;
> 
> Why don't we test selectionHighlightColor as well? Is that not testable?

It is, but it’s actually transformed a bit by UIKit so it’s not a trivial equality test. I decided I didn’t want my test to depend on UIKit internal implementation details.
Comment 7 Wenson Hsieh 2018-12-08 00:52:57 PST
Comment on attachment 356843 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=356843&action=review

>>> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:2511
>>> +        if (!_page->editorState().isMissingPostLayoutData) {
>> 
>> I hate isMissingPostLayoutData. Why is it a thing?
> 
> I don’t know. I blame whsieh.

See: <https://trac.webkit.org/changeset/182603/webkit>
Comment 8 WebKit Commit Bot 2018-12-10 01:05:08 PST
Comment on attachment 356843 [details]
Patch

Clearing flags on attachment: 356843

Committed r239026: <https://trac.webkit.org/changeset/239026>
Comment 9 WebKit Commit Bot 2018-12-10 01:05:10 PST
All reviewed patches have been landed.  Closing bug.