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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 accumulated_transform_ ? accumulated_transform_.get() | 149 accumulated_transform_ ? accumulated_transform_.get() |
150 : &transform_from_container; | 150 : &transform_from_container; |
151 FlattenWithTransform(*final_transform, was_clamped); | 151 FlattenWithTransform(*final_transform, was_clamped); |
152 } | 152 } |
153 } | 153 } |
154 accumulating_transform_ = | 154 accumulating_transform_ = |
155 accumulate == kAccumulateTransform || force_accumulating_transform_; | 155 accumulate == kAccumulateTransform || force_accumulating_transform_; |
156 } | 156 } |
157 | 157 |
158 void TransformState::Flatten(bool* was_clamped) { | 158 void TransformState::Flatten(bool* was_clamped) { |
159 ASSERT(!force_accumulating_transform_); | 159 DCHECK(!force_accumulating_transform_); |
160 if (was_clamped) | 160 if (was_clamped) |
161 *was_clamped = false; | 161 *was_clamped = false; |
162 | 162 |
163 ApplyAccumulatedOffset(); | 163 ApplyAccumulatedOffset(); |
164 | 164 |
165 if (!accumulated_transform_) { | 165 if (!accumulated_transform_) { |
166 accumulating_transform_ = false; | 166 accumulating_transform_ = false; |
167 return; | 167 return; |
168 } | 168 } |
169 | 169 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 226 |
227 // We could throw away m_accumulatedTransform if we wanted to here, but that | 227 // We could throw away m_accumulatedTransform if we wanted to here, but that |
228 // would cause thrash when traversing hierarchies with alternating | 228 // would cause thrash when traversing hierarchies with alternating |
229 // preserve-3d and flat elements. | 229 // preserve-3d and flat elements. |
230 if (accumulated_transform_) | 230 if (accumulated_transform_) |
231 accumulated_transform_->MakeIdentity(); | 231 accumulated_transform_->MakeIdentity(); |
232 accumulating_transform_ = false; | 232 accumulating_transform_ = false; |
233 } | 233 } |
234 | 234 |
235 } // namespace blink | 235 } // namespace blink |
OLD | NEW |