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

Side by Side Diff: third_party/WebKit/Source/core/animation/PaintPropertyFunctions.cpp

Issue 2109333002: Replace ASSERT_NOT_REACHED with NOTREACHED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/animation/PaintPropertyFunctions.h" 5 #include "core/animation/PaintPropertyFunctions.h"
6 6
7 #include "core/css/StyleColor.h" 7 #include "core/css/StyleColor.h"
8 #include "core/style/ComputedStyle.h" 8 #include "core/style/ComputedStyle.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 bool PaintPropertyFunctions::getColor(CSSPropertyID property, const ComputedStyl e& style, StyleColor& result) 31 bool PaintPropertyFunctions::getColor(CSSPropertyID property, const ComputedStyl e& style, StyleColor& result)
32 { 32 {
33 switch (property) { 33 switch (property) {
34 case CSSPropertyFill: 34 case CSSPropertyFill:
35 return getColorFromPaint(style.svgStyle().fillPaintType(), style.svgStyl e().fillPaintColor(), result); 35 return getColorFromPaint(style.svgStyle().fillPaintType(), style.svgStyl e().fillPaintColor(), result);
36 case CSSPropertyStroke: 36 case CSSPropertyStroke:
37 return getColorFromPaint(style.svgStyle().strokePaintType(), style.svgSt yle().strokePaintColor(), result); 37 return getColorFromPaint(style.svgStyle().strokePaintType(), style.svgSt yle().strokePaintColor(), result);
38 default: 38 default:
39 ASSERT_NOT_REACHED(); 39 NOTREACHED();
40 return false; 40 return false;
41 } 41 }
42 } 42 }
43 43
44 void PaintPropertyFunctions::setColor(CSSPropertyID property, ComputedStyle& sty le, const Color& color) 44 void PaintPropertyFunctions::setColor(CSSPropertyID property, ComputedStyle& sty le, const Color& color)
45 { 45 {
46 switch (property) { 46 switch (property) {
47 case CSSPropertyFill: 47 case CSSPropertyFill:
48 style.accessSVGStyle().setFillPaint(SVG_PAINTTYPE_RGBCOLOR, color, Strin g(), true, true); 48 style.accessSVGStyle().setFillPaint(SVG_PAINTTYPE_RGBCOLOR, color, Strin g(), true, true);
49 break; 49 break;
50 case CSSPropertyStroke: 50 case CSSPropertyStroke:
51 style.accessSVGStyle().setStrokePaint(SVG_PAINTTYPE_RGBCOLOR, color, Str ing(), true, true); 51 style.accessSVGStyle().setStrokePaint(SVG_PAINTTYPE_RGBCOLOR, color, Str ing(), true, true);
52 break; 52 break;
53 default: 53 default:
54 ASSERT_NOT_REACHED(); 54 NOTREACHED();
55 } 55 }
56 } 56 }
57 57
58 58
59 } // namespace blink 59 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698