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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 DCHECK(m_isCSS); | 201 DCHECK(m_isCSS); |
202 CSSParserContext parserContext(document(), nullptr, baseURL, charset); | 202 CSSParserContext parserContext(document(), nullptr, baseURL, charset); |
203 | 203 |
204 StyleSheetContents* newSheet = StyleSheetContents::create(href, parserContex
t); | 204 StyleSheetContents* newSheet = StyleSheetContents::create(href, parserContex
t); |
205 | 205 |
206 CSSStyleSheet* cssSheet = CSSStyleSheet::create(newSheet, this); | 206 CSSStyleSheet* cssSheet = CSSStyleSheet::create(newSheet, this); |
207 cssSheet->setDisabled(m_alternate); | 207 cssSheet->setDisabled(m_alternate); |
208 cssSheet->setTitle(m_title); | 208 cssSheet->setTitle(m_title); |
209 if (!m_alternate && !m_title.isEmpty()) | 209 if (!m_alternate && !m_title.isEmpty()) |
210 document().styleEngine().setPreferredStylesheetSetNameIfNotSet(m_title); | 210 document().styleEngine().setPreferredStylesheetSetNameIfNotSet(m_title,
StyleEngine::DontUpdateActiveSheets); |
211 cssSheet->setMediaQueries(MediaQuerySet::create(m_media)); | 211 cssSheet->setMediaQueries(MediaQuerySet::create(m_media)); |
212 | 212 |
213 m_sheet = cssSheet; | 213 m_sheet = cssSheet; |
214 | 214 |
215 // We don't need the cross-origin security check here because we are | 215 // We don't need the cross-origin security check here because we are |
216 // getting the sheet text in "strict" mode. This enforces a valid CSS MIME | 216 // getting the sheet text in "strict" mode. This enforces a valid CSS MIME |
217 // type. | 217 // type. |
218 parseStyleSheet(sheet->sheetText()); | 218 parseStyleSheet(sheet->sheetText()); |
219 } | 219 } |
220 | 220 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 | 297 |
298 DEFINE_TRACE(ProcessingInstruction) | 298 DEFINE_TRACE(ProcessingInstruction) |
299 { | 299 { |
300 visitor->trace(m_sheet); | 300 visitor->trace(m_sheet); |
301 visitor->trace(m_listenerForXSLT); | 301 visitor->trace(m_listenerForXSLT); |
302 CharacterData::trace(visitor); | 302 CharacterData::trace(visitor); |
303 ResourceOwner<StyleSheetResource>::trace(visitor); | 303 ResourceOwner<StyleSheetResource>::trace(visitor); |
304 } | 304 } |
305 | 305 |
306 } // namespace blink | 306 } // namespace blink |
OLD | NEW |