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, 2006, 2007 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 157 } |
158 | 158 |
159 void CSSStyleSheet::deleteRule(unsigned index, ExceptionCode& ec) | 159 void CSSStyleSheet::deleteRule(unsigned index, ExceptionCode& ec) |
160 { | 160 { |
161 if (index >= length()) { | 161 if (index >= length()) { |
162 ec = INDEX_SIZE_ERR; | 162 ec = INDEX_SIZE_ERR; |
163 return; | 163 return; |
164 } | 164 } |
165 | 165 |
166 ec = 0; | 166 ec = 0; |
| 167 item(index)->setParent(0); |
167 remove(index); | 168 remove(index); |
168 styleSheetChanged(); | 169 styleSheetChanged(); |
169 } | 170 } |
170 | 171 |
171 void CSSStyleSheet::addNamespace(CSSParser* p, const AtomicString& prefix, const
AtomicString& uri) | 172 void CSSStyleSheet::addNamespace(CSSParser* p, const AtomicString& prefix, const
AtomicString& uri) |
172 { | 173 { |
173 if (uri.isNull()) | 174 if (uri.isNull()) |
174 return; | 175 return; |
175 | 176 |
176 m_namespaces = adoptPtr(new CSSNamespace(prefix, uri, m_namespaces.release()
)); | 177 m_namespaces = adoptPtr(new CSSNamespace(prefix, uri, m_namespaces.release()
)); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 if (rule->isImportRule()) { | 276 if (rule->isImportRule()) { |
276 if (CSSStyleSheet* ruleStyleSheet = static_cast<CSSImportRule*>(
rule)->styleSheet()) | 277 if (CSSStyleSheet* ruleStyleSheet = static_cast<CSSImportRule*>(
rule)->styleSheet()) |
277 styleSheetQueue.append(ruleStyleSheet); | 278 styleSheetQueue.append(ruleStyleSheet); |
278 } | 279 } |
279 rule->addSubresourceStyleURLs(urls); | 280 rule->addSubresourceStyleURLs(urls); |
280 } | 281 } |
281 } | 282 } |
282 } | 283 } |
283 | 284 |
284 } | 285 } |
OLD | NEW |