Bug 144876 - Move TransformOperation-based classes off of PassRefPtr
Summary: Move TransformOperation-based classes off of PassRefPtr
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: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks: 144797
  Show dependency treegraph
 
Reported: 2015-05-11 11:15 PDT by Zan Dobersek
Modified: 2015-05-12 02:54 PDT (History)
1 user (show)

See Also:


Attachments
Patch (26.62 KB, patch)
2015-05-11 11:21 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch for landing (27.40 KB, patch)
2015-05-12 01:05 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2015-05-11 11:15:24 PDT
Move TransformOperation-based classes off of PassRefPtr
Comment 1 Zan Dobersek 2015-05-11 11:21:16 PDT
Created attachment 252871 [details]
Patch
Comment 2 Darin Adler 2015-05-11 17:20:40 PDT
Comment on attachment 252871 [details]
Patch

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

> Source/WebCore/platform/graphics/transforms/TransformOperation.h:30
> +#include <wtf/Ref.h>

I think Forward.h would have sufficed here. I don’t think we need to include Ref.h just to declare functions with Ref<X> as a return type.

> Source/WebCore/platform/graphics/transforms/TransformOperations.cpp:85
> +        RefPtr<TransformOperation> blendedOperation = toOperation ? toOperation->blend(fromOperation.get(), progress) : (fromOperation ? RefPtr<TransformOperation>(fromOperation->blend(nullptr, progress, true)) : nullptr);

A real shame that we have to cast to RefPtr here. At some point we should probably add something that turns a Ref into a RefPtr without having to repeat the name of the type involved.
Comment 3 Zan Dobersek 2015-05-12 00:58:53 PDT
Comment on attachment 252871 [details]
Patch

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

>> Source/WebCore/platform/graphics/transforms/TransformOperation.h:30
>> +#include <wtf/Ref.h>
> 
> I think Forward.h would have sufficed here. I don’t think we need to include Ref.h just to declare functions with Ref<X> as a return type.

That entails including Ref.h in all the header files declaring the deriving interfaces, but I'm OK with that.
Comment 4 Zan Dobersek 2015-05-12 01:05:56 PDT
Created attachment 252949 [details]
Patch for landing
Comment 5 Zan Dobersek 2015-05-12 02:54:52 PDT
Comment on attachment 252949 [details]
Patch for landing

Clearing flags on attachment: 252949

Committed r184193: <http://trac.webkit.org/changeset/184193>
Comment 6 Zan Dobersek 2015-05-12 02:54:59 PDT
All reviewed patches have been landed.  Closing bug.