| 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, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #ifndef CSSImageValue_h | 21 #ifndef CSSImageValue_h |
| 22 #define CSSImageValue_h | 22 #define CSSImageValue_h |
| 23 | 23 |
| 24 #include "core/CoreExport.h" | 24 #include "core/CoreExport.h" |
| 25 #include "core/css/CSSValue.h" | 25 #include "core/css/CSSValue.h" |
| 26 #include "platform/CrossOriginAttributeValue.h" | 26 #include "platform/CrossOriginAttributeValue.h" |
| 27 #include "platform/loader/fetch/FetchParameters.h" |
| 27 #include "platform/weborigin/Referrer.h" | 28 #include "platform/weborigin/Referrer.h" |
| 28 #include "platform/wtf/RefPtr.h" | 29 #include "platform/wtf/RefPtr.h" |
| 29 | 30 |
| 30 namespace blink { | 31 namespace blink { |
| 31 | 32 |
| 32 class Document; | 33 class Document; |
| 33 class KURL; | 34 class KURL; |
| 34 class StyleImage; | 35 class StyleImage; |
| 35 class ComputedStyle; | 36 class ComputedStyle; |
| 36 | 37 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 56 } | 57 } |
| 57 ~CSSImageValue(); | 58 ~CSSImageValue(); |
| 58 | 59 |
| 59 bool IsCachePending() const { return !cached_image_; } | 60 bool IsCachePending() const { return !cached_image_; } |
| 60 StyleImage* CachedImage() const { | 61 StyleImage* CachedImage() const { |
| 61 DCHECK(!IsCachePending()); | 62 DCHECK(!IsCachePending()); |
| 62 return cached_image_.Get(); | 63 return cached_image_.Get(); |
| 63 } | 64 } |
| 64 StyleImage* CacheImage( | 65 StyleImage* CacheImage( |
| 65 const Document&, | 66 const Document&, |
| 67 FetchParameters::PlaceholderImageRequestType, |
| 66 CrossOriginAttributeValue = kCrossOriginAttributeNotSet); | 68 CrossOriginAttributeValue = kCrossOriginAttributeNotSet); |
| 67 | 69 |
| 68 const String& Url() const { return absolute_url_; } | 70 const String& Url() const { return absolute_url_; } |
| 69 | 71 |
| 70 const Referrer& GetReferrer() const { return referrer_; } | 72 const Referrer& GetReferrer() const { return referrer_; } |
| 71 | 73 |
| 72 void ReResolveURL(const Document&) const; | 74 void ReResolveURL(const Document&) const; |
| 73 | 75 |
| 74 String CustomCSSText() const; | 76 String CustomCSSText() const; |
| 75 | 77 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 102 // Cached image data. | 104 // Cached image data. |
| 103 mutable AtomicString absolute_url_; | 105 mutable AtomicString absolute_url_; |
| 104 mutable Member<StyleImage> cached_image_; | 106 mutable Member<StyleImage> cached_image_; |
| 105 }; | 107 }; |
| 106 | 108 |
| 107 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageValue, IsImageValue()); | 109 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageValue, IsImageValue()); |
| 108 | 110 |
| 109 } // namespace blink | 111 } // namespace blink |
| 110 | 112 |
| 111 #endif // CSSImageValue_h | 113 #endif // CSSImageValue_h |
| OLD | NEW |