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

Side by Side Diff: third_party/WebKit/Source/core/animation/ImageSlicePropertyFunctions.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 ImageSlicePropertyFunctions_h 5 #ifndef ImageSlicePropertyFunctions_h
6 #define ImageSlicePropertyFunctions_h 6 #define ImageSlicePropertyFunctions_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
(...skipping 11 matching lines...) Expand all
22 }; 22 };
23 23
24 class ImageSlicePropertyFunctions { 24 class ImageSlicePropertyFunctions {
25 public: 25 public:
26 static ImageSlice getInitialImageSlice(CSSPropertyID property) { return getI mageSlice(property, ComputedStyle::initialStyle()); } 26 static ImageSlice getInitialImageSlice(CSSPropertyID property) { return getI mageSlice(property, ComputedStyle::initialStyle()); }
27 27
28 static ImageSlice getImageSlice(CSSPropertyID property, const ComputedStyle& style) 28 static ImageSlice getImageSlice(CSSPropertyID property, const ComputedStyle& style)
29 { 29 {
30 switch (property) { 30 switch (property) {
31 default: 31 default:
32 ASSERT_NOT_REACHED(); 32 NOTREACHED();
33 // Fall through. 33 // Fall through.
34 case CSSPropertyBorderImageSlice: 34 case CSSPropertyBorderImageSlice:
35 return ImageSlice(style.borderImageSlices(), style.borderImageSlices Fill()); 35 return ImageSlice(style.borderImageSlices(), style.borderImageSlices Fill());
36 case CSSPropertyWebkitMaskBoxImageSlice: 36 case CSSPropertyWebkitMaskBoxImageSlice:
37 return ImageSlice(style.maskBoxImageSlices(), style.maskBoxImageSlic esFill()); 37 return ImageSlice(style.maskBoxImageSlices(), style.maskBoxImageSlic esFill());
38 } 38 }
39 } 39 }
40 40
41 static void setImageSlice(CSSPropertyID property, ComputedStyle& style, cons t ImageSlice& slice) 41 static void setImageSlice(CSSPropertyID property, ComputedStyle& style, cons t ImageSlice& slice)
42 { 42 {
43 switch (property) { 43 switch (property) {
44 case CSSPropertyBorderImageSlice: 44 case CSSPropertyBorderImageSlice:
45 style.setBorderImageSlices(slice.slices); 45 style.setBorderImageSlices(slice.slices);
46 style.setBorderImageSlicesFill(slice.fill); 46 style.setBorderImageSlicesFill(slice.fill);
47 break; 47 break;
48 case CSSPropertyWebkitMaskBoxImageSlice: 48 case CSSPropertyWebkitMaskBoxImageSlice:
49 style.setMaskBoxImageSlices(slice.slices); 49 style.setMaskBoxImageSlices(slice.slices);
50 style.setMaskBoxImageSlicesFill(slice.fill); 50 style.setMaskBoxImageSlicesFill(slice.fill);
51 break; 51 break;
52 default: 52 default:
53 ASSERT_NOT_REACHED(); 53 NOTREACHED();
54 } 54 }
55 } 55 }
56 }; 56 };
57 57
58 } // namespace blink 58 } // namespace blink
59 59
60 #endif // ImageSlicePropertyFunctions_h 60 #endif // ImageSlicePropertyFunctions_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698