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

Unified Diff: Source/core/rendering/shapes/Shape.h

Issue 454123002: Refactor getExcludedIntervals since only one LineSegment is ever returned (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/core/rendering/shapes/RectangleShape.cpp ('k') | Source/core/rendering/shapes/ShapeOutsideInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/core/rendering/shapes/RectangleShape.cpp ('k') | Source/core/rendering/shapes/ShapeOutsideInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698