| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 removeClient(renderer); | 105 removeClient(renderer); |
| 106 addClient(renderer, size); | 106 addClient(renderer, size); |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 | 109 |
| 110 // Don't generate an image for empty sizes. | 110 // Don't generate an image for empty sizes. |
| 111 if (size.isEmpty()) | 111 if (size.isEmpty()) |
| 112 return 0; | 112 return 0; |
| 113 | 113 |
| 114 // Look up the image in our cache. | 114 // Look up the image in our cache. |
| 115 return m_images.get(size).get(); | 115 return m_images.get(size); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void CSSImageGeneratorValue::putImage(const IntSize& size, PassRefPtr<Image> ima
ge) | 118 void CSSImageGeneratorValue::putImage(const IntSize& size, PassRefPtr<Image> ima
ge) |
| 119 { | 119 { |
| 120 m_images.add(size, image); | 120 m_images.add(size, image); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void CSSImageGeneratorValue::reportBaseClassMemoryUsage(MemoryObjectInfo* memory
ObjectInfo) const | 123 void CSSImageGeneratorValue::reportBaseClassMemoryUsage(MemoryObjectInfo* memory
ObjectInfo) const |
| 124 { | 124 { |
| 125 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | 125 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 break; | 227 break; |
| 228 case RadialGradientClass: | 228 case RadialGradientClass: |
| 229 static_cast<CSSRadialGradientValue*>(this)->loadSubimages(cachedResource
Loader); | 229 static_cast<CSSRadialGradientValue*>(this)->loadSubimages(cachedResource
Loader); |
| 230 break; | 230 break; |
| 231 default: | 231 default: |
| 232 ASSERT_NOT_REACHED(); | 232 ASSERT_NOT_REACHED(); |
| 233 } | 233 } |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace WebCore | 236 } // namespace WebCore |
| OLD | NEW |