| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/layout/LayoutTestHelper.h" | 5 #include "core/layout/LayoutTestHelper.h" |
| 6 #include "core/layout/LayoutView.h" | 6 #include "core/layout/LayoutView.h" |
| 7 #include "core/layout/PaintInvalidationState.h" | 7 #include "core/layout/PaintInvalidationState.h" |
| 8 #include "core/paint/PaintLayer.h" | 8 #include "core/paint/PaintLayer.h" |
| 9 #include "core/paint/PaintPropertyTreePrinter.h" | 9 #include "core/paint/PaintPropertyTreePrinter.h" |
| 10 #include "platform/graphics/paint/GeometryMapper.h" | 10 #include "platform/graphics/paint/GeometryMapper.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 bool adjust_for_backing = false) { | 38 bool adjust_for_backing = false) { |
| 39 LayoutRect slow_map_rect = local_rect; | 39 LayoutRect slow_map_rect = local_rect; |
| 40 object.MapToVisualRectInAncestorSpace(&ancestor, slow_map_rect); | 40 object.MapToVisualRectInAncestorSpace(&ancestor, slow_map_rect); |
| 41 if (slow_map_rect.IsEmpty() && object.VisualRect().IsEmpty()) | 41 if (slow_map_rect.IsEmpty() && object.VisualRect().IsEmpty()) |
| 42 return; | 42 return; |
| 43 | 43 |
| 44 FloatClipRect geometry_mapper_rect((FloatRect(local_rect))); | 44 FloatClipRect geometry_mapper_rect((FloatRect(local_rect))); |
| 45 if (object.PaintProperties() || object.LocalBorderBoxProperties()) { | 45 if (object.PaintProperties() || object.LocalBorderBoxProperties()) { |
| 46 geometry_mapper_rect.MoveBy(FloatPoint(object.PaintOffset())); | 46 geometry_mapper_rect.MoveBy(FloatPoint(object.PaintOffset())); |
| 47 GeometryMapper::SourceToDestinationVisualRect( | 47 GeometryMapper::SourceToDestinationVisualRect( |
| 48 *object.LocalBorderBoxProperties(), *ancestor.ContentsProperties(), | 48 *object.LocalBorderBoxProperties(), ancestor.ContentsProperties(), |
| 49 geometry_mapper_rect); | 49 geometry_mapper_rect); |
| 50 geometry_mapper_rect.MoveBy(-FloatPoint(ancestor.PaintOffset())); | 50 geometry_mapper_rect.MoveBy(-FloatPoint(ancestor.PaintOffset())); |
| 51 } | 51 } |
| 52 | 52 |
| 53 // The following condition can be false if paintInvalidationContainer is | 53 // The following condition can be false if paintInvalidationContainer is |
| 54 // a LayoutView and compositing is not enabled. | 54 // a LayoutView and compositing is not enabled. |
| 55 if (adjust_for_backing && ancestor.IsPaintInvalidationContainer()) { | 55 if (adjust_for_backing && ancestor.IsPaintInvalidationContainer()) { |
| 56 PaintLayer::MapRectInPaintInvalidationContainerToBacking(ancestor, | 56 PaintLayer::MapRectInPaintInvalidationContainerToBacking(ancestor, |
| 57 slow_map_rect); | 57 slow_map_rect); |
| 58 LayoutRect temp(geometry_mapper_rect.Rect()); | 58 LayoutRect temp(geometry_mapper_rect.Rect()); |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 // getTransformfromContainter includes transform and perspective matrix | 829 // getTransformfromContainter includes transform and perspective matrix |
| 830 // of the container. | 830 // of the container. |
| 831 target->GetTransformFromContainer(container, LayoutSize(), target_matrix); | 831 target->GetTransformFromContainer(container, LayoutSize(), target_matrix); |
| 832 matrix *= target_matrix; | 832 matrix *= target_matrix; |
| 833 LayoutRect output(matrix.MapRect(FloatRect(original_rect))); | 833 LayoutRect output(matrix.MapRect(FloatRect(original_rect))); |
| 834 | 834 |
| 835 CheckVisualRect(*target, *target->View(), original_rect, output); | 835 CheckVisualRect(*target, *target->View(), original_rect, output); |
| 836 } | 836 } |
| 837 | 837 |
| 838 } // namespace blink | 838 } // namespace blink |
| OLD | NEW |