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

Unified Diff: Source/core/rendering/shapes/PolygonShape.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/PolygonShape.cpp
diff --git a/Source/core/rendering/shapes/PolygonShape.cpp b/Source/core/rendering/shapes/PolygonShape.cpp
index 15fd9bd451b0b58abc4f7dfb467e7225cb9827b2..736b6f5ec7f66644f44a3bc479d12a364c8455da 100644
--- a/Source/core/rendering/shapes/PolygonShape.cpp
+++ b/Source/core/rendering/shapes/PolygonShape.cpp
@@ -148,4 +148,14 @@ void PolygonShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logica
result.append(LineSegment(excludedInterval.x1(), excludedInterval.x2()));
}
+void PolygonShape::buildDisplayPaths(DisplayPaths& paths) const
+{
+ if (!m_polygon.numberOfVertices())
+ return;
+ paths.shape.moveTo(m_polygon.vertexAt(0));
+ for (size_t i = 1; i < m_polygon.numberOfVertices(); ++i)
+ paths.shape.addLineTo(m_polygon.vertexAt(i));
+ paths.shape.closeSubpath();
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698