Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1488)

Unified Diff: Source/core/rendering/exclusions/ExclusionShape.h

Issue 14892005: [CSS Exclusions] ExclusionShape bounding box methods should return LayoutRects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: reverted LineSegment logicalLeft,Right type change Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/exclusions/ExclusionShape.h
diff --git a/Source/core/rendering/exclusions/ExclusionShape.h b/Source/core/rendering/exclusions/ExclusionShape.h
index 177d4043c6daaaa1898adced8d18348a1bfc7720..b433fc7f0d0ce90a7c0bb86e9eb132f25ae16f0c 100644
--- a/Source/core/rendering/exclusions/ExclusionShape.h
+++ b/Source/core/rendering/exclusions/ExclusionShape.h
@@ -30,7 +30,7 @@
#ifndef ExclusionShape_h
#define ExclusionShape_h
-#include "core/platform/graphics/FloatRect.h"
+#include "core/platform/graphics/LayoutRect.h"
#include "core/platform/text/WritingMode.h"
#include "core/rendering/style/BasicShapes.h"
#include <wtf/PassOwnPtr.h>
@@ -59,23 +59,23 @@ typedef Vector<LineSegment> SegmentList;
class ExclusionShape {
public:
- static PassOwnPtr<ExclusionShape> createExclusionShape(const BasicShape*, float logicalBoxWidth, float logicalBoxHeight, WritingMode, Length margin, Length padding);
+ static PassOwnPtr<ExclusionShape> createExclusionShape(const BasicShape*, const LayoutSize& logicalBoxSize, WritingMode, Length margin, Length padding);
virtual ~ExclusionShape() { }
+ virtual LayoutRect shapeMarginLogicalBoundingBox() const = 0;
+ virtual LayoutRect shapePaddingLogicalBoundingBox() const = 0;
+ virtual bool isEmpty() const = 0;
+ virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const = 0;
+ virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const = 0;
+ virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const LayoutSize& minLogicalIntervalSize, LayoutUnit& result) const = 0;
+
+protected:
float shapeMargin() const { return m_margin; }
float shapePadding() const { return m_padding; }
- virtual FloatRect shapeMarginLogicalBoundingBox() const = 0;
- virtual FloatRect shapePaddingLogicalBoundingBox() const = 0;
- virtual bool isEmpty() const = 0;
- virtual void getIncludedIntervals(float logicalTop, float logicalHeight, SegmentList&) const = 0;
- virtual void getExcludedIntervals(float logicalTop, float logicalHeight, SegmentList&) const = 0;
- virtual bool firstIncludedIntervalLogicalTop(float minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, float& result) const = 0;
private:
WritingMode m_writingMode;
- float m_logicalBoxWidth;
- float m_logicalBoxHeight;
float m_margin;
float m_padding;
};
« no previous file with comments | « Source/core/rendering/exclusions/ExclusionRectangle.cpp ('k') | Source/core/rendering/exclusions/ExclusionShape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698