Bug 48192

Summary: [Cairo] Remove PlatformRefPtrCairo
Product: WebKit Reporter: Martin Robinson <mrobinson>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, darin, gustavo, webkit.review.bot, xan.lopez
Priority: P3 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Remove PlatformRefPtrCairo
none
Patch also including RefPtrCair.cpp and RefPtrCairo.h abarth: review+

Description Martin Robinson 2010-10-23 11:15:19 PDT
PlatformRefPtrCairo is unecessary. It should be replaced by a RefPtr specialization. See this mailing list thread for more details: http://comments.gmane.org/gmane.os.opendarwin.webkit.devel/14529 This is the first step toward removing PlatformRefPtr entirely.
Comment 1 Martin Robinson 2010-10-23 12:05:37 PDT
Created attachment 71651 [details]
Remove PlatformRefPtrCairo
Comment 2 Brent Fulgham 2010-10-25 10:11:50 PDT
I heartily approve of this change.  This should also resolve some of Darin's concerns about the use of the term 'Platform' in the RefPtr name.

Let's get it approved and landed!
Comment 3 Martin Robinson 2010-10-25 13:22:20 PDT
Created attachment 71789 [details]
Patch also including RefPtrCair.cpp and RefPtrCairo.h

My previous patch did not include RefPtrCairo.h and RefPtrCairo.cpp. I could not convince webkit-patch to include them for some reason, so I've had to roll the patch by hand.
Comment 4 WebKit Review Bot 2010-10-25 13:25:36 PDT
Attachment 71789 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/platform/graphics/cairo/RefPtrCairo.cpp:33:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/cairo/RefPtrCairo.cpp:39:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/cairo/RefPtrCairo.cpp:45:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/cairo/RefPtrCairo.cpp:51:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/cairo/RefPtrCairo.cpp:57:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/cairo/RefPtrCairo.cpp:63:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/cairo/RefPtrCairo.cpp:69:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/cairo/RefPtrCairo.cpp:75:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/cairo/RefPtrCairo.cpp:82:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/platform/graphics/cairo/RefPtrCairo.cpp:88:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 10 in 18 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Martin Robinson 2010-10-25 13:31:51 PDT
(In reply to comment #4)
> WebCore/platform/graphics/cairo/RefPtrCairo.cpp:33:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]

I believe these are all false positives. When making the patch I discovered that LIKELY will not accept a pointer as an argument. It requires something which evaluates to a boolean.
Comment 6 WebKit Review Bot 2010-10-25 13:58:33 PDT
Attachment 71651 [details] did not build on gtk:
Build output: http://queues.webkit.org/results/4819001
Comment 7 Martin Robinson 2010-11-02 19:24:06 PDT
Committed r71204: <http://trac.webkit.org/changeset/71204>