| 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/geometry/GeometryTestHelpers.h" | 7 #include "platform/geometry/GeometryTestHelpers.h" |
| 8 #include "platform/geometry/LayoutRect.h" | 8 #include "platform/geometry/LayoutRect.h" |
| 9 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 9 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
| 10 #include "platform/graphics/paint/EffectPaintPropertyNode.h" | 10 #include "platform/graphics/paint/EffectPaintPropertyNode.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 expectedTransformToAncestor, \ | 70 expectedTransformToAncestor, \ |
| 71 expectedClipInAncestorSpace, localPropertyTreeState, \ | 71 expectedClipInAncestorSpace, localPropertyTreeState, \ |
| 72 ancestorPropertyTreeState) \ | 72 ancestorPropertyTreeState) \ |
| 73 do { \ | 73 do { \ |
| 74 bool success = false; \ | 74 bool success = false; \ |
| 75 EXPECT_RECT_EQ(expectedVisualRect, \ | 75 EXPECT_RECT_EQ(expectedVisualRect, \ |
| 76 geometryMapper->localToVisualRectInAncestorSpace( \ | 76 geometryMapper->localToVisualRectInAncestorSpace( \ |
| 77 inputRect, localPropertyTreeState, \ | 77 inputRect, localPropertyTreeState, \ |
| 78 ancestorPropertyTreeState, success)); \ | 78 ancestorPropertyTreeState, success)); \ |
| 79 EXPECT_TRUE(success); \ | 79 EXPECT_TRUE(success); \ |
| 80 FloatRect mappedClip = geometryMapper->localToAncestorClipRect( \ |
| 81 localPropertyTreeState, ancestorPropertyTreeState, success); \ |
| 82 EXPECT_TRUE(success); \ |
| 83 EXPECT_RECT_EQ(expectedClipInAncestorSpace, mappedClip); \ |
| 80 EXPECT_RECT_EQ(expectedVisualRect, \ | 84 EXPECT_RECT_EQ(expectedVisualRect, \ |
| 81 geometryMapper->mapToVisualRectInDestinationSpace( \ | 85 geometryMapper->mapToVisualRectInDestinationSpace( \ |
| 82 inputRect, localPropertyTreeState, \ | 86 inputRect, localPropertyTreeState, \ |
| 83 ancestorPropertyTreeState, success)); \ | 87 ancestorPropertyTreeState, success)); \ |
| 84 EXPECT_TRUE(success); \ | 88 EXPECT_TRUE(success); \ |
| 85 EXPECT_RECT_EQ(expectedTransformedRect, \ | 89 EXPECT_RECT_EQ(expectedTransformedRect, \ |
| 86 geometryMapper->localToAncestorRect( \ | 90 geometryMapper->localToAncestorRect( \ |
| 87 inputRect, localPropertyTreeState, \ | 91 inputRect, localPropertyTreeState, \ |
| 88 ancestorPropertyTreeState, success)); \ | 92 ancestorPropertyTreeState, success)); \ |
| 89 EXPECT_RECT_EQ(expectedTransformedRect, \ | 93 EXPECT_RECT_EQ(expectedTransformedRect, \ |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 EXPECT_EQ(rootPropertyTreeState().transform(), | 576 EXPECT_EQ(rootPropertyTreeState().transform(), |
| 573 leastCommonAncestor(childOfChild2.get(), | 577 leastCommonAncestor(childOfChild2.get(), |
| 574 rootPropertyTreeState().transform())); | 578 rootPropertyTreeState().transform())); |
| 575 EXPECT_EQ(child2, leastCommonAncestor(childOfChild2.get(), child2.get())); | 579 EXPECT_EQ(child2, leastCommonAncestor(childOfChild2.get(), child2.get())); |
| 576 | 580 |
| 577 EXPECT_EQ(rootPropertyTreeState().transform(), | 581 EXPECT_EQ(rootPropertyTreeState().transform(), |
| 578 leastCommonAncestor(child1.get(), child2.get())); | 582 leastCommonAncestor(child1.get(), child2.get())); |
| 579 } | 583 } |
| 580 | 584 |
| 581 } // namespace blink | 585 } // namespace blink |
| OLD | NEW |