OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 if (hasZeroSize) { | 224 if (hasZeroSize) { |
225 *result = ""; | 225 *result = ""; |
226 *base64Encoded = false; | 226 *base64Encoded = false; |
227 return true; | 227 return true; |
228 } | 228 } |
229 | 229 |
230 DCHECK(cachedResource); | 230 DCHECK(cachedResource); |
231 switch (cachedResource->getType()) { | 231 switch (cachedResource->getType()) { |
232 case Resource::CSSStyleSheet: | 232 case Resource::CSSStyleSheet: |
233 maybeEncodeTextContent( | 233 maybeEncodeTextContent( |
234 toCSSStyleSheetResource(cachedResource)->sheetText(), | 234 toCSSStyleSheetResource(cachedResource) |
| 235 ->sheetText(CSSStyleSheetResource::MIMETypeCheck::Lax), |
235 cachedResource->resourceBuffer(), result, base64Encoded); | 236 cachedResource->resourceBuffer(), result, base64Encoded); |
236 return true; | 237 return true; |
237 case Resource::Script: | 238 case Resource::Script: |
238 maybeEncodeTextContent( | 239 maybeEncodeTextContent( |
239 cachedResource->resourceBuffer() | 240 cachedResource->resourceBuffer() |
240 ? toScriptResource(cachedResource)->decodedText() | 241 ? toScriptResource(cachedResource)->decodedText() |
241 : toScriptResource(cachedResource)->script(), | 242 : toScriptResource(cachedResource)->script(), |
242 cachedResource->resourceBuffer(), result, base64Encoded); | 243 cachedResource->resourceBuffer(), result, base64Encoded); |
243 return true; | 244 return true; |
244 default: | 245 default: |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 host->settings().setBlockedMainThreadEventsWarningThreshold(threshold); | 856 host->settings().setBlockedMainThreadEventsWarningThreshold(threshold); |
856 } | 857 } |
857 | 858 |
858 DEFINE_TRACE(InspectorPageAgent) { | 859 DEFINE_TRACE(InspectorPageAgent) { |
859 visitor->trace(m_inspectedFrames); | 860 visitor->trace(m_inspectedFrames); |
860 visitor->trace(m_inspectorResourceContentLoader); | 861 visitor->trace(m_inspectorResourceContentLoader); |
861 InspectorBaseAgent::trace(visitor); | 862 InspectorBaseAgent::trace(visitor); |
862 } | 863 } |
863 | 864 |
864 } // namespace blink | 865 } // namespace blink |
OLD | NEW |