| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 String sheetText = cachedStyleSheet->sheetText(mimeTypeCheck); | 286 String sheetText = cachedStyleSheet->sheetText(mimeTypeCheck); |
| 287 | 287 |
| 288 const ResourceResponse& response = cachedStyleSheet->response(); | 288 const ResourceResponse& response = cachedStyleSheet->response(); |
| 289 m_sourceMapURL = response.httpHeaderField("SourceMap"); | 289 m_sourceMapURL = response.httpHeaderField("SourceMap"); |
| 290 if (m_sourceMapURL.isEmpty()) { | 290 if (m_sourceMapURL.isEmpty()) { |
| 291 // Try to get deprecated header. | 291 // Try to get deprecated header. |
| 292 m_sourceMapURL = response.httpHeaderField("X-SourceMap"); | 292 m_sourceMapURL = response.httpHeaderField("X-SourceMap"); |
| 293 } | 293 } |
| 294 | 294 |
| 295 CSSParserContext context(parserContext(), UseCounter::getFrom(this)); | 295 CSSParserContext context(parserContext(), UseCounter::getFrom(this)); |
| 296 CSSParser::parseSheet(context, this, sheetText, nullptr); | 296 CSSParser::parseSheet(context, this, sheetText); |
| 297 } | 297 } |
| 298 | 298 |
| 299 void StyleSheetContents::parseString(const String& sheetText) | 299 void StyleSheetContents::parseString(const String& sheetText) |
| 300 { | 300 { |
| 301 parseStringAtPosition(sheetText, TextPosition::minimumPosition()); | 301 parseStringAtPosition(sheetText, TextPosition::minimumPosition()); |
| 302 } | 302 } |
| 303 | 303 |
| 304 void StyleSheetContents::parseStringAtPosition(const String& sheetText, const Te
xtPosition& startPosition) | 304 void StyleSheetContents::parseStringAtPosition(const String& sheetText, const Te
xtPosition& startPosition) |
| 305 { | 305 { |
| 306 CSSParserContext context(parserContext(), UseCounter::getFrom(this)); | 306 CSSParserContext context(parserContext(), UseCounter::getFrom(this)); |
| 307 CSSParser::parseSheet(context, this, sheetText, 0); | 307 CSSParser::parseSheet(context, this, sheetText); |
| 308 } | 308 } |
| 309 | 309 |
| 310 bool StyleSheetContents::isLoading() const | 310 bool StyleSheetContents::isLoading() const |
| 311 { | 311 { |
| 312 for (unsigned i = 0; i < m_importRules.size(); ++i) { | 312 for (unsigned i = 0; i < m_importRules.size(); ++i) { |
| 313 if (m_importRules[i]->isLoading()) | 313 if (m_importRules[i]->isLoading()) |
| 314 return true; | 314 return true; |
| 315 } | 315 } |
| 316 return false; | 316 return false; |
| 317 } | 317 } |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 visitor->trace(m_ownerRule); | 639 visitor->trace(m_ownerRule); |
| 640 visitor->trace(m_importRules); | 640 visitor->trace(m_importRules); |
| 641 visitor->trace(m_childRules); | 641 visitor->trace(m_childRules); |
| 642 visitor->trace(m_loadingClients); | 642 visitor->trace(m_loadingClients); |
| 643 visitor->trace(m_completedClients); | 643 visitor->trace(m_completedClients); |
| 644 visitor->trace(m_ruleSet); | 644 visitor->trace(m_ruleSet); |
| 645 #endif | 645 #endif |
| 646 } | 646 } |
| 647 | 647 |
| 648 } | 648 } |
| OLD | NEW |