Bug 138775 - Use TextIndicator instead of the built in Lookup highlight
Summary: Use TextIndicator instead of the built in Lookup highlight
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-16 01:28 PST by Tim Horton
Modified: 2014-11-16 17:57 PST (History)
6 users (show)

See Also:


Attachments
Patch (43.14 KB, patch)
2014-11-16 01:28 PST, Tim Horton
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-11-16 01:28:03 PST
Use TextIndicator instead of the built in Lookup highlight
Comment 1 Tim Horton 2014-11-16 01:28:39 PST
Created attachment 241680 [details]
Patch
Comment 2 Tim Horton 2014-11-16 01:29:11 PST
<rdar://problem/18953982>
Comment 3 WebKit Commit Bot 2014-11-16 01:31:18 PST
Attachment 241680 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h:75:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/UIProcess/API/mac/WKViewInternal.h:84:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:3070:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:3085:  Missing space inside { }.  [whitespace/braces] [5]
ERROR: Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm:123:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 6 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Anders Carlsson 2014-11-16 07:28:12 PST
Comment on attachment 241680 [details]
Patch

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

> Source/WebKit2/UIProcess/API/mac/WKView.mm:3080
> +    _data->_textIndicatorWindow->setTextIndicator(textIndicator, fadeOut, animate, completionHandler);

Should WTF::move the completion handler.

> Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h:52
> +    void setTextIndicator(PassRefPtr<TextIndicator>, bool fadeOut, bool animate, std::function<void ()> animationCompletionHandler);

Would be nice to combine fadeOut and animate into a set of flags.
Comment 5 Tim Horton 2014-11-16 12:33:54 PST
(In reply to comment #4)
> Comment on attachment 241680 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=241680&action=review
> 
> > Source/WebKit2/UIProcess/API/mac/WKView.mm:3080
> > +    _data->_textIndicatorWindow->setTextIndicator(textIndicator, fadeOut, animate, completionHandler);
> 
> Should WTF::move the completion handler.
> 
> > Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h:52
> > +    void setTextIndicator(PassRefPtr<TextIndicator>, bool fadeOut, bool animate, std::function<void ()> animationCompletionHandler);
> 
> Would be nice to combine fadeOut and animate into a set of flags.

Agreed, especially because "fadeOut" is a less-than-ideal name for what it really does. Not in this patch, though.
Comment 6 Tim Horton 2014-11-16 12:41:38 PST
http://trac.webkit.org/changeset/176164
Comment 7 Tim Horton 2014-11-16 17:57:44 PST
Follow up to stop the crashes in http://trac.webkit.org/changeset/176166.