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 20 matching lines...) Expand all Loading... |
31 #include "CSSImageValue.h" | 31 #include "CSSImageValue.h" |
32 #include "CSSPrimitiveValue.h" | 32 #include "CSSPrimitiveValue.h" |
33 #include "CachedImage.h" | 33 #include "CachedImage.h" |
34 #include "CachedResourceLoader.h" | 34 #include "CachedResourceLoader.h" |
35 #include "CachedResourceRequest.h" | 35 #include "CachedResourceRequest.h" |
36 #include "CachedResourceRequestInitiators.h" | 36 #include "CachedResourceRequestInitiators.h" |
37 #include "Document.h" | 37 #include "Document.h" |
38 #include "Page.h" | 38 #include "Page.h" |
39 #include "StyleCachedImageSet.h" | 39 #include "StyleCachedImageSet.h" |
40 #include "StylePendingImage.h" | 40 #include "StylePendingImage.h" |
41 #include "WebCoreMemoryInstrumentation.h" | 41 #include <wtf/text/StringBuilder.h> |
42 #include <wtf/MemoryInstrumentationVector.h> | |
43 | 42 |
44 namespace WebCore { | 43 namespace WebCore { |
45 | 44 |
46 CSSImageSetValue::CSSImageSetValue() | 45 CSSImageSetValue::CSSImageSetValue() |
47 : CSSValueList(ImageSetClass, CommaSeparator) | 46 : CSSValueList(ImageSetClass, CommaSeparator) |
48 , m_accessedBestFitImage(false) | 47 , m_accessedBestFitImage(false) |
49 , m_scaleFactor(1) | 48 , m_scaleFactor(1) |
50 { | 49 { |
51 } | 50 } |
52 | 51 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 , m_scaleFactor(1) | 187 , m_scaleFactor(1) |
189 { | 188 { |
190 // Non-CSSValueList data is not accessible through CSS OM, no need to clone. | 189 // Non-CSSValueList data is not accessible through CSS OM, no need to clone. |
191 } | 190 } |
192 | 191 |
193 PassRefPtr<CSSImageSetValue> CSSImageSetValue::cloneForCSSOM() const | 192 PassRefPtr<CSSImageSetValue> CSSImageSetValue::cloneForCSSOM() const |
194 { | 193 { |
195 return adoptRef(new CSSImageSetValue(*this)); | 194 return adoptRef(new CSSImageSetValue(*this)); |
196 } | 195 } |
197 | 196 |
198 void CSSImageSetValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjec
tInfo) const | |
199 { | |
200 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | |
201 CSSValueList::reportDescendantMemoryUsage(memoryObjectInfo); | |
202 info.addMember(m_imagesInSet, "imagesInSet"); | |
203 } | |
204 | |
205 void CSSImageSetValue::ImageWithScale::reportMemoryUsage(MemoryObjectInfo* memor
yObjectInfo) const | |
206 { | |
207 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | |
208 info.addMember(imageURL, "imageURL"); | |
209 } | |
210 | |
211 } // namespace WebCore | 197 } // namespace WebCore |
212 | 198 |
213 #endif // ENABLE(CSS_IMAGE_SET) | 199 #endif // ENABLE(CSS_IMAGE_SET) |
OLD | NEW |