RESOLVED FIXED 137731
Use is<>() / downcast<>() for TransformOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137731
Summary Use is<>() / downcast<>() for TransformOperation subclasses
Chris Dumez
Reported 2014-10-14 20:01:14 PDT
Use is<>() / downcast<>() for TransformOperation subclasses
Attachments
Patch (31.53 KB, patch)
2014-10-14 20:09 PDT, Chris Dumez
no flags
Patch (31.53 KB, patch)
2014-10-14 21:22 PDT, Chris Dumez
no flags
Patch (31.74 KB, patch)
2014-10-15 10:21 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2014-10-14 20:09:49 PDT
Chris Dumez
Comment 2 2014-10-14 21:22:17 PDT
Darin Adler
Comment 3 2014-10-15 09:21:35 PDT
Comment on attachment 239847 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=239847&action=review r=me as long as you fix the coordinated graphics build > Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp:37 > - if (!isSameType(o)) > + if (!isSameType(other)) > return false; > - const Matrix3DTransformOperation& m = toMatrix3DTransformOperation(o); > - return m_matrix == m.m_matrix; > + return m_matrix == downcast<Matrix3DTransformOperation>(other).m_matrix; Almost seems like we’d want to write this with && on a single line.a > Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:187 > - encoder << toScaleTransformOperation(operation)->x(); > - encoder << toScaleTransformOperation(operation)->y(); > - encoder << toScaleTransformOperation(operation)->z(); > + const auto& scaleOperation = downcast<ScaleTransformOperation>(*operation); > + encoder << scaleOperation.x(); > + encoder << scaleOperation.y(); > + encoder << scaleOperation.z(); > break; I wouldn’t expect this to compile unless you add braces to scope the local variable so that jumping to later cases doesn’t jump across it. I am guessing that’s why EFL failed to build. > Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:193 > + const auto& translateOperation = downcast<TranslateTransformOperation>(*operation); Ditto. > Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:202 > + const auto& rotateOperation = downcast<RotateTransformOperation>(*operation); Ditto. > Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:211 > + const auto& skewOperation = downcast<SkewTransformOperation>(*operation); Ditto.
Chris Dumez
Comment 4 2014-10-15 10:21:34 PDT
Chris Dumez
Comment 5 2014-10-15 11:38:09 PDT
Comment on attachment 239876 [details] Patch All green \o/
WebKit Commit Bot
Comment 6 2014-10-15 12:15:22 PDT
Comment on attachment 239876 [details] Patch Clearing flags on attachment: 239876 Committed r174739: <http://trac.webkit.org/changeset/174739>
WebKit Commit Bot
Comment 7 2014-10-15 12:15:30 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.