Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 733993002: CSS: Drop the quirks-mode exception for CSS MIME types. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tests. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/fetch/CSSStyleSheetResource.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 *base64Encoded = false; 280 *base64Encoded = false;
281 281
282 if (hasZeroSize) { 282 if (hasZeroSize) {
283 *result = ""; 283 *result = "";
284 return true; 284 return true;
285 } 285 }
286 286
287 if (cachedResource) { 287 if (cachedResource) {
288 switch (cachedResource->type()) { 288 switch (cachedResource->type()) {
289 case Resource::CSSStyleSheet: 289 case Resource::CSSStyleSheet:
290 *result = toCSSStyleSheetResource(cachedResource)->sheetText(false); 290 *result = toCSSStyleSheetResource(cachedResource)->sheetText();
291 return true; 291 return true;
292 case Resource::Script: 292 case Resource::Script:
293 *result = cachedResource->resourceBuffer() ? toScriptResource(cached Resource)->decodedText() : toScriptResource(cachedResource)->script(); 293 *result = cachedResource->resourceBuffer() ? toScriptResource(cached Resource)->decodedText() : toScriptResource(cachedResource)->script();
294 return true; 294 return true;
295 case Resource::ImportResource: // Fall through. 295 case Resource::ImportResource: // Fall through.
296 case Resource::Raw: { 296 case Resource::Raw: {
297 SharedBuffer* buffer = cachedResource->resourceBuffer(); 297 SharedBuffer* buffer = cachedResource->resourceBuffer();
298 if (!buffer) 298 if (!buffer)
299 return false; 299 return false;
300 OwnPtr<TextResourceDecoder> decoder = InspectorPageAgent::createReso urceTextDecoder(cachedResource->response().mimeType(), cachedResource->response( ).textEncodingName()); 300 OwnPtr<TextResourceDecoder> decoder = InspectorPageAgent::createReso urceTextDecoder(cachedResource->response().mimeType(), cachedResource->response( ).textEncodingName());
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 void InspectorPageAgent::trace(Visitor* visitor) 1512 void InspectorPageAgent::trace(Visitor* visitor)
1513 { 1513 {
1514 visitor->trace(m_page); 1514 visitor->trace(m_page);
1515 visitor->trace(m_injectedScriptManager); 1515 visitor->trace(m_injectedScriptManager);
1516 visitor->trace(m_inspectorResourceContentLoader); 1516 visitor->trace(m_inspectorResourceContentLoader);
1517 InspectorBaseAgent::trace(visitor); 1517 InspectorBaseAgent::trace(visitor);
1518 } 1518 }
1519 1519
1520 } // namespace blink 1520 } // namespace blink
1521 1521
OLDNEW
« no previous file with comments | « Source/core/fetch/CSSStyleSheetResource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698