Title: [86949] trunk/Source
Revision
86949
Author
pva...@webkit.org
Date
2011-05-20 06:57:48 -0700 (Fri, 20 May 2011)

Log Message

2011-05-20  Peter Varga  <pva...@webkit.org>

        Reviewed by Simon Hausmann.

        [Qt][V8] Use qtscript-staging's shipped version of V8 when building with --v8
        https://bugs.webkit.org/show_bug.cgi?id=56649

        Use the provided V8 and functionality of
        http://qt.gitorious.org/+qt-developers/qt/qtscript-staging to build QtWebKit+V8.
        Based on the original patch of Andras Becsi <abe...@webkit.org>.

        No new tests needed.

        * CodeGenerators.pri: Add generating of DebuggerScriptSource.h
        * WebCore.pri: Fix the options for V8 build.
        * WebCore.pro: Ditto.
        * bindings/v8/NPV8Object.cpp:
        (WebCore::npObjectTypeInfo): Add missing initializer.
        * bindings/v8/ScriptController.cpp:
        (WebCore::ScriptController::disableEval): Temporarily disable
        unsupported feature on Qt.
        * bindings/v8/ScriptControllerQt.cpp:
        (WebCore::ScriptController::qtScriptEngine): use the QtScriptEngine
        constructor of qtscript-staging.
        * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: Add missing
        initializer.
        * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: Ditto.
        * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: Ditto.
        * loader/appcache/ApplicationCacheGroup.cpp: Add missing header.
        * loader/cache/CachedResourceRequest.cpp: Ditto.
        * page/PageSerializer.cpp: Ditto.
        * page/qt/FrameQt.cpp: Ditto.
        * storage/StorageEventDispatcher.cpp: Ditto.
2011-05-20  Peter Varga  <pva...@webkit.org>

        Reviewed by Simon Hausmann.

        [Qt][V8] Use qtscript-staging's shipped version of V8 when building with --v8
        https://bugs.webkit.org/show_bug.cgi?id=56649

        Use the provided V8 and functionality of
        http://qt.gitorious.org/+qt-developers/qt/qtscript-staging to build QtWebKit+V8.
        Based on the original patch of Andras Becsi <abe...@webkit.org>.

        * Api/qwebframe.cpp:
        (QWebFrame::addToJavaScriptWindowObject): Fix QString deprecated
        warning.
        * QtWebKit.pro: Adding the V8 library should happen in the final build
        step.
        * WebCoreSupport/ChromeClientQt.cpp: Add missing head.
        * WebCoreSupport/DumpRenderTreeSupportQt.cpp: Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (86948 => 86949)


--- trunk/Source/WebCore/ChangeLog	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/ChangeLog	2011-05-20 13:57:48 UTC (rev 86949)
@@ -1,3 +1,37 @@
+2011-05-20  Peter Varga  <pva...@webkit.org>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt][V8] Use qtscript-staging's shipped version of V8 when building with --v8
+        https://bugs.webkit.org/show_bug.cgi?id=56649
+
+        Use the provided V8 and functionality of
+        http://qt.gitorious.org/+qt-developers/qt/qtscript-staging to build QtWebKit+V8.
+        Based on the original patch of Andras Becsi <abe...@webkit.org>.
+
+        No new tests needed.
+
+        * CodeGenerators.pri: Add generating of DebuggerScriptSource.h
+        * WebCore.pri: Fix the options for V8 build.
+        * WebCore.pro: Ditto.
+        * bindings/v8/NPV8Object.cpp:
+        (WebCore::npObjectTypeInfo): Add missing initializer.
+        * bindings/v8/ScriptController.cpp:
+        (WebCore::ScriptController::disableEval): Temporarily disable
+        unsupported feature on Qt.
+        * bindings/v8/ScriptControllerQt.cpp:
+        (WebCore::ScriptController::qtScriptEngine): use the QtScriptEngine
+        constructor of qtscript-staging.
+        * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: Add missing
+        initializer.
+        * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: Ditto.
+        * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: Ditto.
+        * loader/appcache/ApplicationCacheGroup.cpp: Add missing header.
+        * loader/cache/CachedResourceRequest.cpp: Ditto.
+        * page/PageSerializer.cpp: Ditto.
+        * page/qt/FrameQt.cpp: Ditto.
+        * storage/StorageEventDispatcher.cpp: Ditto.
+
 2011-05-20  Tonis Tiigi  <tonisti...@gmail.com>
 
         Reviewed by Pavel Feldman.

Modified: trunk/Source/WebCore/CodeGenerators.pri (86948 => 86949)


--- trunk/Source/WebCore/CodeGenerators.pri	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/CodeGenerators.pri	2011-05-20 13:57:48 UTC (rev 86949)
@@ -42,6 +42,8 @@
 
 INJECTED_SCRIPT_SOURCE = $$PWD/inspector/InjectedScriptSource.js
 
