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

Side by Side Diff: third_party/WebKit/Source/core/style/SVGComputedStyle.cpp

Issue 2751653003: Replace ASSERT and ASSERT_NOT_REACHED in core/style/ (Closed)
Patch Set: Replace ASSERT and ASSERT_NOT_REACHED in core/style/ 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005, 2010 Rob Buis <buis@kde.org> 3 2004, 2005, 2010 Rob Buis <buis@kde.org>
4 Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 5
6 Based on khtml code by: 6 Based on khtml code by:
7 Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 7 Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
8 Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) 8 Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
9 Copyright (C) 2002-2003 Dirk Mueller (mueller@kde.org) 9 Copyright (C) 2002-2003 Dirk Mueller (mueller@kde.org)
10 Copyright (C) 2002 Apple Computer, Inc. 10 Copyright (C) 2002 Apple Computer, Inc.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 unsigned paintOrderSequence(EPaintOrderType first, 242 unsigned paintOrderSequence(EPaintOrderType first,
243 EPaintOrderType second, 243 EPaintOrderType second,
244 EPaintOrderType third) { 244 EPaintOrderType third) {
245 return (((third << kPaintOrderBitwidth) | second) << kPaintOrderBitwidth) | 245 return (((third << kPaintOrderBitwidth) | second) << kPaintOrderBitwidth) |
246 first; 246 first;
247 } 247 }
248 248
249 EPaintOrderType SVGComputedStyle::paintOrderType(unsigned index) const { 249 EPaintOrderType SVGComputedStyle::paintOrderType(unsigned index) const {
250 unsigned pt = 0; 250 unsigned pt = 0;
251 ASSERT(index < ((1 << kPaintOrderBitwidth) - 1)); 251 DCHECK(index < ((1 << kPaintOrderBitwidth) - 1));
252 switch (this->paintOrder()) { 252 switch (this->paintOrder()) {
253 case PaintOrderNormal: 253 case PaintOrderNormal:
254 case PaintOrderFillStrokeMarkers: 254 case PaintOrderFillStrokeMarkers:
255 pt = paintOrderSequence(PT_FILL, PT_STROKE, PT_MARKERS); 255 pt = paintOrderSequence(PT_FILL, PT_STROKE, PT_MARKERS);
256 break; 256 break;
257 case PaintOrderFillMarkersStroke: 257 case PaintOrderFillMarkersStroke:
258 pt = paintOrderSequence(PT_FILL, PT_MARKERS, PT_STROKE); 258 pt = paintOrderSequence(PT_FILL, PT_MARKERS, PT_STROKE);
259 break; 259 break;
260 case PaintOrderStrokeFillMarkers: 260 case PaintOrderStrokeFillMarkers:
261 pt = paintOrderSequence(PT_STROKE, PT_FILL, PT_MARKERS); 261 pt = paintOrderSequence(PT_STROKE, PT_FILL, PT_MARKERS);
262 break; 262 break;
263 case PaintOrderStrokeMarkersFill: 263 case PaintOrderStrokeMarkersFill:
264 pt = paintOrderSequence(PT_STROKE, PT_MARKERS, PT_FILL); 264 pt = paintOrderSequence(PT_STROKE, PT_MARKERS, PT_FILL);
265 break; 265 break;
266 case PaintOrderMarkersFillStroke: 266 case PaintOrderMarkersFillStroke:
267 pt = paintOrderSequence(PT_MARKERS, PT_FILL, PT_STROKE); 267 pt = paintOrderSequence(PT_MARKERS, PT_FILL, PT_STROKE);
268 break; 268 break;
269 case PaintOrderMarkersStrokeFill: 269 case PaintOrderMarkersStrokeFill:
270 pt = paintOrderSequence(PT_MARKERS, PT_STROKE, PT_FILL); 270 pt = paintOrderSequence(PT_MARKERS, PT_STROKE, PT_FILL);
271 break; 271 break;
272 } 272 }
273 273
274 pt = 274 pt =
275 (pt >> (kPaintOrderBitwidth * index)) & ((1u << kPaintOrderBitwidth) - 1); 275 (pt >> (kPaintOrderBitwidth * index)) & ((1u << kPaintOrderBitwidth) - 1);
276 return (EPaintOrderType)pt; 276 return (EPaintOrderType)pt;
277 } 277 }
278 278
279 } // namespace blink 279 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/QuotesData.cpp ('k') | third_party/WebKit/Source/core/style/ShadowData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698