| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 // Look up the image in our cache. | 112 // Look up the image in our cache. |
| 113 return m_images.get(size); | 113 return m_images.get(size); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void CSSImageGeneratorValue::putImage(const IntSize& size, PassRefPtr<Image> ima
ge) | 116 void CSSImageGeneratorValue::putImage(const IntSize& size, PassRefPtr<Image> ima
ge) |
| 117 { | 117 { |
| 118 m_images.add(size, image); | 118 m_images.add(size, image); |
| 119 } | 119 } |
| 120 | 120 |
| 121 PassRefPtr<Image> CSSImageGeneratorValue::image(const LayoutObject& layoutObject
, const IntSize& size) | 121 PassRefPtr<Image> CSSImageGeneratorValue::image(const LayoutObject& layoutObject
, const IntSize& size, float zoom) |
| 122 { | 122 { |
| 123 switch (getClassType()) { | 123 switch (getClassType()) { |
| 124 case CrossfadeClass: | 124 case CrossfadeClass: |
| 125 return toCSSCrossfadeValue(this)->image(layoutObject, size); | 125 return toCSSCrossfadeValue(this)->image(layoutObject, size); |
| 126 case LinearGradientClass: | 126 case LinearGradientClass: |
| 127 return toCSSLinearGradientValue(this)->image(layoutObject, size); | 127 return toCSSLinearGradientValue(this)->image(layoutObject, size); |
| 128 case PaintClass: | 128 case PaintClass: |
| 129 return toCSSPaintValue(this)->image(layoutObject, size); | 129 return toCSSPaintValue(this)->image(layoutObject, size, zoom); |
| 130 case RadialGradientClass: | 130 case RadialGradientClass: |
| 131 return toCSSRadialGradientValue(this)->image(layoutObject, size); | 131 return toCSSRadialGradientValue(this)->image(layoutObject, size); |
| 132 default: | 132 default: |
| 133 ASSERT_NOT_REACHED(); | 133 ASSERT_NOT_REACHED(); |
| 134 } | 134 } |
| 135 return nullptr; | 135 return nullptr; |
| 136 } | 136 } |
| 137 | 137 |
| 138 bool CSSImageGeneratorValue::isFixedSize() const | 138 bool CSSImageGeneratorValue::isFixedSize() const |
| 139 { | 139 { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 break; | 217 break; |
| 218 case RadialGradientClass: | 218 case RadialGradientClass: |
| 219 toCSSRadialGradientValue(this)->loadSubimages(document); | 219 toCSSRadialGradientValue(this)->loadSubimages(document); |
| 220 break; | 220 break; |
| 221 default: | 221 default: |
| 222 ASSERT_NOT_REACHED(); | 222 ASSERT_NOT_REACHED(); |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| 226 } // namespace blink | 226 } // namespace blink |
| OLD | NEW |