Bug 163132 - Adopt BlockPtr in ViewGestureController
Summary: Adopt BlockPtr in ViewGestureController
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:
Depends on:
Blocks:
 
Reported: 2016-10-07 11:34 PDT by Tim Horton
Modified: 2016-10-07 13:28 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.56 KB, patch)
2016-10-07 11:35 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (6.07 KB, patch)
2016-10-07 12:34 PDT, 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 2016-10-07 11:34:39 PDT
Adopt BlockPtr in ViewGestureController
Comment 1 Tim Horton 2016-10-07 11:35:06 PDT
Created attachment 290950 [details]
Patch
Comment 2 WebKit Commit Bot 2016-10-07 11:36:04 PDT
Attachment 290950 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/mac/ViewGestureController.h:269:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Anders Carlsson 2016-10-07 12:03:12 PDT
Comment on attachment 290950 [details]
Patch

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

> Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:720
>  void ViewGestureController::setDidMoveSwipeSnapshotCallback(void(^callback)(CGRect))

Maybe this should take a BlockPtr too?

> Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:722
> +    m_didMoveSwipeSnapshotCallback = makeBlockPtr(callback);

I don't think you need to use makeBlockPtr here.
Comment 4 Tim Horton 2016-10-07 12:34:01 PDT
Created attachment 290957 [details]
Patch
Comment 5 WebKit Commit Bot 2016-10-07 12:36:24 PDT
Attachment 290957 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/mac/ViewGestureController.h:104:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/UIProcess/mac/ViewGestureController.h:269:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h:422:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm:3279:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Anders Carlsson 2016-10-07 12:41:18 PDT
Comment on attachment 290957 [details]
Patch

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

> Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h:422
> +    void setDidMoveSwipeSnapshotCallback(BlockPtr<void (CGRect)>);

Should be BlockPtr&&

> Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm:3279
> +void WebViewImpl::setDidMoveSwipeSnapshotCallback(BlockPtr<void (CGRect)> callback)

Should be BlockPtr&& and use WTFMove.

> Source/WebKit2/UIProcess/mac/ViewGestureController.h:104
> +    void setDidMoveSwipeSnapshotCallback(BlockPtr<void (CGRect)> callback) { m_didMoveSwipeSnapshotCallback = callback; }

Should be BlockPtr&& and use WTFMove.
Comment 7 Tim Horton 2016-10-07 13:28:19 PDT
https://trac.webkit.org/changeset/206930