| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 ASSERT(layoutObject); | 68 ASSERT(layoutObject); |
| 69 LayoutObjectSizeCountMap::iterator it = m_clients.find(layoutObject); | 69 LayoutObjectSizeCountMap::iterator it = m_clients.find(layoutObject); |
| 70 SECURITY_DCHECK(it != m_clients.end()); | 70 SECURITY_DCHECK(it != m_clients.end()); |
| 71 | 71 |
| 72 IntSize removedImageSize; | 72 IntSize removedImageSize; |
| 73 SizeAndCount& sizeCount = it->value; | 73 SizeAndCount& sizeCount = it->value; |
| 74 IntSize size = sizeCount.size; | 74 IntSize size = sizeCount.size; |
| 75 if (!size.isEmpty()) { | 75 if (!size.isEmpty()) { |
| 76 m_sizes.remove(size); | 76 m_sizes.remove(size); |
| 77 if (!m_sizes.contains(size)) | 77 if (!m_sizes.contains(size)) |
| 78 m_images.remove(size); | 78 m_images.erase(size); |
| 79 } | 79 } |
| 80 | 80 |
| 81 if (!--sizeCount.count) | 81 if (!--sizeCount.count) |
| 82 m_clients.remove(layoutObject); | 82 m_clients.erase(layoutObject); |
| 83 | 83 |
| 84 if (m_clients.isEmpty()) { | 84 if (m_clients.isEmpty()) { |
| 85 ASSERT(m_keepAlive); | 85 ASSERT(m_keepAlive); |
| 86 m_keepAlive.clear(); | 86 m_keepAlive.clear(); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 Image* CSSImageGeneratorValue::getImage(const LayoutObject* layoutObject, | 90 Image* CSSImageGeneratorValue::getImage(const LayoutObject* layoutObject, |
| 91 const IntSize& size) { | 91 const IntSize& size) { |
| 92 LayoutObjectSizeCountMap::iterator it = m_clients.find(layoutObject); | 92 LayoutObjectSizeCountMap::iterator it = m_clients.find(layoutObject); |
| (...skipping 118 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 |