OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2002, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2002, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 135 } |
136 | 136 |
137 if (parentSheet->isUserStyleSheet()) | 137 if (parentSheet->isUserStyleSheet()) |
138 m_cachedSheet = cachedResourceLoader->requestUserCSSStyleSheet(absHref,
parentSheet->charset()); | 138 m_cachedSheet = cachedResourceLoader->requestUserCSSStyleSheet(absHref,
parentSheet->charset()); |
139 else | 139 else |
140 m_cachedSheet = cachedResourceLoader->requestCSSStyleSheet(absHref, pare
ntSheet->charset()); | 140 m_cachedSheet = cachedResourceLoader->requestCSSStyleSheet(absHref, pare
ntSheet->charset()); |
141 if (m_cachedSheet) { | 141 if (m_cachedSheet) { |
142 // if the import rule is issued dynamically, the sheet may be | 142 // if the import rule is issued dynamically, the sheet may be |
143 // removed from the pending sheet count, so let the doc know | 143 // removed from the pending sheet count, so let the doc know |
144 // the sheet being imported is pending. | 144 // the sheet being imported is pending. |
145 if (parentSheet && parentSheet->loadCompleted() && root == parentSheet) | 145 if (parentSheet && parentSheet->loadCompleted() && parentSheet->document
()) |
146 parentSheet->document()->addPendingSheet(); | 146 parentSheet->document()->addPendingSheet(); |
147 m_loading = true; | 147 m_loading = true; |
148 m_cachedSheet->addClient(this); | 148 m_cachedSheet->addClient(this); |
149 } | 149 } |
150 } | 150 } |
151 | 151 |
152 String CSSImportRule::cssText() const | 152 String CSSImportRule::cssText() const |
153 { | 153 { |
154 String result = "@import url(\""; | 154 String result = "@import url(\""; |
155 result += m_strHref; | 155 result += m_strHref; |
156 result += "\")"; | 156 result += "\")"; |
157 | 157 |
158 if (m_lstMedia) { | 158 if (m_lstMedia) { |
159 result += " "; | 159 result += " "; |
160 result += m_lstMedia->mediaText(); | 160 result += m_lstMedia->mediaText(); |
161 } | 161 } |
162 result += ";"; | 162 result += ";"; |
163 | 163 |
164 return result; | 164 return result; |
165 } | 165 } |
166 | 166 |
167 void CSSImportRule::addSubresourceStyleURLs(ListHashSet<KURL>& urls) | 167 void CSSImportRule::addSubresourceStyleURLs(ListHashSet<KURL>& urls) |
168 { | 168 { |
169 if (m_styleSheet) | 169 if (m_styleSheet) |
170 addSubresourceURL(urls, m_styleSheet->baseURL()); | 170 addSubresourceURL(urls, m_styleSheet->baseURL()); |
171 } | 171 } |
172 | 172 |
173 } // namespace WebCore | 173 } // namespace WebCore |
OLD | NEW |