| 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 17 matching lines...) Expand all Loading... |
| 28 #include "core/fetch/ImageResource.h" | 28 #include "core/fetch/ImageResource.h" |
| 29 #include "core/style/StyleFetchedImage.h" | 29 #include "core/style/StyleFetchedImage.h" |
| 30 #include "core/style/StylePendingImage.h" | 30 #include "core/style/StylePendingImage.h" |
| 31 #include "core/loader/MixedContentChecker.h" | 31 #include "core/loader/MixedContentChecker.h" |
| 32 #include "platform/weborigin/KURL.h" | 32 #include "platform/weborigin/KURL.h" |
| 33 #include "platform/weborigin/SecurityPolicy.h" | 33 #include "platform/weborigin/SecurityPolicy.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 CSSImageValue::CSSImageValue(const String& rawValue, const KURL& url, StyleImage
* image) | 37 CSSImageValue::CSSImageValue(const String& rawValue, const KURL& url, StyleImage
* image) |
| 38 : CSSValue(ImageClass) | 38 : CSSValueObject(ImageClass) |
| 39 , m_relativeURL(rawValue) | 39 , m_relativeURL(rawValue) |
| 40 , m_absoluteURL(url.string()) | 40 , m_absoluteURL(url.string()) |
| 41 , m_image(image) | 41 , m_image(image) |
| 42 , m_accessedImage(image) | 42 , m_accessedImage(image) |
| 43 { | 43 { |
| 44 } | 44 } |
| 45 | 45 |
| 46 CSSImageValue::~CSSImageValue() | 46 CSSImageValue::~CSSImageValue() |
| 47 { | 47 { |
| 48 } | 48 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return "url(" + quoteCSSURLIfNeeded(m_absoluteURL) + ")"; | 111 return "url(" + quoteCSSURLIfNeeded(m_absoluteURL) + ")"; |
| 112 } | 112 } |
| 113 | 113 |
| 114 bool CSSImageValue::knownToBeOpaque(const LayoutObject* layoutObject) const | 114 bool CSSImageValue::knownToBeOpaque(const LayoutObject* layoutObject) const |
| 115 { | 115 { |
| 116 return m_image ? m_image->knownToBeOpaque(layoutObject) : false; | 116 return m_image ? m_image->knownToBeOpaque(layoutObject) : false; |
| 117 } | 117 } |
| 118 | 118 |
| 119 DEFINE_TRACE_AFTER_DISPATCH(CSSImageValue) | 119 DEFINE_TRACE_AFTER_DISPATCH(CSSImageValue) |
| 120 { | 120 { |
| 121 CSSValue::traceAfterDispatch(visitor); | 121 CSSValueObject::traceAfterDispatch(visitor); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void CSSImageValue::reResolveURL(const Document& document) | 124 void CSSImageValue::reResolveURL(const Document& document) |
| 125 { | 125 { |
| 126 KURL url = document.completeURL(m_relativeURL); | 126 KURL url = document.completeURL(m_relativeURL); |
| 127 if (url == m_absoluteURL) | 127 if (url == m_absoluteURL) |
| 128 return; | 128 return; |
| 129 m_absoluteURL = url.string(); | 129 m_absoluteURL = url.string(); |
| 130 m_accessedImage = false; | 130 m_accessedImage = false; |
| 131 m_image.clear(); | 131 m_image.clear(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |