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

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

Issue 237313003: CSS shapes support in Web Inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review comments Created 6 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/shapes/RasterShape.cpp
diff --git a/Source/core/rendering/shapes/RasterShape.cpp b/Source/core/rendering/shapes/RasterShape.cpp
index 4f2e6fcd94b68aa96e45a06b7b38bebdf28641b5..be9d2eab07574a31f4f6a269e83aa0db91f34b40 100644
--- a/Source/core/rendering/shapes/RasterShape.cpp
+++ b/Source/core/rendering/shapes/RasterShape.cpp
@@ -118,6 +118,24 @@ void RasterShapeIntervals::initializeBounds()
}
}
+void RasterShapeIntervals::buildBoundsPath(Path& path) const
+{
+ int maxY = bounds().maxY();
+ for (int y = bounds().y(); y < maxY; y++) {
+ if (intervalAt(y).isEmpty())
+ continue;
+
+ IntShapeInterval extent = intervalAt(y);
+ int endY = y + 1;
+ for (; endY < maxY; endY++) {
+ if (intervalAt(endY).isEmpty() || intervalAt(endY) != extent)
+ break;
+ }
+ path.addRect(FloatRect(extent.x1(), y, extent.width(), endY - y));
+ y = endY - 1;
+ }
+}
+
const RasterShapeIntervals& RasterShape::marginIntervals() const
{
ASSERT(shapeMargin() >= 0);

Powered by Google App Engine
This is Rietveld 408576698