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

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

Issue 2798513002: Revert of Make GeometryMapper fully static (Closed)
Patch Set: Created 3 years, 8 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 void PaintPropertyTreeBuilderTest::TearDown() { 72 void PaintPropertyTreeBuilderTest::TearDown() {
73 RenderingTest::TearDown(); 73 RenderingTest::TearDown();
74 74
75 Settings::setMockScrollbarsEnabled(false); 75 Settings::setMockScrollbarsEnabled(false);
76 } 76 }
77 77
78 #define CHECK_VISUAL_RECT(expected, sourceObject, ancestorObject, slopFactor) \ 78 #define CHECK_VISUAL_RECT(expected, sourceObject, ancestorObject, slopFactor) \
79 do { \ 79 do { \
80 if ((sourceObject)->hasLayer() && (ancestorObject)->hasLayer()) { \ 80 if ((sourceObject)->hasLayer() && (ancestorObject)->hasLayer()) { \
81 auto geometryMapper = GeometryMapper::create(); \
81 LayoutRect source((sourceObject)->localVisualRect()); \ 82 LayoutRect source((sourceObject)->localVisualRect()); \
82 source.moveBy((sourceObject)->paintOffset()); \ 83 source.moveBy((sourceObject)->paintOffset()); \
83 const auto& contentsProperties = \ 84 const auto& contentsProperties = \
84 *(ancestorObject)->contentsProperties(); \ 85 *(ancestorObject)->contentsProperties(); \
85 FloatRect actualFloatRect(source); \ 86 FloatRect actualFloatRect(source); \
86 GeometryMapper::sourceToDestinationVisualRect( \ 87 geometryMapper->sourceToDestinationVisualRect( \
87 *(sourceObject)->localBorderBoxProperties(), contentsProperties, \ 88 *(sourceObject)->localBorderBoxProperties(), contentsProperties, \
88 actualFloatRect); \ 89 actualFloatRect); \
89 LayoutRect actual(actualFloatRect); \ 90 LayoutRect actual(actualFloatRect); \
90 actual.moveBy(-(ancestorObject)->paintOffset()); \ 91 actual.moveBy(-(ancestorObject)->paintOffset()); \
91 SCOPED_TRACE("GeometryMapper: "); \ 92 SCOPED_TRACE("GeometryMapper: "); \
92 EXPECT_EQ(expected, actual); \ 93 EXPECT_EQ(expected, actual); \
93 } \ 94 } \
94 \ 95 \
95 if (slopFactor == LayoutUnit::max()) \ 96 if (slopFactor == LayoutUnit::max()) \
96 break; \ 97 break; \
(...skipping 3275 matching lines...) Expand 10 before | Expand all | Expand 10 after
3372 "</svg>"); 3373 "</svg>");
3373 3374
3374 LayoutObject& svgRoot = *document().getElementById("svgroot")->layoutObject(); 3375 LayoutObject& svgRoot = *document().getElementById("svgroot")->layoutObject();
3375 const ObjectPaintProperties* svgRootProperties = svgRoot.paintProperties(); 3376 const ObjectPaintProperties* svgRootProperties = svgRoot.paintProperties();
3376 EXPECT_TRUE(svgRootProperties->effect()); 3377 EXPECT_TRUE(svgRootProperties->effect());
3377 EXPECT_EQ(EffectPaintPropertyNode::root(), 3378 EXPECT_EQ(EffectPaintPropertyNode::root(),
3378 svgRootProperties->effect()->parent()); 3379 svgRootProperties->effect()->parent());
3379 } 3380 }
3380 3381
3381 } // namespace blink 3382 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698