Bug 121085 - GeneratorGeneratedImage should be called GradientImage
Summary: GeneratorGeneratedImage should be called GradientImage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-10 00:53 PDT by Tim Horton
Modified: 2013-09-21 20:28 PDT (History)
9 users (show)

See Also:


Attachments
patch (32.59 KB, patch)
2013-09-19 22:29 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
style (32.62 KB, patch)
2013-09-19 22:35 PDT, Tim Horton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2013-09-10 00:53:35 PDT
Ben removed Generator in http://trac.webkit.org/changeset/150053 but we still have GeneratorGeneratedImage, which now unconditionally takes a gradient. So, this class needs a rename.
Comment 1 Tim Horton 2013-09-19 22:29:04 PDT
Created attachment 212127 [details]
patch
Comment 2 WebKit Commit Bot 2013-09-19 22:32:38 PDT
Attachment 212127 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/GNUmakefile.list.am', u'Source/WebCore/Target.pri', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/css/CSSGradientValue.cpp', u'Source/WebCore/css/CSSImageGeneratorValue.cpp', u'Source/WebCore/css/CSSImageGeneratorValue.h', u'Source/WebCore/platform/graphics/BitmapImage.h', u'Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp', u'Source/WebCore/platform/graphics/GeneratorGeneratedImage.h', u'Source/WebCore/platform/graphics/GradientImage.cpp', u'Source/WebCore/platform/graphics/GradientImage.h', u'Source/WebCore/platform/graphics/Image.h', u'Source/WebCore/platform/graphics/ImageBuffer.h']" exit_code: 1
Source/WebCore/css/CSSGradientValue.cpp:31:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2013-09-19 22:35:56 PDT
Created attachment 212128 [details]
style
Comment 4 WebKit Commit Bot 2013-09-21 03:51:19 PDT
Comment on attachment 212128 [details]
style

Clearing flags on attachment: 212128

Committed r156226: <http://trac.webkit.org/changeset/156226>
Comment 5 WebKit Commit Bot 2013-09-21 03:51:22 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Darin Adler 2013-09-21 20:28:32 PDT
Comment on attachment 212128 [details]
style

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

> Source/WebCore/platform/graphics/GradientImage.h:45
> +    virtual ~GradientImage() { }

I suggest deleting this line of code.

What this does is exactly what the compiler will automatically do for us if we don’t mention the destructor at all. It’s already virtual because a base class has a virtual destructor. The automatically generated one does the same thing as one with an empty body. Sometimes people will declare the destructor explicitly so we don’t have to include the things necessary to compile it in the header file, but in this case we have an inline definition of it, so that benefit does not apply.

Better style to leave it out.

> Source/WebCore/platform/graphics/GradientImage.h:47
> +protected:

If a class is FINAL, then it makes no sense to have a protected section. These things should just be part of the private section.