| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 PassRefPtr<TransformOperation> PerspectiveTransformOperation::blend( | 33 PassRefPtr<TransformOperation> PerspectiveTransformOperation::blend( |
| 34 const TransformOperation* from, | 34 const TransformOperation* from, |
| 35 double progress, | 35 double progress, |
| 36 bool blendToIdentity) { | 36 bool blendToIdentity) { |
| 37 if (from && !from->isSameType(*this)) | 37 if (from && !from->isSameType(*this)) |
| 38 return this; | 38 return this; |
| 39 | 39 |
| 40 if (blendToIdentity) { | 40 if (blendToIdentity) { |
| 41 double p = blink::blend( | 41 // FIXME: this seems wrong. https://bugs.webkit.org/show_bug.cgi?id=52700 |
| 42 m_p, 1., | 42 double p = blink::blend(m_p, 1., progress); |
| 43 progress); // FIXME: this seems wrong. https://bugs.webkit.org/show_bug
.cgi?id=52700 | |
| 44 return PerspectiveTransformOperation::create(clampTo<int>(p, 0)); | 43 return PerspectiveTransformOperation::create(clampTo<int>(p, 0)); |
| 45 } | 44 } |
| 46 | 45 |
| 47 const PerspectiveTransformOperation* fromOp = | 46 const PerspectiveTransformOperation* fromOp = |
| 48 static_cast<const PerspectiveTransformOperation*>(from); | 47 static_cast<const PerspectiveTransformOperation*>(from); |
| 49 | 48 |
| 50 TransformationMatrix fromT; | 49 TransformationMatrix fromT; |
| 51 TransformationMatrix toT; | 50 TransformationMatrix toT; |
| 52 fromT.applyPerspective(fromOp ? fromOp->m_p : 0); | 51 fromT.applyPerspective(fromOp ? fromOp->m_p : 0); |
| 53 toT.applyPerspective(m_p); | 52 toT.applyPerspective(m_p); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 67 } | 66 } |
| 68 return PerspectiveTransformOperation::create(0); | 67 return PerspectiveTransformOperation::create(0); |
| 69 } | 68 } |
| 70 | 69 |
| 71 PassRefPtr<TransformOperation> PerspectiveTransformOperation::zoom( | 70 PassRefPtr<TransformOperation> PerspectiveTransformOperation::zoom( |
| 72 double factor) { | 71 double factor) { |
| 73 return create(m_p * factor); | 72 return create(m_p * factor); |
| 74 } | 73 } |
| 75 | 74 |
| 76 } // namespace blink | 75 } // namespace blink |
| OLD | NEW |