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 15 matching lines...) Expand all Loading... |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/platform/graphics/transforms/PerspectiveTransformOperation.h" | 27 #include "core/platform/graphics/transforms/PerspectiveTransformOperation.h" |
28 | 28 |
29 #include "core/platform/animation/AnimationUtilities.h" | 29 #include "core/platform/animation/AnimationUtilities.h" |
30 #include "wtf/MathExtras.h" | 30 #include "wtf/MathExtras.h" |
31 | 31 |
32 using namespace std; | 32 using namespace std; |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 PassRefPtr<TransformOperation> PerspectiveTransformOperation::blend(const Transf
ormOperation* from, double progress, bool blendToIdentity) | 36 PassRefPtr<TransformOperation> PerspectiveTransformOperation::blend(const Transf
ormOperation* from, double progress, bool blendToIdentity, RenderView* renderVie
w) |
37 { | 37 { |
38 if (from && !from->isSameType(*this)) | 38 if (from && !from->isSameType(*this)) |
39 return this; | 39 return this; |
40 | 40 |
41 if (blendToIdentity) { | 41 if (blendToIdentity) { |
42 double p = floatValueForLength(m_p, 1); | 42 double p = floatValueForLength(m_p, 1); |
43 p = WebCore::blend(p, 1.0, progress); // FIXME: this seems wrong. https:
//bugs.webkit.org/show_bug.cgi?id=52700 | 43 p = WebCore::blend(p, 1.0, progress); // FIXME: this seems wrong. https:
//bugs.webkit.org/show_bug.cgi?id=52700 |
44 return PerspectiveTransformOperation::create(Length(clampToPositiveInteg
er(p), Fixed)); | 44 return PerspectiveTransformOperation::create(Length(clampToPositiveInteg
er(p), Fixed)); |
45 } | 45 } |
46 | 46 |
(...skipping 10 matching lines...) Expand all Loading... |
57 toT.decompose(decomp); | 57 toT.decompose(decomp); |
58 | 58 |
59 if (decomp.perspectiveZ) { | 59 if (decomp.perspectiveZ) { |
60 double val = -1.0 / decomp.perspectiveZ; | 60 double val = -1.0 / decomp.perspectiveZ; |
61 return PerspectiveTransformOperation::create(Length(clampToPositiveInteg
er(val), Fixed)); | 61 return PerspectiveTransformOperation::create(Length(clampToPositiveInteg
er(val), Fixed)); |
62 } | 62 } |
63 return PerspectiveTransformOperation::create(Length(0, Fixed)); | 63 return PerspectiveTransformOperation::create(Length(0, Fixed)); |
64 } | 64 } |
65 | 65 |
66 } // namespace WebCore | 66 } // namespace WebCore |
OLD | NEW |