RESOLVED FIXED 137733
Use is<>() / downcast<>() for ClipPathOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137733
Summary Use is<>() / downcast<>() for ClipPathOperation subclasses
Chris Dumez
Reported 2014-10-14 20:26:53 PDT
Use is<>() / downcast<>() for ClipPathOperation subclasses
Attachments
Patch (9.88 KB, patch)
2014-10-14 20:35 PDT, Chris Dumez
no flags
Patch (10.15 KB, patch)
2014-10-15 09:29 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2014-10-14 20:35:19 PDT
Mihnea Ovidenie
Comment 2 2014-10-15 07:38:10 PDT
Comment on attachment 239845 [details] Patch 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
Chris Dumez
Comment 3 2014-10-15 09:29:54 PDT
WebKit Commit Bot
Comment 4 2014-10-15 10:13:49 PDT
Comment on attachment 239874 [details] Patch Clearing flags on attachment: 239874 Committed r174729: <http://trac.webkit.org/changeset/174729>
WebKit Commit Bot
Comment 5 2014-10-15 10:13:57 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.