Some methods can benefit of using const refs as also it makes sense to unify the interface (i.e. parameters) in calculateKernelSize and calculateUnscaledKernelSize.
Created attachment 227857 [details] Patch
Comment on attachment 227857 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227857&action=review > Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp:408 > +IntSize FEGaussianBlur::calculateKernelSize(Filter* filter, const FloatPoint& std) const Filter* ? Please rename "std" to something better (is it stdDeviation?)
Created attachment 227860 [details] Patch
FilterEffect() provides the filter and it uses a pointer as constructor parameter (which can be null). But we can have a const pointer, since applyVerticalScale/HorizontalScale() are const methods.
Created attachment 227864 [details] Patch
Last patch uses const Filter*.
Comment on attachment 227864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227864&action=review > Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp:410 > + FloatPoint stdFilterScaled(filter->applyHorizontalScale(stdDeviation.x()), filter->applyVerticalScale(stdDeviation.y())); Since you dereference filter without a null check, you should make it a const Filter&
Created attachment 227879 [details] Patch
Agreed, FilterEffect will now return a ref.
Comment on attachment 227879 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227879&action=review > Source/WebCore/platform/graphics/filters/Filter.h:50 > + virtual float applyHorizontalScale(const float value) const { return value * m_filterResolution.width(); } > + virtual float applyVerticalScale(const float value) const { return value * m_filterResolution.height(); } no need for const float
Created attachment 227902 [details] Patch
Removed unnecessary const.
Comment on attachment 227902 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227902&action=review > Source/WebCore/platform/graphics/filters/Filter.h:49 > + // TODO: verify descendants that overload this method and turn them to const. Not sure why you need the comment. AFAICT all subclasses use "override" so you would get a build failure with mismatched signatures.
Comment on attachment 227902 [details] Patch Clearing flags on attachment: 227902 Committed r166341: <http://trac.webkit.org/changeset/166341>
All reviewed patches have been landed. Closing bug.