| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/graphics/paint/GeometryMapper.h" | 5 #include "platform/graphics/paint/GeometryMapper.h" |
| 6 | 6 |
| 7 #include "platform/RuntimeEnabledFeatures.h" | 7 #include "platform/RuntimeEnabledFeatures.h" |
| 8 #include "platform/geometry/LayoutRect.h" | 8 #include "platform/geometry/LayoutRect.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 bool found = false; | 179 bool found = false; |
| 180 // Iterate over the path from localState.clip to ancestorState.clip. Stop if | 180 // Iterate over the path from localState.clip to ancestorState.clip. Stop if |
| 181 // we've found a memoized (precomputed) clip for any particular node. | 181 // we've found a memoized (precomputed) clip for any particular node. |
| 182 while (clipNode) { | 182 while (clipNode) { |
| 183 auto it = precomputedData.toAncestorClipRects.find(clipNode); | 183 auto it = precomputedData.toAncestorClipRects.find(clipNode); |
| 184 if (it != precomputedData.toAncestorClipRects.end()) { | 184 if (it != precomputedData.toAncestorClipRects.end()) { |
| 185 clip = it->value; | 185 clip = it->value; |
| 186 found = true; | 186 found = true; |
| 187 break; | 187 break; |
| 188 } | 188 } |
| 189 intermediateNodes.append(clipNode); | 189 intermediateNodes.push_back(clipNode); |
| 190 | 190 |
| 191 if (clipNode == ancestorState.clip()) | 191 if (clipNode == ancestorState.clip()) |
| 192 break; | 192 break; |
| 193 | 193 |
| 194 clipNode = clipNode->parent(); | 194 clipNode = clipNode->parent(); |
| 195 } | 195 } |
| 196 if (clipNode != ancestorState.clip() && !found) { | 196 if (clipNode != ancestorState.clip() && !found) { |
| 197 success = false; | 197 success = false; |
| 198 return clip; | 198 return clip; |
| 199 } | 199 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // Stop if we've found a memoized (precomputed) transform for any particular | 235 // Stop if we've found a memoized (precomputed) transform for any particular |
| 236 // node. | 236 // node. |
| 237 while (transformNode) { | 237 while (transformNode) { |
| 238 auto it = precomputedData.toAncestorTransforms.find(transformNode); | 238 auto it = precomputedData.toAncestorTransforms.find(transformNode); |
| 239 if (it != precomputedData.toAncestorTransforms.end()) { | 239 if (it != precomputedData.toAncestorTransforms.end()) { |
| 240 transformMatrix = it->value; | 240 transformMatrix = it->value; |
| 241 found = true; | 241 found = true; |
| 242 break; | 242 break; |
| 243 } | 243 } |
| 244 | 244 |
| 245 intermediateNodes.append(transformNode); | 245 intermediateNodes.push_back(transformNode); |
| 246 | 246 |
| 247 if (transformNode == ancestorState.transform()) | 247 if (transformNode == ancestorState.transform()) |
| 248 break; | 248 break; |
| 249 | 249 |
| 250 transformNode = transformNode->parent(); | 250 transformNode = transformNode->parent(); |
| 251 } | 251 } |
| 252 if (!found && transformNode != ancestorState.transform()) { | 252 if (!found && transformNode != ancestorState.transform()) { |
| 253 success = false; | 253 success = false; |
| 254 return m_identity; | 254 return m_identity; |
| 255 } | 255 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 // Walk up until we find the ancestor. | 305 // Walk up until we find the ancestor. |
| 306 while (a != b) { | 306 while (a != b) { |
| 307 a = a->parent(); | 307 a = a->parent(); |
| 308 b = b->parent(); | 308 b = b->parent(); |
| 309 } | 309 } |
| 310 return a; | 310 return a; |
| 311 } | 311 } |
| 312 | 312 |
| 313 } // namespace blink | 313 } // namespace blink |
| OLD | NEW |