| Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| index 9b9a868d780442ed2da6679ec3893a8f95d2cf7f..8f606340fb102fe5fba67b19f2f46608a8e549a8 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| @@ -2647,23 +2647,23 @@ FilterOperations PaintLayer::computeFilterOperations(const ComputedStyle& style)
|
| // TODO(jbroman): Incorporate the mask image.
|
| const auto* reflectStyle = style.boxReflect();
|
| FloatRect frameRect(toLayoutBox(layoutObject())->frameRect());
|
| - ReflectionDirection direction = VerticalReflection;
|
| + BoxReflection::ReflectionDirection direction = BoxReflection::VerticalReflection;
|
| float offset = 0;
|
| switch (reflectStyle->direction()) {
|
| case ReflectionAbove:
|
| - direction = VerticalReflection;
|
| + direction = BoxReflection::VerticalReflection;
|
| offset = -floatValueForLength(reflectStyle->offset(), frameRect.height());
|
| break;
|
| case ReflectionBelow:
|
| - direction = VerticalReflection;
|
| + direction = BoxReflection::VerticalReflection;
|
| offset = 2 * frameRect.height() + floatValueForLength(reflectStyle->offset(), frameRect.height());
|
| break;
|
| case ReflectionLeft:
|
| - direction = HorizontalReflection;
|
| + direction = BoxReflection::HorizontalReflection;
|
| offset = -floatValueForLength(reflectStyle->offset(), frameRect.width());
|
| break;
|
| case ReflectionRight:
|
| - direction = HorizontalReflection;
|
| + direction = BoxReflection::HorizontalReflection;
|
| offset = 2 * frameRect.width() + floatValueForLength(reflectStyle->offset(), frameRect.width());
|
| break;
|
| }
|
| @@ -2674,9 +2674,10 @@ FilterOperations PaintLayer::computeFilterOperations(const ComputedStyle& style)
|
| // SkLocalMatrixImageFilter, but simpler).
|
| // The rect used here should match the one used in FilterPainter.
|
| LayoutRect filterInputBounds = physicalBoundingBoxIncludingReflectionAndStackingChildren(LayoutPoint());
|
| - offset -= 2 * (direction == VerticalReflection ? filterInputBounds.y() : filterInputBounds.x()).toFloat();
|
| + offset -= 2 * (direction == BoxReflection::VerticalReflection ? filterInputBounds.y() : filterInputBounds.x()).toFloat();
|
|
|
| - filterOperations.operations().append(BoxReflectFilterOperation::create(direction, offset));
|
| + BoxReflection reflection(direction, offset);
|
| + filterOperations.operations().append(BoxReflectFilterOperation::create(reflection));
|
| }
|
| return computeFilterOperationsHandleReferenceFilters(filterOperations, style.effectiveZoom(), enclosingNode());
|
| }
|
|
|