| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 double progress, | 58 double progress, |
| 59 bool blendToIdentity = false) override; | 59 bool blendToIdentity = false) override; |
| 60 | 60 |
| 61 static bool isMatchingOperationType(OperationType type) { | 61 static bool isMatchingOperationType(OperationType type) { |
| 62 return type == Scale || type == ScaleX || type == ScaleY || | 62 return type == Scale || type == ScaleX || type == ScaleY || |
| 63 type == ScaleZ || type == Scale3D; | 63 type == ScaleZ || type == Scale3D; |
| 64 } | 64 } |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 OperationType type() const override { return m_type; } | 67 OperationType type() const override { return m_type; } |
| 68 OperationType primitiveType() const final { return Scale3D; } |
| 68 | 69 |
| 69 bool operator==(const TransformOperation& o) const override { | 70 bool operator==(const TransformOperation& o) const override { |
| 70 if (!isSameType(o)) | 71 if (!isSameType(o)) |
| 71 return false; | 72 return false; |
| 72 const ScaleTransformOperation* s = | 73 const ScaleTransformOperation* s = |
| 73 static_cast<const ScaleTransformOperation*>(&o); | 74 static_cast<const ScaleTransformOperation*>(&o); |
| 74 return m_x == s->m_x && m_y == s->m_y && m_z == s->m_z; | 75 return m_x == s->m_x && m_y == s->m_y && m_z == s->m_z; |
| 75 } | 76 } |
| 76 | 77 |
| 77 PassRefPtr<TransformOperation> zoom(double factor) final { return this; } | 78 PassRefPtr<TransformOperation> zoom(double factor) final { return this; } |
| 78 | 79 |
| 79 ScaleTransformOperation(double sx, double sy, double sz, OperationType type) | 80 ScaleTransformOperation(double sx, double sy, double sz, OperationType type) |
| 80 : m_x(sx), m_y(sy), m_z(sz), m_type(type) { | 81 : m_x(sx), m_y(sy), m_z(sz), m_type(type) { |
| 81 ASSERT(isMatchingOperationType(type)); | 82 ASSERT(isMatchingOperationType(type)); |
| 82 } | 83 } |
| 83 | 84 |
| 84 double m_x; | 85 double m_x; |
| 85 double m_y; | 86 double m_y; |
| 86 double m_z; | 87 double m_z; |
| 87 OperationType m_type; | 88 OperationType m_type; |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 DEFINE_TRANSFORM_TYPE_CASTS(ScaleTransformOperation); | 91 DEFINE_TRANSFORM_TYPE_CASTS(ScaleTransformOperation); |
| 91 | 92 |
| 92 } // namespace blink | 93 } // namespace blink |
| 93 | 94 |
| 94 #endif // ScaleTransformOperation_h | 95 #endif // ScaleTransformOperation_h |
| OLD | NEW |