Index: Source/core/layout/LayoutBox.cpp |
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp |
index 85a09953e31bb812f5783c5b460969d1c3ed16fa..4272b5fd90ce6332d7ded728a2deab0f0ee01adc 100644 |
--- a/Source/core/layout/LayoutBox.cpp |
+++ b/Source/core/layout/LayoutBox.cpp |
@@ -4110,23 +4110,15 @@ LayoutRectOutsets LayoutBox::computeVisualEffectOverflowOutsets() const |
} |
if (style()->hasOutline()) { |
+ Vector<LayoutRect> outlineRects; |
+ // The result rects are in coordinates of this object's border box. |
+ addOutlineRects(outlineRects, LayoutPoint()); |
+ LayoutRect rect = unionRect(outlineRects); |
int outlineOutset = style()->outlineOutsetExtent(); |
- if (style()->outlineStyleIsAuto()) { |
- // The result focus ring rects are in coordinates of this object's border box. |
- Vector<LayoutRect> focusRingRects; |
- addOutlineRects(focusRingRects, LayoutPoint()); |
- LayoutRect rect = unionRect(focusRingRects); |
- |
- top = std::max(top, -rect.y() + outlineOutset); |
- right = std::max(right, rect.maxX() - size().width() + outlineOutset); |
- bottom = std::max(bottom, rect.maxY() - size().height() + outlineOutset); |
- left = std::max(left, -rect.x() + outlineOutset); |
- } else { |
- top = std::max<LayoutUnit>(top, outlineOutset); |
- right = std::max<LayoutUnit>(right, outlineOutset); |
- bottom = std::max<LayoutUnit>(bottom, outlineOutset); |
- left = std::max<LayoutUnit>(left, outlineOutset); |
- } |
+ top = std::max(top, -rect.y() + outlineOutset); |
+ right = std::max(right, rect.maxX() - size().width() + outlineOutset); |
+ bottom = std::max(bottom, rect.maxY() - size().height() + outlineOutset); |
+ left = std::max(left, -rect.x() + outlineOutset); |
} |
return LayoutRectOutsets(top, right, bottom, left); |