| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 ancestorState, success); | 80 ancestorState, success); |
| 81 DCHECK(success); | 81 DCHECK(success); |
| 82 return result; | 82 return result; |
| 83 } | 83 } |
| 84 | 84 |
| 85 FloatRect GeometryMapper::localToAncestorVisualRectInternal( | 85 FloatRect GeometryMapper::localToAncestorVisualRectInternal( |
| 86 const FloatRect& rect, | 86 const FloatRect& rect, |
| 87 const PropertyTreeState& localState, | 87 const PropertyTreeState& localState, |
| 88 const PropertyTreeState& ancestorState, | 88 const PropertyTreeState& ancestorState, |
| 89 bool& success) { | 89 bool& success) { |
| 90 // TODO(wkorman): Consider using PropertyTreeState::equivalentGeometry() so as |
| 91 // to ignore scroll node diff for comparison purposes. |
| 90 if (localState == ancestorState) { | 92 if (localState == ancestorState) { |
| 91 success = true; | 93 success = true; |
| 92 return rect; | 94 return rect; |
| 93 } | 95 } |
| 94 | 96 |
| 95 const auto& transformMatrix = localToAncestorMatrixInternal( | 97 const auto& transformMatrix = localToAncestorMatrixInternal( |
| 96 localState.transform(), ancestorState.transform(), success); | 98 localState.transform(), ancestorState.transform(), success); |
| 97 if (!success) | 99 if (!success) |
| 98 return rect; | 100 return rect; |
| 99 | 101 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 const TransformPaintPropertyNode*, | 336 const TransformPaintPropertyNode*, |
| 335 const TransformPaintPropertyNode*); | 337 const TransformPaintPropertyNode*); |
| 336 template const ClipPaintPropertyNode* GeometryMapper::lowestCommonAncestor( | 338 template const ClipPaintPropertyNode* GeometryMapper::lowestCommonAncestor( |
| 337 const ClipPaintPropertyNode*, | 339 const ClipPaintPropertyNode*, |
| 338 const ClipPaintPropertyNode*); | 340 const ClipPaintPropertyNode*); |
| 339 template const ScrollPaintPropertyNode* GeometryMapper::lowestCommonAncestor( | 341 template const ScrollPaintPropertyNode* GeometryMapper::lowestCommonAncestor( |
| 340 const ScrollPaintPropertyNode*, | 342 const ScrollPaintPropertyNode*, |
| 341 const ScrollPaintPropertyNode*); | 343 const ScrollPaintPropertyNode*); |
| 342 | 344 |
| 343 } // namespace blink | 345 } // namespace blink |
| OLD | NEW |