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

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

Issue 827933002: DevTools: NetworkPanel: detect iframe (parser) initiator. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 | « LayoutTests/http/tests/inspector/network/resources/network-initiator-frame.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorResourceAgent.cpp
diff --git a/Source/core/inspector/InspectorResourceAgent.cpp b/Source/core/inspector/InspectorResourceAgent.cpp
index 288df606ad693e798debe7988d57b55920940eb7..297a8d7fd30966b76cb14583b567280d809f272f 100644
--- a/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/Source/core/inspector/InspectorResourceAgent.cpp
@@ -44,6 +44,7 @@
#include "core/fileapi/FileReaderLoader.h"
#include "core/fileapi/FileReaderLoaderClient.h"
#include "core/frame/LocalFrame.h"
+#include "core/html/HTMLFrameOwnerElement.h"
#include "core/inspector/IdentifiersFactory.h"
#include "core/inspector/InspectorOverlay.h"
#include "core/inspector/InspectorPageAgent.h"
@@ -675,6 +676,8 @@ PassRefPtr<TypeBuilder::Network::Initiator> InspectorResourceAgent::buildInitiat
return initiatorObject;
}
+ while (document && !document->scriptableDocumentParser())
+ document = document->ownerElement() ? document->ownerElement()->ownerDocument() : nullptr;
if (document && document->scriptableDocumentParser()) {
RefPtr<TypeBuilder::Network::Initiator> initiatorObject = TypeBuilder::Network::Initiator::create()
.setType(TypeBuilder::Network::Initiator::Type::Parser);
« no previous file with comments | « LayoutTests/http/tests/inspector/network/resources/network-initiator-frame.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698