| Index: third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
|
| index 2e1291a627aaa187c086ede12f6dbf1eaea58d9b..59f8a7917ffced5fe685b2c9f9093436f2dbb4b6 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
|
| @@ -108,7 +108,7 @@ const static float kTestEpsilon = 1e-6;
|
| #define CHECK_MAPPINGS(inputRect, expectedVisualRect, expectedTransformedRect, \
|
| expectedTransformToAncestor, \
|
| expectedClipInAncestorSpace, localPropertyTreeState, \
|
| - ancestorPropertyTreeState, hasRadius) \
|
| + ancestorPropertyTreeState) \
|
| do { \
|
| FloatClipRect floatRect(inputRect); \
|
| GeometryMapper::localToAncestorVisualRect( \
|
| @@ -118,7 +118,7 @@ const static float kTestEpsilon = 1e-6;
|
| FloatClipRect floatClipRect; \
|
| floatClipRect = GeometryMapper::localToAncestorClipRect( \
|
| localPropertyTreeState, ancestorPropertyTreeState); \
|
| - EXPECT_EQ(hasRadius, floatClipRect.hasRadius()); \
|
| + EXPECT_EQ(hasRadius, floatClipRect.HasRadius()); \
|
| EXPECT_CLIP_RECT_EQ(expectedClipInAncestorSpace, floatClipRect); \
|
| floatRect.setRect(inputRect); \
|
| GeometryMapper::sourceToDestinationVisualRect( \
|
| @@ -149,10 +149,10 @@ const static float kTestEpsilon = 1e-6;
|
| DCHECK(outputClipForTesting); \
|
| EXPECT_EQ(expectedClipInAncestorSpace, *outputClipForTesting) \
|
| << "expected: " << expectedClipInAncestorSpace.rect().toString() \
|
| - << " (hasRadius: " << expectedClipInAncestorSpace.hasRadius() \
|
| + << " (hasRadius: " << expectedClipInAncestorSpace.HasRadius() \
|
| << ") " \
|
| << "actual: " << outputClipForTesting->rect().toString() \
|
| - << " (hasRadius: " << outputClipForTesting->hasRadius() << ")"; \
|
| + << " (hasRadius: " << outputClipForTesting->HasRadius() << ")"; \
|
| } \
|
| } while (false)
|
|
|
| @@ -162,8 +162,7 @@ TEST_F(GeometryMapperTest, Root) {
|
| bool hasRadius = false;
|
| CHECK_MAPPINGS(input, input, input,
|
| TransformPaintPropertyNode::root()->matrix(), FloatClipRect(),
|
| - PropertyTreeState::root(), PropertyTreeState::root(),
|
| - hasRadius);
|
| + PropertyTreeState::root(), PropertyTreeState::root(), hasRadius);
|
| }
|
|
|
| TEST_F(GeometryMapperTest, IdentityTransform) {
|
| @@ -178,7 +177,7 @@ TEST_F(GeometryMapperTest, IdentityTransform) {
|
|
|
| bool hasRadius = false;
|
| CHECK_MAPPINGS(input, input, input, transform->matrix(), FloatClipRect(),
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
| }
|
|
|
| TEST_F(GeometryMapperTest, TranslationTransform) {
|
| @@ -195,7 +194,7 @@ TEST_F(GeometryMapperTest, TranslationTransform) {
|
|
|
| bool hasRadius = false;
|
| CHECK_MAPPINGS(input, output, output, transform->matrix(), FloatClipRect(),
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
|
|
| GeometryMapper::ancestorToLocalRect(TransformPaintPropertyNode::root(),
|
| localState.transform(), output);
|
| @@ -218,7 +217,7 @@ TEST_F(GeometryMapperTest, RotationAndScaleTransform) {
|
|
|
| bool hasRadius = false;
|
| CHECK_MAPPINGS(input, output, output, transformMatrix, FloatClipRect(),
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
| }
|
|
|
| TEST_F(GeometryMapperTest, RotationAndScaleTransformWithTransformOrigin) {
|
| @@ -238,7 +237,7 @@ TEST_F(GeometryMapperTest, RotationAndScaleTransformWithTransformOrigin) {
|
|
|
| bool hasRadius = false;
|
| CHECK_MAPPINGS(input, output, output, transformMatrix, FloatClipRect(),
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
| }
|
|
|
| TEST_F(GeometryMapperTest, NestedTransforms) {
|
| @@ -263,7 +262,7 @@ TEST_F(GeometryMapperTest, NestedTransforms) {
|
|
|
| bool hasRadius = false;
|
| CHECK_MAPPINGS(input, output, output, final, FloatClipRect(), localState,
|
| - PropertyTreeState::root(), hasRadius);
|
| + PropertyTreeState::root());
|
|
|
| // Check the cached matrix for the intermediate transform.
|
| EXPECT_EQ(rotateTransform, *getTransform(transform1.get(),
|
| @@ -293,7 +292,7 @@ TEST_F(GeometryMapperTest, NestedTransformsFlattening) {
|
| FloatRect output = final.mapRect(input);
|
| bool hasRadius = false;
|
| CHECK_MAPPINGS(input, output, output, final, FloatClipRect(), localState,
|
| - PropertyTreeState::root(), hasRadius);
|
| + PropertyTreeState::root());
|
| }
|
|
|
| TEST_F(GeometryMapperTest, NestedTransformsScaleAndTranslation) {
|
| @@ -320,7 +319,7 @@ TEST_F(GeometryMapperTest, NestedTransformsScaleAndTranslation) {
|
|
|
| bool hasRadius = false;
|
| CHECK_MAPPINGS(input, output, output, final, FloatClipRect(), localState,
|
| - PropertyTreeState::root(), hasRadius);
|
| + PropertyTreeState::root());
|
|
|
| // Check the cached matrix for the intermediate transform.
|
| EXPECT_EQ(scaleTransform, *getTransform(transform1.get(),
|
| @@ -351,7 +350,7 @@ TEST_F(GeometryMapperTest, NestedTransformsIntermediateDestination) {
|
|
|
| bool hasRadius = false;
|
| CHECK_MAPPINGS(input, output, output, scaleTransform, FloatClipRect(),
|
| - localState, intermediateState, hasRadius);
|
| + localState, intermediateState);
|
| }
|
|
|
| TEST_F(GeometryMapperTest, SimpleClip) {
|
| @@ -373,7 +372,7 @@ TEST_F(GeometryMapperTest, SimpleClip) {
|
| ->matrix(), // Transform matrix to ancestor space
|
| FloatClipRect(clip->clipRect().rect()), // Clip rect in
|
| // ancestor space
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
| }
|
|
|
| TEST_F(GeometryMapperTest, RoundedClip) {
|
| @@ -399,7 +398,7 @@ TEST_F(GeometryMapperTest, RoundedClip) {
|
| TransformPaintPropertyNode::root()
|
| ->matrix(), // Transform matrix to ancestor space
|
| expectedClip, // Clip rect in ancestor space
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
| }
|
|
|
| TEST_F(GeometryMapperTest, TwoClips) {
|
| @@ -434,7 +433,7 @@ TEST_F(GeometryMapperTest, TwoClips) {
|
| ->matrix(), // Transform matrix to ancestor space
|
| clipRect, // Clip rect in ancestor space
|
| localState,
|
| - ancestorState, hasRadius);
|
| + ancestorState);
|
|
|
| ancestorState.setClip(clip1.get());
|
| FloatRect output2(10, 10, 50, 50);
|
| @@ -449,7 +448,7 @@ TEST_F(GeometryMapperTest, TwoClips) {
|
| TransformPaintPropertyNode::root()
|
| ->matrix(), // Transform matrix to ancestor space
|
| clipRect2, // Clip rect in ancestor space
|
| - localState, ancestorState, hasRadius);
|
| + localState, ancestorState);
|
| }
|
|
|
| TEST_F(GeometryMapperTest, TwoClipsTransformAbove) {
|
| @@ -487,7 +486,7 @@ TEST_F(GeometryMapperTest, TwoClipsTransformAbove) {
|
| ->matrix(), // Transform matrix to ancestor space
|
| expectedClip, // Clip rect in ancestor space
|
| localState,
|
| - ancestorState, hasRadius);
|
| + ancestorState);
|
|
|
| expectedClip.setRect(clip1->clipRect().rect());
|
| localState.setClip(clip1.get());
|
| @@ -499,7 +498,7 @@ TEST_F(GeometryMapperTest, TwoClipsTransformAbove) {
|
| ->matrix(), // Transform matrix to ancestor space
|
| expectedClip, // Clip rect in ancestor space
|
| localState,
|
| - ancestorState, hasRadius);
|
| + ancestorState);
|
| }
|
|
|
| TEST_F(GeometryMapperTest, ClipBeforeTransform) {
|
| @@ -530,7 +529,7 @@ TEST_F(GeometryMapperTest, ClipBeforeTransform) {
|
| rotateTransform, // Transform matrix to ancestor space
|
| FloatClipRect(rotateTransform.mapRect(
|
| clip->clipRect().rect())), // Clip rect in ancestor space
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
| }
|
|
|
| TEST_F(GeometryMapperTest, ClipAfterTransform) {
|
| @@ -560,7 +559,7 @@ TEST_F(GeometryMapperTest, ClipAfterTransform) {
|
| rotateTransform.mapRect(input), // Transformed rect (not clipped)
|
| rotateTransform, // Transform matrix to ancestor space
|
| FloatClipRect(clip->clipRect().rect()), // Clip rect in ancestor space
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
| }
|
|
|
| TEST_F(GeometryMapperTest, TwoClipsWithTransformBetween) {
|
| @@ -595,7 +594,7 @@ TEST_F(GeometryMapperTest, TwoClipsWithTransformBetween) {
|
| rotateTransform.mapRect(input), // Transformed rect (not clipped)
|
| rotateTransform, // Transform matrix to ancestor space
|
| FloatClipRect(clip1->clipRect().rect()), // Clip rect in ancestor space
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
| }
|
|
|
| {
|
| @@ -621,7 +620,7 @@ TEST_F(GeometryMapperTest, TwoClipsWithTransformBetween) {
|
| rotateTransform.mapRect(input), // Transformed rect (not clipped)
|
| rotateTransform, // Transform matrix to ancestor space
|
| FloatClipRect(mappedClip), // Clip rect in ancestor space
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
| }
|
| }
|
|
|
| @@ -844,7 +843,7 @@ TEST_F(GeometryMapperTest, FilterWithClipsAndTransforms) {
|
| transformAboveEffect->matrix() * transformBelowEffect->matrix();
|
| CHECK_MAPPINGS(input, output, FloatRect(0, 0, 300, 300), combinedTransform,
|
| FloatClipRect(FloatRect(30, 30, 270, 270)), localState,
|
| - PropertyTreeState::root(), hasRadius);
|
| + PropertyTreeState::root());
|
| }
|
|
|
| TEST_F(GeometryMapperTest, ReflectionWithPaintOffset) {
|
| @@ -866,7 +865,7 @@ TEST_F(GeometryMapperTest, ReflectionWithPaintOffset) {
|
|
|
| bool hasRadius = false;
|
| CHECK_MAPPINGS(input, output, input, TransformationMatrix(), FloatClipRect(),
|
| - localState, PropertyTreeState::root(), hasRadius);
|
| + localState, PropertyTreeState::root());
|
| }
|
|
|
| } // namespace blink
|
|
|