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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 virtual bool isSameType(const TransformOperation& o) const { return o.getOpe
rationType() == Perspective; } | 47 virtual bool isSameType(const TransformOperation& o) const { return o.getOpe
rationType() == Perspective; } |
48 | 48 |
49 virtual bool operator==(const TransformOperation& o) const | 49 virtual bool operator==(const TransformOperation& o) const |
50 { | 50 { |
51 if (!isSameType(o)) | 51 if (!isSameType(o)) |
52 return false; | 52 return false; |
53 const PerspectiveTransformOperation* p = static_cast<const PerspectiveTr
ansformOperation*>(&o); | 53 const PerspectiveTransformOperation* p = static_cast<const PerspectiveTr
ansformOperation*>(&o); |
54 return m_p == p->m_p; | 54 return m_p == p->m_p; |
55 } | 55 } |
56 | 56 |
57 virtual bool apply(TransformationMatrix& transform, const FloatSize&) const | 57 virtual bool apply(TransformationMatrix& transform, const FloatSize&, Render
View*renderView) const |
58 { | 58 { |
59 transform.applyPerspective(floatValueForLength(m_p, 1)); | 59 transform.applyPerspective(floatValueForLength(m_p, 1, renderView)); |
60 return false; | 60 return false; |
61 } | 61 } |
62 | 62 |
63 virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from,
double progress, bool blendToIdentity = false); | 63 virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from,
double progress, bool blendToIdentity = false, RenderView* =0); |
64 | 64 |
65 PerspectiveTransformOperation(const Length& p) | 65 PerspectiveTransformOperation(const Length& p) |
66 : m_p(p) | 66 : m_p(p) |
67 { | 67 { |
68 ASSERT(p.isFixed()); | 68 ASSERT(p.isFixed()); |
69 } | 69 } |
70 | 70 |
71 Length m_p; | 71 Length m_p; |
72 }; | 72 }; |
73 | 73 |
74 } // namespace WebCore | 74 } // namespace WebCore |
75 | 75 |
76 #endif // PerspectiveTransformOperation_h | 76 #endif // PerspectiveTransformOperation_h |
OLD | NEW |