Commit 54aed49c authored by timloh's avatar timloh Committed by Commit bot

Remove TransformOperation::None

This patch removes the enum value TransformOperation::None, which is
currently only used in an ASSERT_NOT_REACHED case.

Review-Url: https://codereview.chromium.org/2616863002
Cr-Commit-Position: refs/heads/master@{#443092}
parent 2c9cbe19
...@@ -53,6 +53,8 @@ static Length convertToFloatLength( ...@@ -53,6 +53,8 @@ static Length convertToFloatLength(
static TransformOperation::OperationType getTransformOperationType( static TransformOperation::OperationType getTransformOperationType(
CSSValueID type) { CSSValueID type) {
switch (type) { switch (type) {
default:
NOTREACHED();
case CSSValueScale: case CSSValueScale:
return TransformOperation::Scale; return TransformOperation::Scale;
case CSSValueScaleX: case CSSValueScaleX:
...@@ -95,10 +97,6 @@ static TransformOperation::OperationType getTransformOperationType( ...@@ -95,10 +97,6 @@ static TransformOperation::OperationType getTransformOperationType(
return TransformOperation::Matrix3D; return TransformOperation::Matrix3D;
case CSSValuePerspective: case CSSValuePerspective:
return TransformOperation::Perspective; return TransformOperation::Perspective;
default:
ASSERT_NOT_REACHED();
// FIXME: We shouldn't have a type None since we never create them
return TransformOperation::None;
} }
} }
......
...@@ -120,8 +120,8 @@ void toCompositorTransformOperations( ...@@ -120,8 +120,8 @@ void toCompositorTransformOperations(
case TransformOperation::Identity: case TransformOperation::Identity:
outTransformOperations->appendIdentity(); outTransformOperations->appendIdentity();
break; break;
case TransformOperation::None: default:
// Do nothing. NOTREACHED();
break; break;
} // switch } // switch
} // for each operation } // for each operation
......
...@@ -64,7 +64,6 @@ class PLATFORM_EXPORT TransformOperation ...@@ -64,7 +64,6 @@ class PLATFORM_EXPORT TransformOperation
Interpolated, Interpolated,
Identity, Identity,
RotateAroundOrigin, RotateAroundOrigin,
None
}; };
TransformOperation() {} TransformOperation() {}
......
...@@ -283,16 +283,10 @@ bool TransformOperations::blendedBoundsForBox(const FloatBox& box, ...@@ -283,16 +283,10 @@ bool TransformOperations::blendedBoundsForBox(const FloatBox& box,
(i < fromSize) ? from.operations()[i] : nullptr; (i < fromSize) ? from.operations()[i] : nullptr;
RefPtr<TransformOperation> toOperation = RefPtr<TransformOperation> toOperation =
(i < toSize) ? operations()[i] : nullptr; (i < toSize) ? operations()[i] : nullptr;
if (fromOperation && fromOperation->type() == TransformOperation::None)
fromOperation = nullptr;
if (toOperation && toOperation->type() == TransformOperation::None)
toOperation = nullptr;
DCHECK(fromOperation || toOperation);
TransformOperation::OperationType interpolationType = TransformOperation::OperationType interpolationType =
toOperation toOperation ? toOperation->type() : fromOperation->type();
? toOperation->type()
: fromOperation ? fromOperation->type() : TransformOperation::None;
if (fromOperation && toOperation && if (fromOperation && toOperation &&
!fromOperation->canBlendWith(*toOperation.get())) !fromOperation->canBlendWith(*toOperation.get()))
return false; return false;
...@@ -408,8 +402,6 @@ bool TransformOperations::blendedBoundsForBox(const FloatBox& box, ...@@ -408,8 +402,6 @@ bool TransformOperations::blendedBoundsForBox(const FloatBox& box,
} }
} }
continue; continue;
case TransformOperation::None:
continue;
case TransformOperation::Matrix: case TransformOperation::Matrix:
case TransformOperation::Matrix3D: case TransformOperation::Matrix3D:
case TransformOperation::Interpolated: case TransformOperation::Interpolated:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment