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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 if (prefix == starAtom) | 276 if (prefix == starAtom) |
277 return starAtom; // We'll match any namespace. | 277 return starAtom; // We'll match any namespace. |
278 return m_namespaces.get(prefix); | 278 return m_namespaces.get(prefix); |
279 } | 279 } |
280 | 280 |
281 void StyleSheetContents::parseAuthorStyleSheet(const CSSStyleSheetResource* cach
edStyleSheet, const SecurityOrigin* securityOrigin) | 281 void StyleSheetContents::parseAuthorStyleSheet(const CSSStyleSheetResource* cach
edStyleSheet, const SecurityOrigin* securityOrigin) |
282 { | 282 { |
283 TRACE_EVENT0("blink", "StyleSheetContents::parseAuthorStyleSheet"); | 283 TRACE_EVENT0("blink", "StyleSheetContents::parseAuthorStyleSheet"); |
284 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ParseAuthorSty
leSheet", "data", InspectorParseAuthorStyleSheetEvent::data(cachedStyleSheet)); | 284 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ParseAuthorSty
leSheet", "data", InspectorParseAuthorStyleSheetEvent::data(cachedStyleSheet)); |
285 | 285 |
286 bool quirksMode = isQuirksModeBehavior(m_parserContext.mode()); | |
287 | |
288 bool enforceMIMEType = !quirksMode; | |
289 bool hasValidMIMEType = false; | 286 bool hasValidMIMEType = false; |
290 String sheetText = cachedStyleSheet->sheetText(enforceMIMEType, &hasValidMIM
EType); | 287 String sheetText = cachedStyleSheet->sheetText(&hasValidMIMEType); |
291 | 288 |
292 const ResourceResponse& response = cachedStyleSheet->response(); | 289 const ResourceResponse& response = cachedStyleSheet->response(); |
293 m_sourceMapURL = response.httpHeaderField("SourceMap"); | 290 m_sourceMapURL = response.httpHeaderField("SourceMap"); |
294 if (m_sourceMapURL.isEmpty()) { | 291 if (m_sourceMapURL.isEmpty()) { |
295 // Try to get deprecated header. | 292 // Try to get deprecated header. |
296 m_sourceMapURL = response.httpHeaderField("X-SourceMap"); | 293 m_sourceMapURL = response.httpHeaderField("X-SourceMap"); |
297 } | 294 } |
298 | 295 |
299 CSSParserContext context(parserContext(), UseCounter::getFrom(this)); | 296 CSSParserContext context(parserContext(), UseCounter::getFrom(this)); |
300 CSSParser::parseSheet(context, this, sheetText, TextPosition::minimumPositio
n(), 0, true); | 297 CSSParser::parseSheet(context, this, sheetText, TextPosition::minimumPositio
n(), 0, true); |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 visitor->trace(m_ownerRule); | 652 visitor->trace(m_ownerRule); |
656 visitor->trace(m_importRules); | 653 visitor->trace(m_importRules); |
657 visitor->trace(m_childRules); | 654 visitor->trace(m_childRules); |
658 visitor->trace(m_loadingClients); | 655 visitor->trace(m_loadingClients); |
659 visitor->trace(m_completedClients); | 656 visitor->trace(m_completedClients); |
660 visitor->trace(m_ruleSet); | 657 visitor->trace(m_ruleSet); |
661 #endif | 658 #endif |
662 } | 659 } |
663 | 660 |
664 } | 661 } |
OLD | NEW |