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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 bool CSSImageValue::equals(const CSSImageValue& other) const | 102 bool CSSImageValue::equals(const CSSImageValue& other) const |
103 { | 103 { |
104 return m_absoluteURL == other.m_absoluteURL; | 104 return m_absoluteURL == other.m_absoluteURL; |
105 } | 105 } |
106 | 106 |
107 String CSSImageValue::customCSSText() const | 107 String CSSImageValue::customCSSText() const |
108 { | 108 { |
109 return "url(" + quoteCSSURLIfNeeded(m_absoluteURL) + ")"; | 109 return "url(" + quoteCSSURLIfNeeded(m_absoluteURL) + ")"; |
110 } | 110 } |
111 | 111 |
112 PassRefPtrWillBeRawPtr<CSSValue> CSSImageValue::cloneForCSSOM() const | |
113 { | |
114 // NOTE: We expose CSSImageValues as URI primitive values in CSSOM to mainta
in old behavior. | |
115 RefPtrWillBeRawPtr<CSSPrimitiveValue> uriValue = CSSPrimitiveValue::create(m
_absoluteURL, CSSPrimitiveValue::CSS_URI); | |
116 uriValue->setCSSOMSafe(); | |
117 return uriValue.release(); | |
118 } | |
119 | |
120 bool CSSImageValue::knownToBeOpaque(const RenderObject* renderer) const | 112 bool CSSImageValue::knownToBeOpaque(const RenderObject* renderer) const |
121 { | 113 { |
122 return m_image ? m_image->knownToBeOpaque(renderer) : false; | 114 return m_image ? m_image->knownToBeOpaque(renderer) : false; |
123 } | 115 } |
124 | 116 |
125 void CSSImageValue::traceAfterDispatch(Visitor* visitor) | 117 void CSSImageValue::traceAfterDispatch(Visitor* visitor) |
126 { | 118 { |
127 CSSValue::traceAfterDispatch(visitor); | 119 CSSValue::traceAfterDispatch(visitor); |
128 } | 120 } |
129 | 121 |
130 void CSSImageValue::reResolveURL(const Document& document) | 122 void CSSImageValue::reResolveURL(const Document& document) |
131 { | 123 { |
132 KURL url = document.completeURL(m_relativeURL); | 124 KURL url = document.completeURL(m_relativeURL); |
133 if (url == m_absoluteURL) | 125 if (url == m_absoluteURL) |
134 return; | 126 return; |
135 m_absoluteURL = url.string(); | 127 m_absoluteURL = url.string(); |
136 m_accessedImage = false; | 128 m_accessedImage = false; |
137 m_image.clear(); | 129 m_image.clear(); |
138 } | 130 } |
139 | 131 |
140 } // namespace blink | 132 } // namespace blink |
OLD | NEW |