[webkit-reviews] review granted: [Bug 137733] Use is<>() / downcast<>() for ClipPathOperation subclasses : [Attachment 239845] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 15 07:38:14 PDT 2014


Mihnea Ovidenie <mihnea at adobe.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 137733: Use is<>() / downcast<>() for ClipPathOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137733

Attachment 239845: Patch
https://bugs.webkit.org/attachment.cgi?id=239845&action=review

------- Additional Comments from Mihnea Ovidenie <mihnea at adobe.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=239845&action=review


r=me with some comments.

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2856
> +		   ReferenceClipPathOperation& referenceOperation =
downcast<ReferenceClipPathOperation>(*operation);

I guess you can use const auto& referenceOperation instead.

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2861
> +		   ShapeClipPathOperation& shapeOperation =
downcast<ShapeClipPathOperation>(*operation);

ShapeClipPathOperation& shapeOperation -> const auto& shapeOperation

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2867
> +		   BoxClipPathOperation& boxOperation =
downcast<BoxClipPathOperation>(*operation);

BoxClipPathOperation& boxOperation -> const auto& boxOperation

> Source/WebCore/rendering/RenderBlock.cpp:2456
> +	       ShapeClipPathOperation& clipPath =
downcast<ShapeClipPathOperation>(*style().clipPath());

ShapeClipPathOperation& clipPath -> const auto& clipPath

> Source/WebCore/rendering/RenderLayer.cpp:3929
> +	   ShapeClipPathOperation& clippingPath =
downcast<ShapeClipPathOperation>(*style.clipPath());

ShapeClipPathOperation& clippingPath -> const auto& clipPath. I noticed that in
general we use clipPath and I think we should use clipPath here too (and for
the same reason below).

> Source/WebCore/rendering/RenderLayer.cpp:3938
> +	   BoxClipPathOperation& clippingPath =
downcast<BoxClipPathOperation>(*style.clipPath());

BoxClipPathOperation& clippingPath -> const auto& clipPath

> Source/WebCore/rendering/svg/SVGRenderingContext.cpp:140
> +	   ShapeClipPathOperation& clipPath =
downcast<ShapeClipPathOperation>(*clipPathOperation);

ShapeClipPathOperation& clipPath -> const auto& clipPath


More information about the webkit-reviews mailing list