Chromium Code Reviews| Index: Source/core/rendering/shapes/Shape.h |
| diff --git a/Source/core/rendering/shapes/Shape.h b/Source/core/rendering/shapes/Shape.h |
| index d2635a3ee2883dad8bc9ca621be87c127f7ae0c1..6d11df3ab63ea11b9b79924ea253e90a37f004ff 100644 |
| --- a/Source/core/rendering/shapes/Shape.h |
| +++ b/Source/core/rendering/shapes/Shape.h |
| @@ -42,19 +42,25 @@ |
| namespace blink { |
| struct LineSegment { |
| + LineSegment() |
| + : logicalLeft(0) |
| + , logicalRight(0) |
| + , isValid(false) |
| + { |
| + } |
| + |
| LineSegment(float logicalLeft, float logicalRight) |
| : logicalLeft(logicalLeft) |
| , logicalRight(logicalRight) |
| + , isValid(true) |
| { |
| } |
| float logicalLeft; |
| float logicalRight; |
| + bool isValid; |
|
leviw_travelin_and_unemployed
2014/08/08 21:46:59
This makes me wish this were a class instead of a
|
| }; |
| -typedef Vector<LineSegment> SegmentList; |
| - |
| - |
| // A representation of a BasicShape that enables layout code to determine how to break a line up into segments |
| // that will fit within or around a shape. The line is defined by a pair of logical Y coordinates and the |
| // computed segments are returned as pairs of logical X coordinates. The BasicShape itself is defined in |
| @@ -75,7 +81,7 @@ public: |
| virtual LayoutRect shapeMarginLogicalBoundingBox() const = 0; |
| virtual bool isEmpty() const = 0; |
| - virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const = 0; |
| + virtual LineSegment getExcludedInterval(LayoutUnit logicalTop, LayoutUnit logicalHeight) const = 0; |
| bool lineOverlapsShapeMarginBounds(LayoutUnit lineTop, LayoutUnit lineHeight) const { return lineOverlapsBoundingBox(lineTop, lineHeight, shapeMarginLogicalBoundingBox()); } |
| virtual void buildDisplayPaths(DisplayPaths&) const = 0; |