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

Unified Diff: third_party/WebKit/Source/core/layout/shapes/PolygonShape.cpp

Issue 2748103015: Replace ASSERT with DCHECK in core/layout/<sub dirs> (Closed)
Patch Set: Rebase with latest Created 3 years, 9 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: third_party/WebKit/Source/core/layout/shapes/PolygonShape.cpp
diff --git a/third_party/WebKit/Source/core/layout/shapes/PolygonShape.cpp b/third_party/WebKit/Source/core/layout/shapes/PolygonShape.cpp
index 26dbd6b11cbd2a6404332a3018107217b002d662..39e1b082a930e33a43866959c762eb251c4ad32c 100644
--- a/third_party/WebKit/Source/core/layout/shapes/PolygonShape.cpp
+++ b/third_party/WebKit/Source/core/layout/shapes/PolygonShape.cpp
@@ -54,7 +54,8 @@ static inline bool overlapsYRange(const FloatRect& rect, float y1, float y2) {
}
float OffsetPolygonEdge::xIntercept(float y) const {
- ASSERT(y >= minY() && y <= maxY());
+ DCHECK_GE(y, minY());
+ DCHECK_LE(y, maxY());
if (vertex1().y() == vertex2().y() || vertex1().x() == vertex2().x())
return minX();
@@ -95,7 +96,7 @@ FloatShapeInterval OffsetPolygonEdge::clippedEdgeXRange(float y1,
}
static float circleXIntercept(float y, float radius) {
- ASSERT(radius > 0);
+ DCHECK_GT(radius, 0);
return radius * sqrt(1 - (y * y) / (radius * radius));
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/shapes/BoxShape.cpp ('k') | third_party/WebKit/Source/core/layout/shapes/RasterShape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698