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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp

Issue 2896443003: Replace remaining ASSERT with DCHECK/_EQ as appropriate (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 DEFINE_TRACE_AFTER_DISPATCH(CSSBasicShapeEllipseValue) { 218 DEFINE_TRACE_AFTER_DISPATCH(CSSBasicShapeEllipseValue) {
219 visitor->Trace(center_x_); 219 visitor->Trace(center_x_);
220 visitor->Trace(center_y_); 220 visitor->Trace(center_y_);
221 visitor->Trace(radius_x_); 221 visitor->Trace(radius_x_);
222 visitor->Trace(radius_y_); 222 visitor->Trace(radius_y_);
223 CSSValue::TraceAfterDispatch(visitor); 223 CSSValue::TraceAfterDispatch(visitor);
224 } 224 }
225 225
226 static String BuildPolygonString(const WindRule& wind_rule, 226 static String BuildPolygonString(const WindRule& wind_rule,
227 const Vector<String>& points) { 227 const Vector<String>& points) {
228 ASSERT(!(points.size() % 2)); 228 DCHECK(!(points.size() % 2));
229 229
230 StringBuilder result; 230 StringBuilder result;
231 const char kEvenOddOpening[] = "polygon(evenodd, "; 231 const char kEvenOddOpening[] = "polygon(evenodd, ";
232 const char kNonZeroOpening[] = "polygon("; 232 const char kNonZeroOpening[] = "polygon(";
233 const char kCommaSeparator[] = ", "; 233 const char kCommaSeparator[] = ", ";
234 static_assert(sizeof(kEvenOddOpening) > sizeof(kNonZeroOpening), 234 static_assert(sizeof(kEvenOddOpening) > sizeof(kNonZeroOpening),
235 "polygon string openings should be the same length"); 235 "polygon string openings should be the same length");
236 236
237 // Compute the required capacity in advance to reduce allocations. 237 // Compute the required capacity in advance to reduce allocations.
238 size_t length = sizeof(kEvenOddOpening) - 1; 238 size_t length = sizeof(kEvenOddOpening) - 1;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 visitor->Trace(bottom_); 430 visitor->Trace(bottom_);
431 visitor->Trace(left_); 431 visitor->Trace(left_);
432 visitor->Trace(top_left_radius_); 432 visitor->Trace(top_left_radius_);
433 visitor->Trace(top_right_radius_); 433 visitor->Trace(top_right_radius_);
434 visitor->Trace(bottom_right_radius_); 434 visitor->Trace(bottom_right_radius_);
435 visitor->Trace(bottom_left_radius_); 435 visitor->Trace(bottom_left_radius_);
436 CSSValue::TraceAfterDispatch(visitor); 436 CSSValue::TraceAfterDispatch(visitor);
437 } 437 }
438 438
439 } // namespace blink 439 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698