OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 CSSImageSetValue::CSSImageSetValue() | 45 CSSImageSetValue::CSSImageSetValue() |
46 : CSSValueList(ImageSetClass, CommaSeparator) | 46 : CSSValueList(ImageSetClass, CommaSeparator) |
47 , m_accessedBestFitImage(false) | 47 , m_accessedBestFitImage(false) |
48 , m_scaleFactor(1) | 48 , m_scaleFactor(1) |
49 { | 49 { |
50 } | 50 } |
51 | 51 |
52 CSSImageSetValue::~CSSImageSetValue() | 52 CSSImageSetValue::~CSSImageSetValue() |
53 { | 53 { |
| 54 if (m_imageSet && m_imageSet->isCachedImageSet()) |
| 55 static_cast<StyleCachedImageSet*>(m_imageSet.get())->clearImageSetValue(
); |
54 } | 56 } |
55 | 57 |
56 void CSSImageSetValue::fillImageSet() | 58 void CSSImageSetValue::fillImageSet() |
57 { | 59 { |
58 size_t length = this->length(); | 60 size_t length = this->length(); |
59 size_t i = 0; | 61 size_t i = 0; |
60 while (i < length) { | 62 while (i < length) { |
61 CSSValue* imageValue = item(i); | 63 CSSValue* imageValue = item(i); |
62 ASSERT(imageValue->isImageValue()); | 64 ASSERT(imageValue->isImageValue()); |
63 String imageURL = static_cast<CSSImageValue*>(imageValue)->url(); | 65 String imageURL = static_cast<CSSImageValue*>(imageValue)->url(); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 202 |
201 void CSSImageSetValue::ImageWithScale::reportMemoryUsage(MemoryObjectInfo* memor
yObjectInfo) const | 203 void CSSImageSetValue::ImageWithScale::reportMemoryUsage(MemoryObjectInfo* memor
yObjectInfo) const |
202 { | 204 { |
203 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | 205 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); |
204 info.addMember(imageURL); | 206 info.addMember(imageURL); |
205 } | 207 } |
206 | 208 |
207 } // namespace WebCore | 209 } // namespace WebCore |
208 | 210 |
209 #endif // ENABLE(CSS_IMAGE_SET) | 211 #endif // ENABLE(CSS_IMAGE_SET) |
OLD | NEW |