| Summary: | Use is<>() / downcast<>() for TransformOperation subclasses | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||
| Component: | Platform | Assignee: | Chris Dumez <cdumez> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | benjamin, cmarcelo, commit-queue, darin, kling, kondapallykalyan, luiz, noam, rniwa, ryuan.choi, sergio, simon.fraser, zeno | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Bug Depends on: | 137056 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Chris Dumez
2014-10-14 20:01:14 PDT
Created attachment 239842 [details]
Patch
Created attachment 239847 [details]
Patch
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. Created attachment 239876 [details]
Patch
Comment on attachment 239876 [details]
Patch
All green \o/
Comment on attachment 239876 [details] Patch Clearing flags on attachment: 239876 Committed r174739: <http://trac.webkit.org/changeset/174739> All reviewed patches have been landed. Closing bug. |