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

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: Created 6 years, 8 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..f9322acc7d529a8c8c1d2eafb29f2fc28a7e0eb6 100644
--- a/Source/core/rendering/shapes/PolygonShape.cpp
+++ b/Source/core/rendering/shapes/PolygonShape.cpp
@@ -148,4 +148,15 @@ void PolygonShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logica
result.append(LineSegment(excludedInterval.x1(), excludedInterval.x2()));
}
+void PolygonShape::buildDisplayPaths(DisplayPaths& paths) const
+{
+ // FIXME: Add support for margin
+ if (!m_polygon.numberOfVertices())
+ return;
+ paths.shape.moveTo(m_polygon.vertexAt(0));
+ for (size_t i = 1; i < m_polygon.numberOfVertices(); i++)
rwlbuis 2014/04/15 15:48:21 the prefix ++ is preferred. Depending on the compi
Habib Virji 2014/04/17 15:43:47 Done.
+ paths.shape.addLineTo(m_polygon.vertexAt(i));
+ paths.shape.closeSubpath();
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698