| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 const String& href, | 188 const String& href, |
| 189 const KURL& baseURL, | 189 const KURL& baseURL, |
| 190 const String& charset, | 190 const String& charset, |
| 191 const CSSStyleSheetResource* sheet) { | 191 const CSSStyleSheetResource* sheet) { |
| 192 if (!isConnected()) { | 192 if (!isConnected()) { |
| 193 DCHECK(!m_sheet); | 193 DCHECK(!m_sheet); |
| 194 return; | 194 return; |
| 195 } | 195 } |
| 196 | 196 |
| 197 DCHECK(m_isCSS); | 197 DCHECK(m_isCSS); |
| 198 CSSParserContext parserContext(document(), nullptr, baseURL, charset); | 198 CSSParserContext* parserContext = |
| 199 CSSParserContext::create(document(), baseURL, charset); |
| 199 | 200 |
| 200 StyleSheetContents* newSheet = | 201 StyleSheetContents* newSheet = |
| 201 StyleSheetContents::create(href, parserContext); | 202 StyleSheetContents::create(href, parserContext); |
| 202 | 203 |
| 203 CSSStyleSheet* cssSheet = CSSStyleSheet::create(newSheet, *this); | 204 CSSStyleSheet* cssSheet = CSSStyleSheet::create(newSheet, *this); |
| 204 cssSheet->setDisabled(m_alternate); | 205 cssSheet->setDisabled(m_alternate); |
| 205 cssSheet->setTitle(m_title); | 206 cssSheet->setTitle(m_title); |
| 206 if (!m_alternate && !m_title.isEmpty()) | 207 if (!m_alternate && !m_title.isEmpty()) |
| 207 document().styleEngine().setPreferredStylesheetSetNameIfNotSet(m_title); | 208 document().styleEngine().setPreferredStylesheetSetNameIfNotSet(m_title); |
| 208 cssSheet->setMediaQueries(MediaQuerySet::create(m_media)); | 209 cssSheet->setMediaQueries(MediaQuerySet::create(m_media)); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 } | 292 } |
| 292 | 293 |
| 293 DEFINE_TRACE(ProcessingInstruction) { | 294 DEFINE_TRACE(ProcessingInstruction) { |
| 294 visitor->trace(m_sheet); | 295 visitor->trace(m_sheet); |
| 295 visitor->trace(m_listenerForXSLT); | 296 visitor->trace(m_listenerForXSLT); |
| 296 CharacterData::trace(visitor); | 297 CharacterData::trace(visitor); |
| 297 ResourceOwner<StyleSheetResource>::trace(visitor); | 298 ResourceOwner<StyleSheetResource>::trace(visitor); |
| 298 } | 299 } |
| 299 | 300 |
| 300 } // namespace blink | 301 } // namespace blink |
| OLD | NEW |