| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 removeClient(layoutObject); | 97 removeClient(layoutObject); |
| 98 addClient(layoutObject, size); | 98 addClient(layoutObject, size); |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 | 101 |
| 102 // Don't generate an image for empty sizes. | 102 // Don't generate an image for empty sizes. |
| 103 if (size.isEmpty()) | 103 if (size.isEmpty()) |
| 104 return nullptr; | 104 return nullptr; |
| 105 | 105 |
| 106 // Look up the image in our cache. | 106 // Look up the image in our cache. |
| 107 return m_images.get(size); | 107 return m_images.at(size); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void CSSImageGeneratorValue::putImage(const IntSize& size, | 110 void CSSImageGeneratorValue::putImage(const IntSize& size, |
| 111 PassRefPtr<Image> image) { | 111 PassRefPtr<Image> image) { |
| 112 m_images.insert(size, std::move(image)); | 112 m_images.insert(size, std::move(image)); |
| 113 } | 113 } |
| 114 | 114 |
| 115 PassRefPtr<Image> CSSImageGeneratorValue::image( | 115 PassRefPtr<Image> CSSImageGeneratorValue::image( |
| 116 const LayoutObject& layoutObject, | 116 const LayoutObject& layoutObject, |
| 117 const IntSize& size, | 117 const IntSize& size, |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 break; | 211 break; |
| 212 case RadialGradientClass: | 212 case RadialGradientClass: |
| 213 toCSSRadialGradientValue(this)->loadSubimages(document); | 213 toCSSRadialGradientValue(this)->loadSubimages(document); |
| 214 break; | 214 break; |
| 215 default: | 215 default: |
| 216 ASSERT_NOT_REACHED(); | 216 ASSERT_NOT_REACHED(); |
| 217 } | 217 } |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace blink | 220 } // namespace blink |
| OLD | NEW |