OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 { | 102 { |
103 applyTransform(transformFromContainer.toTransformationMatrix(), accumulate,
wasClamped); | 103 applyTransform(transformFromContainer.toTransformationMatrix(), accumulate,
wasClamped); |
104 } | 104 } |
105 | 105 |
106 void TransformState::applyTransform(const TransformationMatrix& transformFromCon
tainer, TransformAccumulation accumulate, bool* wasClamped) | 106 void TransformState::applyTransform(const TransformationMatrix& transformFromCon
tainer, TransformAccumulation accumulate, bool* wasClamped) |
107 { | 107 { |
108 if (wasClamped) | 108 if (wasClamped) |
109 *wasClamped = false; | 109 *wasClamped = false; |
110 | 110 |
111 if (transformFromContainer.isIntegerTranslation()) { | 111 if (transformFromContainer.isIntegerTranslation()) { |
112 move(LayoutSize(transformFromContainer.e(), transformFromContainer.f()),
accumulate); | 112 move(LayoutSize(LayoutUnit(transformFromContainer.e()), LayoutUnit(trans
formFromContainer.f())), accumulate); |
113 return; | 113 return; |
114 } | 114 } |
115 | 115 |
116 applyAccumulatedOffset(); | 116 applyAccumulatedOffset(); |
117 | 117 |
118 // If we have an accumulated transform from last time, multiply in this tran
sform | 118 // If we have an accumulated transform from last time, multiply in this tran
sform |
119 if (m_accumulatedTransform) { | 119 if (m_accumulatedTransform) { |
120 if (m_direction == ApplyTransformDirection) | 120 if (m_direction == ApplyTransformDirection) |
121 m_accumulatedTransform = TransformationMatrix::create(transformFromC
ontainer * *m_accumulatedTransform); | 121 m_accumulatedTransform = TransformationMatrix::create(transformFromC
ontainer * *m_accumulatedTransform); |
122 else | 122 else |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 // We could throw away m_accumulatedTransform if we wanted to here, but that | 198 // We could throw away m_accumulatedTransform if we wanted to here, but that |
199 // would cause thrash when traversing hierarchies with alternating | 199 // would cause thrash when traversing hierarchies with alternating |
200 // preserve-3d and flat elements. | 200 // preserve-3d and flat elements. |
201 if (m_accumulatedTransform) | 201 if (m_accumulatedTransform) |
202 m_accumulatedTransform->makeIdentity(); | 202 m_accumulatedTransform->makeIdentity(); |
203 m_accumulatingTransform = false; | 203 m_accumulatingTransform = false; |
204 } | 204 } |
205 | 205 |
206 } // namespace blink | 206 } // namespace blink |
OLD | NEW |