| 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, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 StyleImage* image = 0) { | 49 StyleImage* image = 0) { |
| 50 return new CSSImageValue(rawValue, url, image); | 50 return new CSSImageValue(rawValue, url, image); |
| 51 } | 51 } |
| 52 static CSSImageValue* create(const AtomicString& absoluteURL) { | 52 static CSSImageValue* create(const AtomicString& absoluteURL) { |
| 53 return new CSSImageValue(absoluteURL); | 53 return new CSSImageValue(absoluteURL); |
| 54 } | 54 } |
| 55 ~CSSImageValue(); | 55 ~CSSImageValue(); |
| 56 | 56 |
| 57 bool isCachePending() const { return !m_cachedImage; } | 57 bool isCachePending() const { return !m_cachedImage; } |
| 58 StyleImage* cachedImage() const { | 58 StyleImage* cachedImage() const { |
| 59 ASSERT(!isCachePending()); | 59 DCHECK(!isCachePending()); |
| 60 return m_cachedImage.get(); | 60 return m_cachedImage.get(); |
| 61 } | 61 } |
| 62 StyleImage* cacheImage( | 62 StyleImage* cacheImage( |
| 63 const Document&, | 63 const Document&, |
| 64 CrossOriginAttributeValue = CrossOriginAttributeNotSet); | 64 CrossOriginAttributeValue = CrossOriginAttributeNotSet); |
| 65 | 65 |
| 66 const String& url() const { return m_absoluteURL; } | 66 const String& url() const { return m_absoluteURL; } |
| 67 | 67 |
| 68 void setReferrer(const Referrer& referrer) { m_referrer = referrer; } | 68 void setReferrer(const Referrer& referrer) { m_referrer = referrer; } |
| 69 const Referrer& referrer() const { return m_referrer; } | 69 const Referrer& referrer() const { return m_referrer; } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 98 // Cached image data. | 98 // Cached image data. |
| 99 mutable AtomicString m_absoluteURL; | 99 mutable AtomicString m_absoluteURL; |
| 100 mutable Member<StyleImage> m_cachedImage; | 100 mutable Member<StyleImage> m_cachedImage; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageValue, isImageValue()); | 103 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageValue, isImageValue()); |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| 106 | 106 |
| 107 #endif // CSSImageValue_h | 107 #endif // CSSImageValue_h |
| OLD | NEW |