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

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

Issue 445023005: DevTools: reduce ResourceAgent dependency on PageAgent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorStyleSheet.cpp
diff --git a/Source/core/inspector/InspectorStyleSheet.cpp b/Source/core/inspector/InspectorStyleSheet.cpp
index 4db2d6fc98a5d2982192d1d0d4e0892b3fb64121..d40c8ca8ecc63b636a5c899d91b6a6e7acc35566 100644
--- a/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/Source/core/inspector/InspectorStyleSheet.cpp
@@ -1553,9 +1553,13 @@ bool InspectorStyleSheet::resourceStyleSheetText(String* result) const
if (!ownerDocument())
return false;
+ KURL url(ParsedURLString, m_pageStyleSheet->href());
+ if (m_pageAgent->getEditedResourceContent(url, result))
+ return true;
+
bool base64Encoded;
- bool success = m_resourceAgent->fetchResourceContent(ownerDocument(), KURL(ParsedURLString, m_pageStyleSheet->href()), result, &base64Encoded) && !base64Encoded;
- return success;
+ bool success = m_resourceAgent->fetchResourceContent(ownerDocument(), url, result, &base64Encoded);
+ return success && !base64Encoded;
}
Element* InspectorStyleSheet::ownerStyleElement() const
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698