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

Side by Side Diff: third_party/WebKit/Source/core/animation/ImagePropertyFunctions.h

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 #ifndef ImagePropertyFunctions_h 5 #ifndef ImagePropertyFunctions_h
6 #define ImagePropertyFunctions_h 6 #define ImagePropertyFunctions_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/style/ComputedStyle.h" 9 #include "core/style/ComputedStyle.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class ImagePropertyFunctions { 13 class ImagePropertyFunctions {
14 public: 14 public:
15 static const StyleImage* getInitialStyleImage(CSSPropertyID) { return nullpt r; } 15 static const StyleImage* getInitialStyleImage(CSSPropertyID) { return nullpt r; }
16 16
17 static const StyleImage* getStyleImage(CSSPropertyID property, const Compute dStyle& style) 17 static const StyleImage* getStyleImage(CSSPropertyID property, const Compute dStyle& style)
18 { 18 {
19 switch (property) { 19 switch (property) {
20 case CSSPropertyBorderImageSource: 20 case CSSPropertyBorderImageSource:
21 return style.borderImageSource(); 21 return style.borderImageSource();
22 case CSSPropertyListStyleImage: 22 case CSSPropertyListStyleImage:
23 return style.listStyleImage(); 23 return style.listStyleImage();
24 case CSSPropertyWebkitMaskBoxImageSource: 24 case CSSPropertyWebkitMaskBoxImageSource:
25 return style.maskBoxImageSource(); 25 return style.maskBoxImageSource();
26 default: 26 default:
27 ASSERT_NOT_REACHED(); 27 NOTREACHED();
28 return nullptr; 28 return nullptr;
29 } 29 }
30 } 30 }
31 31
32 static void setStyleImage(CSSPropertyID property, ComputedStyle& style, Styl eImage* image) 32 static void setStyleImage(CSSPropertyID property, ComputedStyle& style, Styl eImage* image)
33 { 33 {
34 switch (property) { 34 switch (property) {
35 case CSSPropertyBorderImageSource: 35 case CSSPropertyBorderImageSource:
36 style.setBorderImageSource(image); 36 style.setBorderImageSource(image);
37 break; 37 break;
38 case CSSPropertyListStyleImage: 38 case CSSPropertyListStyleImage:
39 style.setListStyleImage(image); 39 style.setListStyleImage(image);
40 break; 40 break;
41 case CSSPropertyWebkitMaskBoxImageSource: 41 case CSSPropertyWebkitMaskBoxImageSource:
42 style.setMaskBoxImageSource(image); 42 style.setMaskBoxImageSource(image);
43 break; 43 break;
44 default: 44 default:
45 ASSERT_NOT_REACHED(); 45 NOTREACHED();
46 } 46 }
47 } 47 }
48 }; 48 };
49 49
50 } // namespace blink 50 } // namespace blink
51 51
52 #endif // ImagePropertyFunctions_h 52 #endif // ImagePropertyFunctions_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698