OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "CSSValueKeywords.h" | 26 #include "CSSValueKeywords.h" |
27 #include "CachedImage.h" | 27 #include "CachedImage.h" |
28 #include "CachedResourceLoader.h" | 28 #include "CachedResourceLoader.h" |
29 #include "CachedResourceRequest.h" | 29 #include "CachedResourceRequest.h" |
30 #include "CachedResourceRequestInitiators.h" | 30 #include "CachedResourceRequestInitiators.h" |
31 #include "Document.h" | 31 #include "Document.h" |
32 #include "Element.h" | 32 #include "Element.h" |
33 #include "MemoryCache.h" | 33 #include "MemoryCache.h" |
34 #include "StyleCachedImage.h" | 34 #include "StyleCachedImage.h" |
35 #include "StylePendingImage.h" | 35 #include "StylePendingImage.h" |
36 #include "WebCoreMemoryInstrumentation.h" | |
37 | 36 |
38 namespace WebCore { | 37 namespace WebCore { |
39 | 38 |
40 CSSImageValue::CSSImageValue(const String& url) | 39 CSSImageValue::CSSImageValue(const String& url) |
41 : CSSValue(ImageClass) | 40 : CSSValue(ImageClass) |
42 , m_url(url) | 41 , m_url(url) |
43 , m_accessedImage(false) | 42 , m_accessedImage(false) |
44 { | 43 { |
45 } | 44 } |
46 | 45 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 } | 103 } |
105 | 104 |
106 PassRefPtr<CSSValue> CSSImageValue::cloneForCSSOM() const | 105 PassRefPtr<CSSValue> CSSImageValue::cloneForCSSOM() const |
107 { | 106 { |
108 // NOTE: We expose CSSImageValues as URI primitive values in CSSOM to mainta
in old behavior. | 107 // NOTE: We expose CSSImageValues as URI primitive values in CSSOM to mainta
in old behavior. |
109 RefPtr<CSSPrimitiveValue> uriValue = CSSPrimitiveValue::create(m_url, CSSPri
mitiveValue::CSS_URI); | 108 RefPtr<CSSPrimitiveValue> uriValue = CSSPrimitiveValue::create(m_url, CSSPri
mitiveValue::CSS_URI); |
110 uriValue->setCSSOMSafe(); | 109 uriValue->setCSSOMSafe(); |
111 return uriValue.release(); | 110 return uriValue.release(); |
112 } | 111 } |
113 | 112 |
114 void CSSImageValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectIn
fo) const | |
115 { | |
116 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | |
117 info.addMember(m_url, "url"); | |
118 // No need to report m_image as it is counted as part of RenderArena. | |
119 } | |
120 | |
121 bool CSSImageValue::knownToBeOpaque(const RenderObject* renderer) const | 113 bool CSSImageValue::knownToBeOpaque(const RenderObject* renderer) const |
122 { | 114 { |
123 return m_image ? m_image->knownToBeOpaque(renderer) : false; | 115 return m_image ? m_image->knownToBeOpaque(renderer) : false; |
124 } | 116 } |
125 | 117 |
126 } // namespace WebCore | 118 } // namespace WebCore |
OLD | NEW |