| Index: Source/core/platform/graphics/RoundedRect.cpp
|
| diff --git a/Source/core/platform/graphics/RoundedRect.cpp b/Source/core/platform/graphics/RoundedRect.cpp
|
| index 8eab02dab79ab43124af781e6f5d5fb44007e9be..4ef82618f82e8055efef9c63332505947434f982 100644
|
| --- a/Source/core/platform/graphics/RoundedRect.cpp
|
| +++ b/Source/core/platform/graphics/RoundedRect.cpp
|
| @@ -27,6 +27,7 @@
|
|
|
| #include "config.h"
|
| #include "core/platform/graphics/RoundedRect.h"
|
| +#include "wtf/Assertions.h"
|
|
|
| #include <algorithm>
|
|
|
| @@ -150,6 +151,16 @@ RoundedRect::RoundedRect(const IntRect& rect, const IntSize& topLeft, const IntS
|
| {
|
| }
|
|
|
| +IntRect RoundedRect::radiusCenterRect() const
|
| +{
|
| + ASSERT(isRenderable());
|
| + int minX = m_rect.x() + max(m_radii.topLeft().width(), m_radii.bottomLeft().width());
|
| + int minY = m_rect.y() + max(m_radii.topLeft().height(), m_radii.topRight().height());
|
| + int maxX = m_rect.maxX() - max(m_radii.topRight().width(), m_radii.bottomRight().width());
|
| + int maxY = m_rect.maxY() - max(m_radii.bottomLeft().height(), m_radii.bottomRight().height());
|
| + return IntRect(minX, minY, maxX - minX, maxY - minY);
|
| +}
|
| +
|
| void RoundedRect::includeLogicalEdges(const Radii& edges, bool isHorizontal, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
|
| {
|
| m_radii.includeLogicalEdges(edges, isHorizontal, includeLogicalLeftEdge, includeLogicalRightEdge);
|
|
|