| OLD | NEW |
| 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 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 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 ASSERT_NOT_REACHED(); |
| 28 return nullptr; | 28 return nullptr; |
| 29 } | 29 } |
| 30 } | 30 } |
| 31 | 31 |
| 32 static void setStyleImage(CSSPropertyID property, ComputedStyle& style, Pass
RefPtrWillBeRawPtr<StyleImage> image) | 32 static void setStyleImage(CSSPropertyID property, ComputedStyle& style, RawP
tr<StyleImage> 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 ASSERT_NOT_REACHED(); |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace blink | 50 } // namespace blink |
| 51 | 51 |
| 52 #endif // ImagePropertyFunctions_h | 52 #endif // ImagePropertyFunctions_h |
| OLD | NEW |