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

Unified Diff: Source/core/inspector/InspectorStyleSheet.cpp

Issue 23658039: [ABANDONED] Get content of resources from Blob when the downloadToFile option is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorStyleSheet.cpp
diff --git a/Source/core/inspector/InspectorStyleSheet.cpp b/Source/core/inspector/InspectorStyleSheet.cpp
index 56d40a94d7750d7384b2268bc8cc41176bd3aa47..9d2328a7397699add80caf592b5f65ab254f7813 100644
--- a/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/Source/core/inspector/InspectorStyleSheet.cpp
@@ -46,6 +46,7 @@
#include "core/dom/Document.h"
#include "core/dom/Element.h"
#include "core/dom/Node.h"
+#include "core/fileapi/Blob.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/inspector/ContentSearchUtils.h"
#include "core/inspector/InspectorCSSAgent.h"
@@ -1681,8 +1682,10 @@ bool InspectorStyleSheet::resourceStyleSheetText(String* result) const
String error;
bool base64Encoded;
- InspectorPageAgent::resourceContent(&error, ownerDocument()->frame(), KURL(ParsedURLString, m_pageStyleSheet->href()), result, &base64Encoded);
- return error.isEmpty() && !base64Encoded;
+ RefPtr<Blob> blob;
+ String textEncodingName;
+ InspectorPageAgent::resourceContentOrBlob(&error, ownerDocument()->frame(), KURL(ParsedURLString, m_pageStyleSheet->href()), result, &base64Encoded, &blob, &textEncodingName);
+ return error.isEmpty() && !base64Encoded && !blob;
}
bool InspectorStyleSheet::inlineStyleSheetText(String* result) const

Powered by Google App Engine
This is Rietveld 408576698