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

Unified Diff: Source/core/rendering/shapes/RectangleShape.cpp

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
Index: Source/core/rendering/shapes/RectangleShape.cpp
diff --git a/Source/core/rendering/shapes/RectangleShape.cpp b/Source/core/rendering/shapes/RectangleShape.cpp
index fa6b7d22502e3df26b5823eb1a35e8eb8cba406b..53df7f979a9bfe3d47c706247f4981ec08a2c960 100644
--- a/Source/core/rendering/shapes/RectangleShape.cpp
+++ b/Source/core/rendering/shapes/RectangleShape.cpp
@@ -53,17 +53,17 @@ FloatRect RectangleShape::shapeMarginBounds() const
return FloatRect(boundsX, boundsY, boundsWidth, boundsHeight);
}
-void RectangleShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
+LineSegment RectangleShape::getExcludedInterval(LayoutUnit logicalTop, LayoutUnit logicalHeight) const
{
const FloatRect& bounds = shapeMarginBounds();
if (bounds.isEmpty())
- return;
+ return LineSegment();
float y1 = logicalTop.toFloat();
float y2 = (logicalTop + logicalHeight).toFloat();
if (y2 < bounds.y() || y1 >= bounds.maxY())
- return;
+ return LineSegment();
float x1 = bounds.x();
float x2 = bounds.maxX();
@@ -85,7 +85,7 @@ void RectangleShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logi
}
}
- result.append(LineSegment(x1, x2));
+ return LineSegment(x1, x2);
}
void RectangleShape::buildDisplayPaths(DisplayPaths& paths) const

Powered by Google App Engine
This is Rietveld 408576698