Bug 131531 - [cairo] Add GUniquePtrCairo and use it instead of OwnPtrCairo
Summary: [cairo] Add GUniquePtrCairo and use it instead of OwnPtrCairo
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jae Hyun Park
URL:
Keywords:
Depends on:
Blocks: 130580
  Show dependency treegraph
 
Reported: 2014-04-11 03:02 PDT by Jae Hyun Park
Modified: 2014-06-05 16:51 PDT (History)
9 users (show)

See Also:


Attachments
Patch (13.62 KB, patch)
2014-04-11 03:07 PDT, Jae Hyun Park
no flags Details | Formatted Diff | Diff
Patch (13.72 KB, patch)
2014-04-14 21:55 PDT, Jae Hyun Park
achristensen: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jae Hyun Park 2014-04-11 03:02:41 PDT
Patch to follow.
Comment 1 Jae Hyun Park 2014-04-11 03:07:02 PDT
Created attachment 229121 [details]
Patch
Comment 2 Martin Robinson 2014-04-14 11:21:53 PDT
Comment on attachment 229121 [details]
Patch

It seems you are removing the FontConfig custom deleters and not replacing them.
Comment 3 Jae Hyun Park 2014-04-14 17:59:18 PDT
(In reply to comment #2)
> (From update of attachment 229121 [details])
> It seems you are removing the FontConfig custom deleters and not replacing them.

Thanks for the review.

I could not find any piece of code that uses OwnPtr<FcObjectSet> or OwnPtr<FcFontSet>. So I thought it was deprecated and removed it.

Should I include that in my changelog? or should I include them in GUniquePtrCairo anyway in case someone uses in the future?
Comment 4 Martin Robinson 2014-04-14 20:58:29 PDT
(In reply to comment #3)
 
> I could not find any piece of code that uses OwnPtr<FcObjectSet> or OwnPtr<FcFontSet>. So I thought it was deprecated and removed it.

Oh yes. It's probably a good idea to mention that in the ChangeLog.

> Should I include that in my changelog? or should I include them in GUniquePtrCairo anyway in case someone uses in the future?

That shouldn't be necessary.
Comment 5 Martin Robinson 2014-04-14 21:00:08 PDT
Comment on attachment 229121 [details]
Patch

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

> Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp:-27
> -#include "RefPtrCairo.h"

I think by removing this line you break the RefPtr<FcPattern> instance below.

> Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp:32
> +#include <wtf/PassOwnPtr.h>

Including OwnPtr.h would be better, I think.
Comment 6 Jae Hyun Park 2014-04-14 21:55:18 PDT
Created attachment 229344 [details]
Patch
Comment 7 Jae Hyun Park 2014-04-14 22:28:59 PDT
(In reply to comment #5)
> (From update of attachment 229121 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=229121&action=review
> 
> > Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp:-27
> > -#include "RefPtrCairo.h"
> 
> I think by removing this line you break the RefPtr<FcPattern> instance below.
Fixed.

> 
> > Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp:32
> > +#include <wtf/PassOwnPtr.h>
> 
> Including OwnPtr.h would be better, I think.
Fixed.

I also included why FontConfig custom deleters were removed in the ChangeLog.

Thanks!
Comment 8 Martin Robinson 2014-04-15 07:42:13 PDT
Comment on attachment 229344 [details]
Patch

One thing I'm wondering about now is whether the WinCairo port uses GUniuqePtr and GLib in general. If not, I don't think we can actually use it here. :/
Comment 9 Martin Robinson 2014-04-15 07:42:44 PDT
Pinging a few WinCairo port maintainers.
Comment 10 Jae Hyun Park 2014-05-07 06:39:45 PDT
Any updates from WinCairo port maintainers?
Comment 11 Alex Christensen 2014-05-07 10:35:20 PDT
It is correct that WinCairo does not use glib, so relying on gio.h in GUniquePtr.h would break it.
Comment 12 Alex Christensen 2014-06-05 16:51:04 PDT
Comment on attachment 229344 [details]
Patch

This would break the WinCairo port.