Bug 142143

Summary: Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
Product: WebKit Reporter: Joonghun Park <jh718.park>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, gyuyoung.kim
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Joonghun Park 2015-03-01 05:03:47 PST
Change from PassOwnPtr|OwnPtr to std::unique_ptr for ScrollAnimator in All port.
Comment 1 Joonghun Park 2015-03-01 05:10:05 PST
Created attachment 247624 [details]
Patch
Comment 2 Joonghun Park 2015-03-01 05:42:41 PST
Created attachment 247625 [details]
Patch
Comment 3 Darin Adler 2015-03-01 11:04:02 PST
Comment on attachment 247625 [details]
Patch

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

> Source/WebCore/platform/ScrollAnimator.h:62
> +    explicit ScrollAnimator(ScrollableArea&);

It’s not so great that now a client can now accidentally create a ScrollAnimator directly with make_unique, when it should be calling ScrollAnimator::create.
Comment 4 Gyuyoung Kim 2015-03-01 17:04:40 PST
Comment on attachment 247625 [details]
Patch

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

cq=me.

>> Source/WebCore/platform/ScrollAnimator.h:62
>> +    explicit ScrollAnimator(ScrollableArea&);
> 
> It’s not so great that now a client can now accidentally create a ScrollAnimator directly with make_unique, when it should be calling ScrollAnimator::create.

I also think like that. However, now we don't have best solution yet. In this case, lambdas looks not great benefit. When we have better solution, let's fix it again.
Comment 5 WebKit Commit Bot 2015-03-01 17:49:16 PST
Comment on attachment 247625 [details]
Patch

Clearing flags on attachment: 247625

Committed r180873: <http://trac.webkit.org/changeset/180873>
Comment 6 WebKit Commit Bot 2015-03-01 17:49:19 PST
All reviewed patches have been landed.  Closing bug.