Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp

Issue 2623823002: Rename and change parameter type of some GeometryMapper methods (Closed)
Patch Set: Swap local and ancestor parameters in ancestorToLocalRect(). Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/paint/PaintPropertyTreeBuilderTest.h" 5 #include "core/paint/PaintPropertyTreeBuilderTest.h"
6 6
7 #include "core/html/HTMLIFrameElement.h" 7 #include "core/html/HTMLIFrameElement.h"
8 #include "core/layout/LayoutTreeAsText.h" 8 #include "core/layout/LayoutTreeAsText.h"
9 #include "core/paint/ObjectPaintProperties.h" 9 #include "core/paint/ObjectPaintProperties.h"
10 #include "core/paint/PaintPropertyTreePrinter.h" 10 #include "core/paint/PaintPropertyTreePrinter.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #define CHECK_VISUAL_RECT(expected, sourceLayoutObject, ancestorLayoutObject, \ 73 #define CHECK_VISUAL_RECT(expected, sourceLayoutObject, ancestorLayoutObject, \
74 slopFactor) \ 74 slopFactor) \
75 do { \ 75 do { \
76 GeometryMapper geometryMapper; \ 76 GeometryMapper geometryMapper; \
77 LayoutRect source((sourceLayoutObject)->localVisualRect()); \ 77 LayoutRect source((sourceLayoutObject)->localVisualRect()); \
78 source.moveBy((sourceLayoutObject)->paintOffset()); \ 78 source.moveBy((sourceLayoutObject)->paintOffset()); \
79 bool success = false; \ 79 bool success = false; \
80 auto contentsProperties = \ 80 auto contentsProperties = \
81 (ancestorLayoutObject)->paintProperties()->contentsProperties(); \ 81 (ancestorLayoutObject)->paintProperties()->contentsProperties(); \
82 LayoutRect actual = \ 82 LayoutRect actual = \
83 LayoutRect(geometryMapper.mapToVisualRectInDestinationSpace( \ 83 LayoutRect(geometryMapper.sourceToDestinationVisualRect( \
84 FloatRect(source), *(sourceLayoutObject) \ 84 FloatRect(source), *(sourceLayoutObject) \
85 ->paintProperties() \ 85 ->paintProperties() \
86 ->localBorderBoxProperties(), \ 86 ->localBorderBoxProperties(), \
87 contentsProperties, success)); \ 87 contentsProperties, success)); \
88 ASSERT_TRUE(success); \ 88 ASSERT_TRUE(success); \
89 actual.moveBy(-(ancestorLayoutObject)->paintOffset()); \ 89 actual.moveBy(-(ancestorLayoutObject)->paintOffset()); \
90 EXPECT_EQ(expected, actual) \ 90 EXPECT_EQ(expected, actual) \
91 << "GeometryMapper: expected: " << expected.toString() \ 91 << "GeometryMapper: expected: " << expected.toString() \
92 << ", actual: " << actual.toString(); \ 92 << ", actual: " << actual.toString(); \
93 \ 93 \
(...skipping 3048 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 3142
3143 LayoutObject* target = getLayoutObjectByElementId("target"); 3143 LayoutObject* target = getLayoutObjectByElementId("target");
3144 const auto* localBorderBoxProperties = 3144 const auto* localBorderBoxProperties =
3145 target->paintProperties()->localBorderBoxProperties(); 3145 target->paintProperties()->localBorderBoxProperties();
3146 ASSERT_TRUE(localBorderBoxProperties); 3146 ASSERT_TRUE(localBorderBoxProperties);
3147 EXPECT_EQ(LayoutPoint(66, 55), target->paintOffset()); 3147 EXPECT_EQ(LayoutPoint(66, 55), target->paintOffset());
3148 EXPECT_EQ(effect, localBorderBoxProperties->effect()); 3148 EXPECT_EQ(effect, localBorderBoxProperties->effect());
3149 } 3149 }
3150 3150
3151 } // namespace blink 3151 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698