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

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

Issue 68263018: [CSS Shapes] Empty polygons with non-zero shape-padding cause an ASSERT crash (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed extra shape-outside test file Created 7 years, 1 month 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 | « LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-empty-polygon-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/shapes/PolygonShape.cpp
diff --git a/Source/core/rendering/shapes/PolygonShape.cpp b/Source/core/rendering/shapes/PolygonShape.cpp
index 5b155ed6913b57aed3747c9ec7338eda153f6128..26ddcf3606b2b0883d16fa9f3ec74045ca41248b 100644
--- a/Source/core/rendering/shapes/PolygonShape.cpp
+++ b/Source/core/rendering/shapes/PolygonShape.cpp
@@ -182,7 +182,7 @@ static inline PassOwnPtr<FloatPolygon> computeShapeMarginBounds(const FloatPolyg
const FloatPolygon& PolygonShape::shapePaddingBounds() const
{
ASSERT(shapePadding() >= 0);
- if (!shapePadding())
+ if (!shapePadding() || m_polygon.isEmpty())
return m_polygon;
if (!m_paddingBounds)
@@ -194,7 +194,7 @@ const FloatPolygon& PolygonShape::shapePaddingBounds() const
const FloatPolygon& PolygonShape::shapeMarginBounds() const
{
ASSERT(shapeMargin() >= 0);
- if (!shapeMargin())
+ if (!shapeMargin() || m_polygon.isEmpty())
return m_polygon;
if (!m_marginBounds)
« no previous file with comments | « LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-empty-polygon-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698