| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } | 107 } |
| 108 | 108 |
| 109 PassRefPtr<Image> CSSImageGeneratorValue::image(RenderObject* renderer, const In
tSize& size) | 109 PassRefPtr<Image> CSSImageGeneratorValue::image(RenderObject* renderer, const In
tSize& size) |
| 110 { | 110 { |
| 111 switch (classType()) { | 111 switch (classType()) { |
| 112 case CanvasClass: | 112 case CanvasClass: |
| 113 return static_cast<CSSCanvasValue*>(this)->image(renderer, size); | 113 return static_cast<CSSCanvasValue*>(this)->image(renderer, size); |
| 114 case CrossfadeClass: | 114 case CrossfadeClass: |
| 115 return static_cast<CSSCrossfadeValue*>(this)->image(renderer, size); | 115 return static_cast<CSSCrossfadeValue*>(this)->image(renderer, size); |
| 116 case LinearGradientClass: | 116 case LinearGradientClass: |
| 117 return static_cast<CSSLinearGradientValue*>(this)->image(renderer, size)
; | 117 return toCSSLinearGradientValue(this)->image(renderer, size); |
| 118 case RadialGradientClass: | 118 case RadialGradientClass: |
| 119 return static_cast<CSSRadialGradientValue*>(this)->image(renderer, size)
; | 119 return toCSSRadialGradientValue(this)->image(renderer, size); |
| 120 default: | 120 default: |
| 121 ASSERT_NOT_REACHED(); | 121 ASSERT_NOT_REACHED(); |
| 122 } | 122 } |
| 123 return 0; | 123 return 0; |
| 124 } | 124 } |
| 125 | 125 |
| 126 bool CSSImageGeneratorValue::isFixedSize() const | 126 bool CSSImageGeneratorValue::isFixedSize() const |
| 127 { | 127 { |
| 128 switch (classType()) { | 128 switch (classType()) { |
| 129 case CanvasClass: | 129 case CanvasClass: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 IntSize CSSImageGeneratorValue::fixedSize(const RenderObject* renderer) | 143 IntSize CSSImageGeneratorValue::fixedSize(const RenderObject* renderer) |
| 144 { | 144 { |
| 145 switch (classType()) { | 145 switch (classType()) { |
| 146 case CanvasClass: | 146 case CanvasClass: |
| 147 return static_cast<CSSCanvasValue*>(this)->fixedSize(renderer); | 147 return static_cast<CSSCanvasValue*>(this)->fixedSize(renderer); |
| 148 case CrossfadeClass: | 148 case CrossfadeClass: |
| 149 return static_cast<CSSCrossfadeValue*>(this)->fixedSize(renderer); | 149 return static_cast<CSSCrossfadeValue*>(this)->fixedSize(renderer); |
| 150 case LinearGradientClass: | 150 case LinearGradientClass: |
| 151 return static_cast<CSSLinearGradientValue*>(this)->fixedSize(renderer); | 151 return toCSSLinearGradientValue(this)->fixedSize(renderer); |
| 152 case RadialGradientClass: | 152 case RadialGradientClass: |
| 153 return static_cast<CSSRadialGradientValue*>(this)->fixedSize(renderer); | 153 return toCSSRadialGradientValue(this)->fixedSize(renderer); |
| 154 default: | 154 default: |
| 155 ASSERT_NOT_REACHED(); | 155 ASSERT_NOT_REACHED(); |
| 156 } | 156 } |
| 157 return IntSize(); | 157 return IntSize(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 bool CSSImageGeneratorValue::isPending() const | 160 bool CSSImageGeneratorValue::isPending() const |
| 161 { | 161 { |
| 162 switch (classType()) { | 162 switch (classType()) { |
| 163 case CrossfadeClass: | 163 case CrossfadeClass: |
| (...skipping 30 matching lines...) Expand all Loading... |
| 194 void CSSImageGeneratorValue::loadSubimages(ResourceFetcher* fetcher) | 194 void CSSImageGeneratorValue::loadSubimages(ResourceFetcher* fetcher) |
| 195 { | 195 { |
| 196 switch (classType()) { | 196 switch (classType()) { |
| 197 case CrossfadeClass: | 197 case CrossfadeClass: |
| 198 static_cast<CSSCrossfadeValue*>(this)->loadSubimages(fetcher); | 198 static_cast<CSSCrossfadeValue*>(this)->loadSubimages(fetcher); |
| 199 break; | 199 break; |
| 200 case CanvasClass: | 200 case CanvasClass: |
| 201 static_cast<CSSCanvasValue*>(this)->loadSubimages(fetcher); | 201 static_cast<CSSCanvasValue*>(this)->loadSubimages(fetcher); |
| 202 break; | 202 break; |
| 203 case LinearGradientClass: | 203 case LinearGradientClass: |
| 204 static_cast<CSSLinearGradientValue*>(this)->loadSubimages(fetcher); | 204 toCSSLinearGradientValue(this)->loadSubimages(fetcher); |
| 205 break; | 205 break; |
| 206 case RadialGradientClass: | 206 case RadialGradientClass: |
| 207 static_cast<CSSRadialGradientValue*>(this)->loadSubimages(fetcher); | 207 toCSSRadialGradientValue(this)->loadSubimages(fetcher); |
| 208 break; | 208 break; |
| 209 default: | 209 default: |
| 210 ASSERT_NOT_REACHED(); | 210 ASSERT_NOT_REACHED(); |
| 211 } | 211 } |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace WebCore | 214 } // namespace WebCore |
| OLD | NEW |