summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/shapes/RectangleShape.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/shapes/RectangleShape.h')
-rw-r--r--Source/WebCore/rendering/shapes/RectangleShape.h22
1 files changed, 7 insertions, 15 deletions
diff --git a/Source/WebCore/rendering/shapes/RectangleShape.h b/Source/WebCore/rendering/shapes/RectangleShape.h
index 7fde5eeef..494806006 100644
--- a/Source/WebCore/rendering/shapes/RectangleShape.h
+++ b/Source/WebCore/rendering/shapes/RectangleShape.h
@@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -27,19 +27,17 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RectangleShape_h
-#define RectangleShape_h
+#pragma once
#include "FloatPoint.h"
#include "FloatRect.h"
#include "FloatSize.h"
#include "Shape.h"
#include <wtf/Assertions.h>
-#include <wtf/Vector.h>
namespace WebCore {
-class RectangleShape : public Shape {
+class RectangleShape final : public Shape {
public:
RectangleShape(const FloatRect& bounds, const FloatSize& radii)
: m_bounds(bounds)
@@ -47,18 +45,14 @@ public:
{
}
- virtual LayoutRect shapeMarginLogicalBoundingBox() const override { return static_cast<LayoutRect>(shapeMarginBounds()); }
- virtual LayoutRect shapePaddingLogicalBoundingBox() const override { return static_cast<LayoutRect>(shapePaddingBounds()); }
- virtual bool isEmpty() const override { return m_bounds.isEmpty(); }
- virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const override;
- virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const override;
- virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, LayoutUnit&) const override;
+ LayoutRect shapeMarginLogicalBoundingBox() const override { return static_cast<LayoutRect>(shapeMarginBounds()); }
+ bool isEmpty() const override { return m_bounds.isEmpty(); }
+ LineSegment getExcludedInterval(LayoutUnit logicalTop, LayoutUnit logicalHeight) const override;
- virtual void buildDisplayPaths(DisplayPaths&) const override;
+ void buildDisplayPaths(DisplayPaths&) const override;
private:
FloatRect shapeMarginBounds() const;
- FloatRect shapePaddingBounds() const;
float rx() const { return m_radii.width(); }
float ry() const { return m_radii.height(); }
@@ -72,5 +66,3 @@ private:
};
} // namespace WebCore
-
-#endif // RectangleShape_h