Bug 115775

Summary: Make CanvasStyle a plain object instead of an RefCounted object
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eflews.bot, esprehn+autocc, gtk-ews, gyuyoung.kim, philn, webkit-ews, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Benjamin Poulain 2013-05-07 21:31:11 PDT
Make CanvasStyle a plain object instead of an RefCounted object
Comment 1 Benjamin Poulain 2013-05-07 21:37:01 PDT
Created attachment 201026 [details]
Patch
Comment 2 WebKit Commit Bot 2013-05-07 21:38:50 PDT
Attachment 201026 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp', u'Source/WebCore/html/HTMLCanvasElement.cpp', u'Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp', u'Source/WebCore/html/canvas/CanvasRenderingContext2D.h', u'Source/WebCore/html/canvas/CanvasStyle.cpp', u'Source/WebCore/html/canvas/CanvasStyle.h']" exit_code: 1
Source/WebCore/html/canvas/CanvasStyle.h:76:  Missing spaces around &&  [whitespace/operators] [3]
Source/WebCore/html/canvas/CanvasStyle.h:77:  Missing spaces around &&  [whitespace/operators] [3]
Source/WebCore/html/canvas/CanvasStyle.h:81:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 3 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Early Warning System Bot 2013-05-07 21:41:18 PDT
Comment on attachment 201026 [details]
Patch

Attachment 201026 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/310115
Comment 4 Early Warning System Bot 2013-05-07 21:43:22 PDT
Comment on attachment 201026 [details]
Patch

Attachment 201026 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/424039
Comment 5 kov's GTK+ EWS bot 2013-05-07 21:44:23 PDT
Comment on attachment 201026 [details]
Patch

Attachment 201026 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/377533
Comment 6 EFL EWS Bot 2013-05-07 21:57:39 PDT
Comment on attachment 201026 [details]
Patch

Attachment 201026 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/398075
Comment 7 EFL EWS Bot 2013-05-07 21:57:48 PDT
Comment on attachment 201026 [details]
Patch

Attachment 201026 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/377534
Comment 8 Build Bot 2013-05-07 22:03:01 PDT
Comment on attachment 201026 [details]
Patch

Attachment 201026 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/302084
Comment 9 Benjamin Poulain 2013-05-07 22:14:43 PDT
Created attachment 201029 [details]
Patch
Comment 10 WebKit Commit Bot 2013-05-07 22:16:43 PDT
Attachment 201029 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp', u'Source/WebCore/html/HTMLCanvasElement.cpp', u'Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp', u'Source/WebCore/html/canvas/CanvasRenderingContext2D.h', u'Source/WebCore/html/canvas/CanvasStyle.cpp', u'Source/WebCore/html/canvas/CanvasStyle.h']" exit_code: 1
Source/WebCore/html/canvas/CanvasStyle.h:76:  Missing spaces around &&  [whitespace/operators] [3]
Source/WebCore/html/canvas/CanvasStyle.h:77:  Missing spaces around &&  [whitespace/operators] [3]
Source/WebCore/html/canvas/CanvasStyle.h:81:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 3 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Andreas Kling 2013-05-08 06:33:45 PDT
Comment on attachment 201029 [details]
Patch

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

r=me

> Source/WebCore/html/canvas/CanvasStyle.h:46
> +        CanvasStyle(RGBA32);

I'd prefer this to be explicit.

> Source/WebCore/html/canvas/CanvasStyle.h:51
> +        CanvasStyle(PassRefPtr<CanvasGradient>);
> +        CanvasStyle(PassRefPtr<CanvasPattern>);

Ditto for these.

> Source/WebCore/html/canvas/CanvasStyle.h:111
> +        Type m_type;

I'd make this member const, as it should never change after construction.
Comment 12 Benjamin Poulain 2013-05-08 13:57:38 PDT
Created attachment 201105 [details]
Patch
Comment 13 WebKit Commit Bot 2013-05-08 17:14:53 PDT
Attachment 201105 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp', u'Source/WebCore/html/HTMLCanvasElement.cpp', u'Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp', u'Source/WebCore/html/canvas/CanvasRenderingContext2D.h', u'Source/WebCore/html/canvas/CanvasStyle.cpp', u'Source/WebCore/html/canvas/CanvasStyle.h']" exit_code: 1
Source/WebCore/html/canvas/CanvasStyle.h:76:  Missing spaces around &&  [whitespace/operators] [3]
Source/WebCore/html/canvas/CanvasStyle.h:77:  Missing spaces around &&  [whitespace/operators] [3]
Source/WebCore/html/canvas/CanvasStyle.h:81:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 3 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 Benjamin Poulain 2013-05-11 01:36:10 PDT
Committed r149928: <http://trac.webkit.org/changeset/149928>