OSDN Git Service

Merge WebKit at r71558: Initial merge by git.
[android-x86/external-webkit.git] / WebCore / bindings / v8 / ScriptController.cpp
index 903b11c..648ae98 100644 (file)
@@ -35,6 +35,7 @@
 #include "PlatformBridge.h"
 #include "Document.h"
 #include "ScriptCallStack.h"
+#include "ScriptCallStackFactory.h"
 #include "ScriptableDocumentParser.h"
 #include "DOMWindow.h"
 #include "Event.h"
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/CString.h>
 
+#if PLATFORM(QT)
+#include <QScriptEngine>
+#endif
+
 namespace WebCore {
 
 void ScriptController::initializeThreading()
@@ -117,6 +122,7 @@ ScriptController::ScriptController(Frame* frame)
     , m_inExecuteScript(false)
     , m_processingTimerCallback(false)
     , m_paused(false)
+    , m_allowPopupsFromPlugin(false)
     , m_proxy(new V8Proxy(frame))
 #if ENABLE(NETSCAPE_PLUGIN_API)
     , m_windowScriptNPObject(0)
@@ -199,7 +205,8 @@ bool ScriptController::processingUserGesture()
         // This is the <a href="javascript:window.open('...')> case -> we let it through.
         return true;
     }
-
+    if (activeFrame->script()->allowPopupsFromPlugin())
+        return true;
     // This is the <script>window.open(...)</script> case or a timer callback -> block it.
     // Based on JSC version, use returned value of UserGestureIndicator::processingUserGesture for all other situations. 
     return UserGestureIndicator::processingUserGesture();
@@ -473,9 +480,9 @@ void ScriptController::clearWindowShell(bool)
 }
 
 #if ENABLE(INSPECTOR)
-void ScriptController::setCaptureCallStackForUncaughtExceptions(bool)
+void ScriptController::setCaptureCallStackForUncaughtExceptions(bool value)
 {
-    v8::V8::SetCaptureStackTraceForUncaughtExceptions(true, ScriptCallStack::maxCallStackSizeToCapture);
+    v8::V8::SetCaptureStackTraceForUncaughtExceptions(value, ScriptCallStack::maxCallStackSizeToCapture, stackTraceOptions);
 }
 #endif