OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) |
3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2008, 2009 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 } | 176 } |
177 | 177 |
178 void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& bas
eURL, const String& charset, const CSSStyleSheetResource* sheet) | 178 void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& bas
eURL, const String& charset, const CSSStyleSheetResource* sheet) |
179 { | 179 { |
180 if (!inDocument()) { | 180 if (!inDocument()) { |
181 ASSERT(!m_sheet); | 181 ASSERT(!m_sheet); |
182 return; | 182 return; |
183 } | 183 } |
184 | 184 |
185 ASSERT(m_isCSS); | 185 ASSERT(m_isCSS); |
186 CSSParserContext parserContext(&document(), baseURL, charset); | 186 CSSParserContext parserContext(document(), baseURL, charset); |
187 | 187 |
188 RefPtr<StyleSheetContents> newSheet = StyleSheetContents::create(href, parse
rContext); | 188 RefPtr<StyleSheetContents> newSheet = StyleSheetContents::create(href, parse
rContext); |
189 | 189 |
190 RefPtr<CSSStyleSheet> cssSheet = CSSStyleSheet::create(newSheet, this); | 190 RefPtr<CSSStyleSheet> cssSheet = CSSStyleSheet::create(newSheet, this); |
191 cssSheet->setDisabled(m_alternate); | 191 cssSheet->setDisabled(m_alternate); |
192 cssSheet->setTitle(m_title); | 192 cssSheet->setTitle(m_title); |
193 cssSheet->setMediaQueries(MediaQuerySet::create(m_media)); | 193 cssSheet->setMediaQueries(MediaQuerySet::create(m_media)); |
194 | 194 |
195 m_sheet = cssSheet.release(); | 195 m_sheet = cssSheet.release(); |
196 | 196 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 document().removedStyleSheet(removedSheet.get()); | 274 document().removedStyleSheet(removedSheet.get()); |
275 } | 275 } |
276 | 276 |
277 void ProcessingInstruction::finishParsingChildren() | 277 void ProcessingInstruction::finishParsingChildren() |
278 { | 278 { |
279 m_createdByParser = false; | 279 m_createdByParser = false; |
280 CharacterData::finishParsingChildren(); | 280 CharacterData::finishParsingChildren(); |
281 } | 281 } |
282 | 282 |
283 } // namespace | 283 } // namespace |
OLD | NEW |