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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp

Issue 2604083002: Remove infinite clip in PaintArtifactCompositor. (Closed)
Patch Set: none 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698