| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007, 2012 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 CSSStyleSheetResource::MIMETypeCheck mimeTypeCheck = isQuirksModeBehavior(m_
parserContext.mode()) && isSameOriginRequest ? CSSStyleSheetResource::MIMETypeCh
eck::Lax : CSSStyleSheetResource::MIMETypeCheck::Strict; | 283 CSSStyleSheetResource::MIMETypeCheck mimeTypeCheck = isQuirksModeBehavior(m_
parserContext.mode()) && isSameOriginRequest ? CSSStyleSheetResource::MIMETypeCh
eck::Lax : CSSStyleSheetResource::MIMETypeCheck::Strict; |
| 284 String sheetText = cachedStyleSheet->sheetText(mimeTypeCheck); | 284 String sheetText = cachedStyleSheet->sheetText(mimeTypeCheck); |
| 285 | 285 |
| 286 const ResourceResponse& response = cachedStyleSheet->response(); | 286 const ResourceResponse& response = cachedStyleSheet->response(); |
| 287 m_sourceMapURL = response.httpHeaderField("SourceMap"); | 287 m_sourceMapURL = response.httpHeaderField("SourceMap"); |
| 288 if (m_sourceMapURL.isEmpty()) { | 288 if (m_sourceMapURL.isEmpty()) { |
| 289 // Try to get deprecated header. | 289 // Try to get deprecated header. |
| 290 m_sourceMapURL = response.httpHeaderField("X-SourceMap"); | 290 m_sourceMapURL = response.httpHeaderField("X-SourceMap"); |
| 291 } | 291 } |
| 292 | 292 |
| 293 CSSParserContext context(parserContext(), UseCounter::getFrom(this)); | 293 Document* singleOwnerDoc = singleOwnerDocument(); |
| 294 CSSParserContext context(parserContext(), singleOwnerDoc ? singleOwnerDoc->f
rame() : 0, UseCounter::getFrom(this)); |
| 294 CSSParser::parseSheet(context, this, sheetText); | 295 CSSParser::parseSheet(context, this, sheetText); |
| 295 } | 296 } |
| 296 | 297 |
| 297 void StyleSheetContents::parseString(const String& sheetText) | 298 void StyleSheetContents::parseString(const String& sheetText) |
| 298 { | 299 { |
| 299 parseStringAtPosition(sheetText, TextPosition::minimumPosition()); | 300 parseStringAtPosition(sheetText, TextPosition::minimumPosition()); |
| 300 } | 301 } |
| 301 | 302 |
| 302 void StyleSheetContents::parseStringAtPosition(const String& sheetText, const Te
xtPosition& startPosition) | 303 void StyleSheetContents::parseStringAtPosition(const String& sheetText, const Te
xtPosition& startPosition) |
| 303 { | 304 { |
| 304 CSSParserContext context(parserContext(), UseCounter::getFrom(this)); | 305 Document* singleOwnerDoc = singleOwnerDocument(); |
| 306 CSSParserContext context(parserContext(), singleOwnerDoc ? singleOwnerDoc->f
rame() : 0, UseCounter::getFrom(this)); |
| 305 CSSParser::parseSheet(context, this, sheetText); | 307 CSSParser::parseSheet(context, this, sheetText); |
| 306 } | 308 } |
| 307 | 309 |
| 308 bool StyleSheetContents::isLoading() const | 310 bool StyleSheetContents::isLoading() const |
| 309 { | 311 { |
| 310 for (unsigned i = 0; i < m_importRules.size(); ++i) { | 312 for (unsigned i = 0; i < m_importRules.size(); ++i) { |
| 311 if (m_importRules[i]->isLoading()) | 313 if (m_importRules[i]->isLoading()) |
| 312 return true; | 314 return true; |
| 313 } | 315 } |
| 314 return false; | 316 return false; |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 visitor->trace(m_ownerRule); | 627 visitor->trace(m_ownerRule); |
| 626 visitor->trace(m_importRules); | 628 visitor->trace(m_importRules); |
| 627 visitor->trace(m_childRules); | 629 visitor->trace(m_childRules); |
| 628 visitor->trace(m_loadingClients); | 630 visitor->trace(m_loadingClients); |
| 629 visitor->trace(m_completedClients); | 631 visitor->trace(m_completedClients); |
| 630 visitor->trace(m_ruleSet); | 632 visitor->trace(m_ruleSet); |
| 631 #endif | 633 #endif |
| 632 } | 634 } |
| 633 | 635 |
| 634 } | 636 } |
| OLD | NEW |