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