+DEBUGGER_SCRIPT_SOURCE = $$PWD/bindings/v8/DebuggerScript.js
+
 contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=1): DASHBOARDSUPPORTCSSPROPERTIES = $$PWD/css/DashboardSupportCSSPropertyNames.in
 
 XPATHBISON = $$PWD/xml/XPathGrammar.y
@@ -677,6 +679,13 @@
 injectedScriptSource.wkAddOutputToSources = false
 addExtraCompiler(injectedScriptSource)
 
+# GENERATOR 2-b: inspector debugger script source compiler
+debuggerScriptSource.output = $${WC_GENERATED_SOURCES_DIR}/DebuggerScriptSource.h
+debuggerScriptSource.input = DEBUGGER_SCRIPT_SOURCE
+debuggerScriptSource.commands = perl $$PWD/inspector/xxd.pl DebuggerScriptSource_js $$PWD/bindings/v8/DebuggerScript.js  $${WC_GENERATED_SOURCES_DIR}/DebuggerScriptSource.h
+debuggerScriptSource.wkAddOutputToSources = false
+addExtraCompiler(debuggerScriptSource)
+
 # GENERATOR 3: tokenizer (flex)
 tokenizer.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
 tokenizer.input = TOKENIZER

Modified: trunk/Source/WebCore/WebCore.pri (86948 => 86949)


--- trunk/Source/WebCore/WebCore.pri	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/WebCore.pri	2011-05-20 13:57:48 UTC (rev 86949)
@@ -29,20 +29,20 @@
 }
 
 V8_DIR = "$$[QT_INSTALL_PREFIX]/src/3rdparty/v8"
+V8_LIB_DIR = "$$[QT_INSTALL_PREFIX]/src/script/v8"
 
-v8:!exists($${V8_DIR}/include/v8.h) {
-    error("Cannot build with V8. Needed file $${V8_DIR}/include/v8.h does not exist.")
-}
+v8 {
+    lessThan(QT_MAJOR_VERSION, 5): error("To build QtWebKit+V8 you need qtscript-staging's v8 branch. (See: http://qt.gitorious.org/+qt-developers/qt/qtscript-staging)")
+    !exists($${V8_DIR}$${QMAKE_DIR_SEP}include$${QMAKE_DIR_SEP}v8.h): error("Cannot build with V8. Needed file $${V8_DIR}$${QMAKE_DIR_SEP}include$${QMAKE_DIR_SEP}v8.h does not exist.")
+    !exists($${V8_LIB_DIR}$${QMAKE_DIR_SEP}libv8.a): error("Cannot build with V8. Needed library $${V8_LIB_DIR}$${QMAKE_DIR_SEP}libv8.a does not exist.")
 
-v8 {
     message(Using V8 with QtScript)
     QT += script
     INCLUDEPATH += $${V8_DIR}/include
+
     DEFINES *= V8_BINDING=1
-    DEFINES += WTF_CHANGES=1
+    DEFINES *= WTF_CHANGES=1
     DEFINES *= WTF_USE_V8=1
-    DEFINES += USING_V8_SHARED
-    linux-*:LIBS += -lv8
 }
 
 v8 {

Modified: trunk/Source/WebCore/WebCore.pro (86948 => 86949)


--- trunk/Source/WebCore/WebCore.pro	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/WebCore.pro	2011-05-20 13:57:48 UTC (rev 86949)
@@ -93,6 +93,7 @@
         bindings/v8/DOMDataStore.cpp \
         bindings/v8/MainThreadDOMData.cpp \
         bindings/v8/NPV8Object.cpp \
+        bindings/v8/PageScriptDebugServer.cpp \
         bindings/v8/RetainedDOMInfo.cpp \
         bindings/v8/ScheduledAction.cpp \
         bindings/v8/ScopedDOMDataStore.cpp \
@@ -131,6 +132,7 @@
         bindings/v8/V8WindowErrorHandler.cpp \
         bindings/v8/V8WorkerContextEventListener.cpp \
         bindings/v8/WorkerContextExecutionProxy.cpp \
+        bindings/v8/WorkerScriptDebugServer.cpp \
         bindings/v8/WorkerScriptController.cpp \
         \
         bindings/v8/V8DOMWindowShell.cpp \
@@ -148,6 +150,7 @@
         bindings/v8/custom/V8CoordinatesCustom.cpp \
         bindings/v8/custom/V8ImageDataCustom.cpp \
         bindings/v8/custom/V8InjectedScriptHostCustom.cpp \
+        bindings/v8/custom/V8InjectedScriptManager.cpp \
         bindings/v8/custom/V8InspectorFrontendHostCustom.cpp \
         bindings/v8/custom/V8DOMSettableTokenListCustom.cpp \
         bindings/v8/custom/V8DOMStringMapCustom.cpp \
@@ -1232,6 +1235,7 @@
         bindings/v8/npruntime_priv.h \
         bindings/v8/NPV8Object.h \
         bindings/v8/OwnHandle.h \
+        bindings/v8/PageScriptDebugServer.h \
         bindings/v8/RetainedDOMInfo.h \
         bindings/v8/RetainedObjectInfo.h \
         bindings/v8/ScheduledAction.h \
@@ -1273,6 +1277,7 @@
         bindings/v8/V8WindowErrorHandler.h \
         bindings/v8/V8WorkerContextEventListener.h \
         bindings/v8/WorkerContextExecutionProxy.h \
+        bindings/v8/WorkerScriptDebugServer.h \
         bindings/v8/WorkerScriptController.h \
         bindings/v8/WorldContextHandle.h
 } else {

Modified: trunk/Source/WebCore/bindings/v8/NPV8Object.cpp (86948 => 86949)


--- trunk/Source/WebCore/bindings/v8/NPV8Object.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/bindings/v8/NPV8Object.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -58,7 +58,7 @@
 
 WrapperTypeInfo* npObjectTypeInfo()
 {
-    static WrapperTypeInfo typeInfo = { 0, 0, 0 };
+    static WrapperTypeInfo typeInfo = { 0, 0, 0, 0 };
     return &typeInfo;
 }
 

Modified: trunk/Source/WebCore/bindings/v8/ScriptController.cpp (86948 => 86949)


--- trunk/Source/WebCore/bindings/v8/ScriptController.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/bindings/v8/ScriptController.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -307,6 +307,11 @@
 
 void ScriptController::disableEval()
 {
+#if !PLATFORM(QT)
+// FIXME: https://bugs.webkit.org/show_bug.cgi?id=60384
+//        This functionality is disabled in QtWebkit V8 build because it isn't
+//        supported by the qtscript-staging's shipped version of V8 yet.
+
     m_proxy->windowShell()->initContextIfNeeded();
 
     v8::HandleScope handleScope;
@@ -315,6 +320,7 @@
         return;
 
     v8Context->AllowCodeGenerationFromStrings(false);
+#endif
 }
 
 PassScriptInstance ScriptController::createScriptInstanceForWidget(Widget* widget)

Modified: trunk/Source/WebCore/bindings/v8/ScriptControllerQt.cpp (86948 => 86949)


--- trunk/Source/WebCore/bindings/v8/ScriptControllerQt.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/bindings/v8/ScriptControllerQt.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -40,7 +40,7 @@
         v8::Context::Scope scope(v8Context);
         if (v8Context.IsEmpty())
             return 0;
-        m_qtScriptEngine = new QScriptEngine;
+        m_qtScriptEngine = adoptPtr(new QScriptEngine(QScriptEngine::AdoptCurrentContext));
      }
      return m_qtScriptEngine.get();
 }

Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp (86948 => 86949)


