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

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

Issue 367863002: Add ScriptForbiddenScopes to style and layout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blanket allow inspector scripts. Created 6 years, 6 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/frame/FrameView.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/InspectorOverlay.cpp
diff --git a/Source/core/inspector/InspectorOverlay.cpp b/Source/core/inspector/InspectorOverlay.cpp
index 7eb3d5bb1eeaca8710f362cdc9be4ce0d5440462..b8439b405f1080d6511551fba1133c197d2219d1 100644
--- a/Source/core/inspector/InspectorOverlay.cpp
+++ b/Source/core/inspector/InspectorOverlay.cpp
@@ -36,8 +36,10 @@
#include "core/dom/Element.h"
#include "core/dom/Node.h"
#include "core/dom/PseudoElement.h"
+#include "core/dom/ScriptForbiddenScope.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/Settings.h"
#include "core/inspector/InspectorClient.h"
#include "core/inspector/InspectorOverlayHost.h"
#include "core/loader/EmptyClients.h"
@@ -45,7 +47,6 @@
#include "core/page/Chrome.h"
#include "core/page/EventHandler.h"
#include "core/page/Page.h"
-#include "core/frame/Settings.h"
#include "core/rendering/RenderBoxModelObject.h"
#include "core/rendering/RenderInline.h"
#include "core/rendering/RenderObject.h"
@@ -678,6 +679,8 @@ Page* InspectorOverlay::overlayPage()
if (m_overlayPage)
return m_overlayPage.get();
+ ScriptForbiddenScope::AllowUserAgentScript allowScript;
+
static FrameLoaderClient* dummyFrameLoaderClient = new EmptyFrameLoaderClient;
Page::PageClients pageClients;
fillWithEmptyClients(pageClients);
@@ -747,6 +750,7 @@ void InspectorOverlay::reset(const IntSize& viewportSize, int scrollX, int scrol
void InspectorOverlay::evaluateInOverlay(const String& method, const String& argument)
{
+ ScriptForbiddenScope::AllowUserAgentScript allowScript;
RefPtr<JSONArray> command = JSONArray::create();
command->pushString(method);
command->pushString(argument);
@@ -755,6 +759,7 @@ void InspectorOverlay::evaluateInOverlay(const String& method, const String& arg
void InspectorOverlay::evaluateInOverlay(const String& method, PassRefPtr<JSONValue> argument)
{
+ ScriptForbiddenScope::AllowUserAgentScript allowScript;
RefPtr<JSONArray> command = JSONArray::create();
command->pushString(method);
command->pushValue(argument);
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698