| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Rob Buis | 2 * Copyright (C) 2006, 2007 Rob Buis |
| 3 * Copyright (C) 2008 Apple, Inc. All rights reserved. | 3 * Copyright (C) 2008 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 // If type is empty or CSS, this is a CSS style sheet. | 188 // If type is empty or CSS, this is a CSS style sheet. |
| 189 const AtomicString& type = this->type(); | 189 const AtomicString& type = this->type(); |
| 190 if (isCSS(e, type) && passesContentSecurityPolicyChecks) { | 190 if (isCSS(e, type) && passesContentSecurityPolicyChecks) { |
| 191 RefPtrWillBeRawPtr<MediaQuerySet> mediaQueries = MediaQuerySet::create(m
edia()); | 191 RefPtrWillBeRawPtr<MediaQuerySet> mediaQueries = MediaQuerySet::create(m
edia()); |
| 192 | 192 |
| 193 MediaQueryEvaluator screenEval("screen", true); | 193 MediaQueryEvaluator screenEval("screen", true); |
| 194 MediaQueryEvaluator printEval("print", true); | 194 MediaQueryEvaluator printEval("print", true); |
| 195 if (screenEval.eval(mediaQueries.get()) || printEval.eval(mediaQueries.g
et())) { | 195 if (screenEval.eval(mediaQueries.get()) || printEval.eval(mediaQueries.g
et())) { |
| 196 m_loading = true; | 196 m_loading = true; |
| 197 TextPosition startPosition = m_startPosition == TextPosition::belowR
angePosition() ? TextPosition::minimumPosition() : m_startPosition; | 197 TextPosition startPosition = m_startPosition == TextPosition::belowR
angePosition() ? TextPosition::minimumPosition() : m_startPosition; |
| 198 m_sheet = document.styleEngine().createSheet(e, text, startPosition,
m_createdByParser); | 198 m_sheet = document.styleEngine().createSheet(e, text, startPosition)
; |
| 199 m_sheet->setMediaQueries(mediaQueries.release()); | 199 m_sheet->setMediaQueries(mediaQueries.release()); |
| 200 m_loading = false; | 200 m_loading = false; |
| 201 } | 201 } |
| 202 } | 202 } |
| 203 | 203 |
| 204 if (m_sheet) | 204 if (m_sheet) |
| 205 m_sheet->contents()->checkLoaded(); | 205 m_sheet->contents()->checkLoaded(); |
| 206 | 206 |
| 207 return passesContentSecurityPolicyChecks ? ProcessingSuccessful : Processing
FatalError; | 207 return passesContentSecurityPolicyChecks ? ProcessingSuccessful : Processing
FatalError; |
| 208 } | 208 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 227 { | 227 { |
| 228 document.styleEngine().addPendingSheet(); | 228 document.styleEngine().addPendingSheet(); |
| 229 } | 229 } |
| 230 | 230 |
| 231 DEFINE_TRACE(StyleElement) | 231 DEFINE_TRACE(StyleElement) |
| 232 { | 232 { |
| 233 visitor->trace(m_sheet); | 233 visitor->trace(m_sheet); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } | 236 } |
| OLD | NEW |