--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -44,7 +44,7 @@
 
 namespace WebCore {
 
-WrapperTypeInfo V8HTMLAudioElementConstructor::info = { V8HTMLAudioElementConstructor::GetTemplate, 0, 0 };
+WrapperTypeInfo V8HTMLAudioElementConstructor::info = { V8HTMLAudioElementConstructor::GetTemplate, 0, 0, 0 };
 
 static v8::Handle<v8::Value> v8HTMLAudioElementConstructorCallback(const v8::Arguments& args)
 {

Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp (86948 => 86949)


--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -44,7 +44,7 @@
 
 namespace WebCore {
 
-WrapperTypeInfo V8HTMLImageElementConstructor::info = { V8HTMLImageElementConstructor::GetTemplate, 0, 0 };
+WrapperTypeInfo V8HTMLImageElementConstructor::info = { V8HTMLImageElementConstructor::GetTemplate, 0, 0, 0 };
 
 static v8::Handle<v8::Value> v8HTMLImageElementConstructorCallback(const v8::Arguments& args)
 {

Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp (86948 => 86949)


--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -44,7 +44,7 @@
 
 namespace WebCore {
 
-WrapperTypeInfo V8HTMLOptionElementConstructor::info = { V8HTMLOptionElementConstructor::GetTemplate, 0, 0 };
+WrapperTypeInfo V8HTMLOptionElementConstructor::info = { V8HTMLOptionElementConstructor::GetTemplate, 0, 0, 0 };
 
 static v8::Handle<v8::Value> v8HTMLOptionElementConstructorCallback(const v8::Arguments& args)
 {

Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp (86948 => 86949)


--- trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -49,6 +49,7 @@
 #include "SecurityOrigin.h"
 #include "Settings.h"
 #include <wtf/HashMap.h>
+#include <wtf/UnusedParam.h>
 
 #if ENABLE(INSPECTOR)
 #include "ProgressTracker.h"

Modified: trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp (86948 => 86949)


--- trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -39,6 +39,7 @@
 #include "SharedBuffer.h"
 #include "SubresourceLoader.h"
 #include <wtf/Assertions.h>
+#include <wtf/UnusedParam.h>
 #include <wtf/Vector.h>
 #include <wtf/text/CString.h>
 

Modified: trunk/Source/WebCore/page/PageSerializer.cpp (86948 => 86949)


--- trunk/Source/WebCore/page/PageSerializer.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/page/PageSerializer.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -54,6 +54,7 @@
 #include "StyleImage.h"
 #include "Text.h"
 #include "TextEncoding.h"
+#include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
 

Modified: trunk/Source/WebCore/page/qt/FrameQt.cpp (86948 => 86949)


--- trunk/Source/WebCore/page/qt/FrameQt.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/page/qt/FrameQt.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -22,6 +22,7 @@
  */
 
 #include "config.h"
+#include "Document.h"
 #include "Frame.h"
 #include "FrameView.h"
 #include "GraphicsContext.h"

Modified: trunk/Source/WebCore/storage/StorageEventDispatcher.cpp (86948 => 86949)


--- trunk/Source/WebCore/storage/StorageEventDispatcher.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebCore/storage/StorageEventDispatcher.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -28,6 +28,7 @@
 
 #if ENABLE(DOM_STORAGE)
 
+#include "Document.h"
 #include "DOMWindow.h"
 #include "EventNames.h"
 #include "Frame.h"

Modified: trunk/Source/WebKit/qt/Api/qwebframe.cpp (86948 => 86949)


--- trunk/Source/WebKit/qt/Api/qwebframe.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebKit/qt/Api/qwebframe.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -647,7 +647,7 @@
     if (!engine)
         return;
     QScriptValue v = engine->newQObject(object, ownership);
-    engine->globalObject().property("window").setProperty(name, v);
+    engine->globalObject().property(QLatin1String("window")).setProperty(name, v);
 #endif
 }
 

Modified: trunk/Source/WebKit/qt/ChangeLog (86948 => 86949)


--- trunk/Source/WebKit/qt/ChangeLog	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-05-20 13:57:48 UTC (rev 86949)
@@ -1,3 +1,22 @@
+2011-05-20  Peter Varga  <pva...@webkit.org>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt][V8] Use qtscript-staging's shipped version of V8 when building with --v8
+        https://bugs.webkit.org/show_bug.cgi?id=56649
+
+        Use the provided V8 and functionality of
+        http://qt.gitorious.org/+qt-developers/qt/qtscript-staging to build QtWebKit+V8.
+        Based on the original patch of Andras Becsi <abe...@webkit.org>.
+
+        * Api/qwebframe.cpp:
+        (QWebFrame::addToJavaScriptWindowObject): Fix QString deprecated
+        warning.
+        * QtWebKit.pro: Adding the V8 library should happen in the final build
+        step.
+        * WebCoreSupport/ChromeClientQt.cpp: Add missing head.
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp: Ditto.
+
 2011-05-20  Csaba Osztrogonác  <o...@webkit.org>
 
         Reviewed by Benjamin Poulain.

Modified: trunk/Source/WebKit/qt/QtWebKit.pro (86948 => 86949)


--- trunk/Source/WebKit/qt/QtWebKit.pro	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebKit/qt/QtWebKit.pro	2011-05-20 13:57:48 UTC (rev 86949)
@@ -24,6 +24,13 @@
 }
 include($$SOURCE_DIR/WebCore/WebCore.pri)
 
+v8 {
+    linux-* {
+        QMAKE_LIBDIR += $${V8_LIB_DIR}
+        LIBS = -lv8 $$LIBS
+    }
+}
+
 !v8:prependJavaScriptCoreLib(../../_javascript_Core)
 prependWebCoreLib(../../WebCore)
 webkit2:prependWebKit2Lib(../../WebKit2)

Modified: trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp (86948 => 86949)


--- trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -32,6 +32,7 @@
 
 #include "ApplicationCacheStorage.h"
 #include "DatabaseTracker.h"
+#include "Document.h"
 #include "FileChooser.h"
 #include "Frame.h"
 #include "FrameLoadRequest.h"

Modified: trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp (86948 => 86949)


--- trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp	2011-05-20 13:49:54 UTC (rev 86948)
+++ trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp	2011-05-20 13:57:48 UTC (rev 86949)
@@ -65,6 +65,7 @@
 #include "RenderTreeAsText.h"
 #include "ShadowRoot.h"
 #include "ScriptController.h"
+#include "ScriptSourceCode.h"
 #include "ScriptValue.h"
 #include "SecurityOrigin.h"
 #include "Settings.h"
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to