Unreviewed, rolling out r122834.
authorkkristof@inf.u-szeged.hu <kkristof@inf.u-szeged.hu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2012 11:27:55 +0000 (11:27 +0000)
committerkkristof@inf.u-szeged.hu <kkristof@inf.u-szeged.hu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2012 11:27:55 +0000 (11:27 +0000)
http://trac.webkit.org/changeset/122834
https://bugs.webkit.org/show_bug.cgi?id=91492

it broke the chromium (Requested by kkristof on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-07-17

.:

* Source/api.pri:
* WebKit.pro:

Source/WebCore:

* DerivedSources.pri:
* Target.pri:
* WebCore.pri:
* bindings/v8/ScriptCachedFrameData.cpp:
(WebCore):
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::domWindow):
(WebCore::ScriptCachedFrameData::restore):
(WebCore::ScriptCachedFrameData::clear):
* bindings/v8/ScriptCachedFrameData.h:
(WebCore):
(ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::~ScriptCachedFrameData):
* bindings/v8/ScriptController.cpp:
* bindings/v8/ScriptController.h:
(ScriptController):
* bindings/v8/ScriptControllerQt.cpp: Copied from Source/WebCore/bindings/v8/ScriptCachedFrameData.cpp.
(WebCore):
(WebCore::ScriptController::qtScriptEngine):
* bindings/v8/V8GCController.cpp:
(WebCore::V8GCController::checkMemoryUsage):
* bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
(WebCore):
(WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
(WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
(WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
* config.h:

Source/WebKit/qt:

* Api/qwebelement.cpp:
(setupScriptContext):
(QWebElement::evaluateJavaScript):
(QtWebElementRuntime::initialize):
* Api/qwebframe.cpp:
(QWebFramePrivate::didClearWindowObject):
(QWebFrame::addToJavaScriptWindowObject):
(QWebFrame::evaluateJavaScript):
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(QtDRTNodeRuntime::initialize):
(DumpRenderTreeSupportQt::javaScriptObjectsCount):
(DumpRenderTreeSupportQt::garbageCollectorCollect):
(DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread):
(DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld):
(DumpRenderTreeSupportQt::injectInternalsObject):
(DumpRenderTreeSupportQt::resetInternalsObject):
* WebCoreSupport/DumpRenderTreeSupportQt.h:
(Bindings):
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore):
(WebCore::FrameLoaderClientQt::didCreateScriptContext):
(WebCore::FrameLoaderClientQt::willReleaseScriptContext):
(WebCore::FrameLoaderClientQt::didCreateIsolatedScriptContext):
(WebCore::FrameLoaderClientQt::createDocumentLoader):
* WebCoreSupport/FrameLoaderClientQt.h:
(FrameLoaderClientQt):
(WebCore::FrameLoaderClientQt::allowScriptExtension):
* v8/ForwardingHeaders/v8-debug.h: Added.
* v8/ForwardingHeaders/v8-preparser.h: Added.
* v8/ForwardingHeaders/v8-profiler.h: Added.
* v8/ForwardingHeaders/v8-testing.h: Added.
* v8/ForwardingHeaders/v8.h: Added.
* v8/ForwardingHeaders/v8stdint.h: Added.

Source/WTF:

* WTF.pri:

Tools:

* Scripts/build-webkit:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122836 268f45cc-cd09-0410-ab3c-d52691b4dbfc

32 files changed:
ChangeLog
Source/WTF/ChangeLog
Source/WTF/WTF.pri
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.pri
Source/WebCore/Target.pri
Source/WebCore/WebCore.pri
Source/WebCore/bindings/v8/ScriptCachedFrameData.cpp
Source/WebCore/bindings/v8/ScriptCachedFrameData.h
Source/WebCore/bindings/v8/ScriptController.cpp
Source/WebCore/bindings/v8/ScriptController.h
Source/WebCore/bindings/v8/ScriptControllerQt.cpp [new file with mode: 0644]
Source/WebCore/bindings/v8/V8GCController.cpp
Source/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp
Source/WebCore/config.h
Source/WebKit/qt/Api/qwebelement.cpp
Source/WebKit/qt/Api/qwebframe.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
Source/WebKit/qt/v8/ForwardingHeaders/v8-debug.h [new file with mode: 0644]
Source/WebKit/qt/v8/ForwardingHeaders/v8-preparser.h [new file with mode: 0644]
Source/WebKit/qt/v8/ForwardingHeaders/v8-profiler.h [new file with mode: 0644]
Source/WebKit/qt/v8/ForwardingHeaders/v8-testing.h [new file with mode: 0644]
Source/WebKit/qt/v8/ForwardingHeaders/v8.h [new file with mode: 0644]
Source/WebKit/qt/v8/ForwardingHeaders/v8stdint.h [new file with mode: 0644]
Source/api.pri
Tools/ChangeLog
Tools/Scripts/build-webkit
WebKit.pro

index cd53f2e..f19c2fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-07-17  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r122834.
+        http://trac.webkit.org/changeset/122834
+        https://bugs.webkit.org/show_bug.cgi?id=91492
+
+        it broke the chromium (Requested by kkristof on #webkit).
+
+        * Source/api.pri:
+        * WebKit.pro:
+
 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
 
         [Qt][V8] Remove the V8 related codepaths and configuration
index 0b87afd..de0a2bb 100644 (file)
@@ -1,3 +1,13 @@
+2012-07-17  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r122834.
+        http://trac.webkit.org/changeset/122834
+        https://bugs.webkit.org/show_bug.cgi?id=91492
+
+        it broke the chromium (Requested by kkristof on #webkit).
+
+        * WTF.pri:
+
 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
 
         [Qt][V8] Remove the V8 related codepaths and configuration
index 024c7f6..306a180 100644 (file)
@@ -24,6 +24,13 @@ haveQt(5) {
     }
 }
 
+v8 {
+    !haveQt(5): error("To build QtWebKit+V8 you need to use Qt 5")
+    DEFINES *= WTF_USE_V8=1
+    INCLUDEPATH += $${ROOT_WEBKIT_DIR}/Source/WebKit/qt/v8/ForwardingHeaders
+    QT += v8-private
+}
+
 linux-*:contains(DEFINES, WTF_USE_GSTREAMER=1) {
     DEFINES += ENABLE_GLIB_SUPPORT=1
     PKGCONFIG += glib-2.0 gio-2.0
index b98658b..db938e8 100644 (file)
@@ -1,3 +1,39 @@
+2012-07-17  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r122834.
+        http://trac.webkit.org/changeset/122834
+        https://bugs.webkit.org/show_bug.cgi?id=91492
+
+        it broke the chromium (Requested by kkristof on #webkit).
+
+        * DerivedSources.pri:
+        * Target.pri:
+        * WebCore.pri:
+        * bindings/v8/ScriptCachedFrameData.cpp:
+        (WebCore):
+        (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
+        (WebCore::ScriptCachedFrameData::domWindow):
+        (WebCore::ScriptCachedFrameData::restore):
+        (WebCore::ScriptCachedFrameData::clear):
+        * bindings/v8/ScriptCachedFrameData.h:
+        (WebCore):
+        (ScriptCachedFrameData):
+        (WebCore::ScriptCachedFrameData::~ScriptCachedFrameData):
+        * bindings/v8/ScriptController.cpp:
+        * bindings/v8/ScriptController.h:
+        (ScriptController):
+        * bindings/v8/ScriptControllerQt.cpp: Copied from Source/WebCore/bindings/v8/ScriptCachedFrameData.cpp.
+        (WebCore):
+        (WebCore::ScriptController::qtScriptEngine):
+        * bindings/v8/V8GCController.cpp:
+        (WebCore::V8GCController::checkMemoryUsage):
+        * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
+        (WebCore):
+        (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
+        (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
+        (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
+        * config.h:
+
 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
 
         [Qt][V8] Remove the V8 related codepaths and configuration
index 94ec418..2f93c4a 100644 (file)
@@ -462,6 +462,12 @@ IDL_BINDINGS += \
     $$PWD/xml/XPathEvaluator.idl \
     $$PWD/xml/XSLTProcessor.idl
 
+v8 {
+  IDL_BINDINGS += \
+    $$PWD/Modules/indexeddb/IDBVersionChangeEvent.idl \
+    $$PWD/Modules/indexeddb/IDBVersionChangeRequest.idl
+}
+
 contains(DEFINES, ENABLE_SVG=1) {
   IDL_BINDINGS += \
     $$PWD/svg/SVGAElement.idl \
@@ -618,11 +624,14 @@ contains(DEFINES, ENABLE_VIDEO_TRACK=1) {
     $$PWD/html/track/TrackEvent.idl \
 }
 
+v8: wrapperFactoryArg = --wrapperFactoryV8
+else: wrapperFactoryArg = --wrapperFactory
+
 mathmlnames.output = MathMLNames.cpp
 mathmlnames.input = MATHML_NAMES
 mathmlnames.depends = $$PWD/mathml/mathattrs.in
 mathmlnames.script = $$PWD/dom/make_names.pl
-mathmlnames.commands = perl -I$$PWD/bindings/scripts $$mathmlnames.script --tags $$PWD/mathml/mathtags.in --attrs $$PWD/mathml/mathattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
+mathmlnames.commands = perl -I$$PWD/bindings/scripts $$mathmlnames.script --tags $$PWD/mathml/mathtags.in --attrs $$PWD/mathml/mathattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory $$wrapperFactoryArg --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
 mathmlnames.extra_sources = MathMLElementFactory.cpp
 GENERATORS += mathmlnames
 
@@ -631,8 +640,13 @@ svgnames.output = SVGNames.cpp
 svgnames.input = SVG_NAMES
 svgnames.depends = $$PWD/svg/svgattrs.in
 svgnames.script = $$PWD/dom/make_names.pl
-svgnames.commands = perl -I$$PWD/bindings/scripts $$svgnames.script --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
-svgnames.extra_sources = SVGElementFactory.cpp JSSVGElementWrapperFactory.cpp
+svgnames.commands = perl -I$$PWD/bindings/scripts $$svgnames.script --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory $$wrapperFactoryArg --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
+svgnames.extra_sources = SVGElementFactory.cpp
+v8 {
+    svgnames.extra_sources += V8SVGElementWrapperFactory.cpp
+} else {
+    svgnames.extra_sources += JSSVGElementWrapperFactory.cpp
+}
 GENERATORS += svgnames
 
 # GENERATOR 5-D:
@@ -689,9 +703,11 @@ GENERATORS += preprocessIdls
 # GENERATOR 1: Generate .h and .cpp from IDLs
 generateBindings.input = IDL_BINDINGS
 generateBindings.script = $$PWD/bindings/scripts/generate-bindings.pl
+v8: generator = V8
+else: generator = JS
 generateBindings.commands = perl -I$$PWD/bindings/scripts $$generateBindings.script \
                             --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" \
-                            --generator JS \
+                            --generator $$generator \
                             --include $$PWD/Modules/filesystem \
                             --include $$PWD/Modules/geolocation \
                             --include $$PWD/Modules/indexeddb \
@@ -711,14 +727,25 @@ generateBindings.commands = perl -I$$PWD/bindings/scripts $$generateBindings.scr
                             --outputDir ${QMAKE_FUNC_FILE_OUT_PATH} \
                             --supplementalDependencyFile ${QMAKE_FUNC_FILE_OUT_PATH}/$$SUPPLEMENTAL_DEPENDENCY_FILE \
                             --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
-generateBindings.output = JS${QMAKE_FILE_BASE}.cpp
-generateBindings.depends = ${QMAKE_FUNC_FILE_OUT_PATH}/$$SUPPLEMENTAL_DEPENDENCY_FILE \
-                           $$PWD/bindings/scripts/CodeGenerator.pm \
-                           $$PWD/bindings/scripts/CodeGeneratorJS.pm \
-                           $$PWD/bindings/scripts/IDLParser.pm \
-                           $$PWD/bindings/scripts/IDLStructure.pm \
-                           $$PWD/bindings/scripts/InFilesParser.pm \
-                           $$PWD/bindings/scripts/preprocessor.pm
+v8 {
+    generateBindings.output = V8${QMAKE_FILE_BASE}.cpp
+    generateBindings.depends = ${QMAKE_FUNC_FILE_OUT_PATH}/$$SUPPLEMENTAL_DEPENDENCY_FILE \
+                               $$PWD/bindings/scripts/CodeGenerator.pm \
+                               $$PWD/bindings/scripts/CodeGeneratorV8.pm \
+                               $$PWD/bindings/scripts/IDLParser.pm \
+                               $$PWD/bindings/scripts/IDLStructure.pm \
+                               $$PWD/bindings/scripts/InFilesParser.pm \
+                               $$PWD/bindings/scripts/preprocessor.pm
+} else {
+    generateBindings.output = JS${QMAKE_FILE_BASE}.cpp
+    generateBindings.depends = ${QMAKE_FUNC_FILE_OUT_PATH}/$$SUPPLEMENTAL_DEPENDENCY_FILE \
+                               $$PWD/bindings/scripts/CodeGenerator.pm \
+                               $$PWD/bindings/scripts/CodeGeneratorJS.pm \
+                               $$PWD/bindings/scripts/IDLParser.pm \
+                               $$PWD/bindings/scripts/IDLStructure.pm \
+                               $$PWD/bindings/scripts/InFilesParser.pm \
+                               $$PWD/bindings/scripts/preprocessor.pm
+}
 GENERATORS += generateBindings
 
 # GENERATOR 2: inspector idl compiler
@@ -783,9 +810,13 @@ htmlnames.output = HTMLNames.cpp
 htmlnames.input = HTML_NAMES
 htmlnames.script = $$PWD/dom/make_names.pl
 htmlnames.depends = $$PWD/html/HTMLAttributeNames.in
-htmlnames.commands = perl -I$$PWD/bindings/scripts $$htmlnames.script --tags $$PWD/html/HTMLTagNames.in --attrs $$PWD/html/HTMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\"  --factory --wrapperFactory --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
+htmlnames.commands = perl -I$$PWD/bindings/scripts $$htmlnames.script --tags $$PWD/html/HTMLTagNames.in --attrs $$PWD/html/HTMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\"  --factory $$wrapperFactoryArg --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
 htmlnames.extra_sources = HTMLElementFactory.cpp
-htmlnames.extra_sources += JSHTMLElementWrapperFactory.cpp
+v8 {
+    htmlnames.extra_sources += V8HTMLElementWrapperFactory.cpp
+} else {
+    htmlnames.extra_sources += JSHTMLElementWrapperFactory.cpp
+}
 GENERATORS += htmlnames
 
 # GENERATOR 5-B:
@@ -900,3 +931,12 @@ webkitversion.commands = perl $$webkitversion.script --config $$PWD/../WebKit/ma
 webkitversion.clean = ${QMAKE_FUNC_FILE_OUT_PATH}/WebKitVersion.h
 webkitversion.add_output_to_sources = false
 GENERATORS += webkitversion
+
+# Stolen from JavaScriptCore, needed for YARR
+v8 {
+    retgen.output = RegExpJitTables.h
+    retgen.script = $$PWD/../JavaScriptCore/create_regex_tables
+    retgen.input = retgen.script
+    retgen.commands = python $$retgen.script > ${QMAKE_FILE_OUT}
+    GENERATORS += retgen
+}
index 9c64c57..b8129fe 100644 (file)
@@ -10,7 +10,7 @@ TARGET = WebCore
 include(WebCore.pri)
 
 WEBKIT += wtf
-WEBKIT += javascriptcore
+!v8: WEBKIT += javascriptcore
 
 CONFIG += staticlib
 
@@ -70,172 +70,339 @@ SOURCES += \
     bindings/generic/ActiveDOMCallback.cpp \
     bindings/generic/RuntimeEnabledFeatures.cpp
 
-SOURCES += \
-     bindings/ScriptControllerBase.cpp \
-     bindings/js/CallbackFunction.cpp \
-     bindings/js/DOMObjectHashTableMap.cpp \
-     bindings/js/DOMWrapperWorld.cpp \
-     bindings/js/Dictionary.cpp \
-     bindings/js/GCController.cpp \
-     bindings/js/JSArrayBufferCustom.cpp \
-     bindings/js/JSAttrCustom.cpp \
-     bindings/js/JSBlobCustom.cpp \
-     bindings/js/JSCDATASectionCustom.cpp \
-     bindings/js/JSCSSFontFaceRuleCustom.cpp \
-     bindings/js/JSCSSImportRuleCustom.cpp \
-     bindings/js/JSCSSMediaRuleCustom.cpp \
-     bindings/js/JSCSSPageRuleCustom.cpp \
-     bindings/js/JSCSSRuleCustom.cpp \
-     bindings/js/JSCSSRuleListCustom.cpp \
-     bindings/js/JSCSSStyleDeclarationCustom.cpp \
-     bindings/js/JSCSSStyleRuleCustom.cpp \
-     bindings/js/JSCSSValueCustom.cpp \
-     bindings/js/JSCallbackData.cpp \
-     bindings/js/JSCanvasRenderingContext2DCustom.cpp \
-     bindings/js/JSCanvasRenderingContextCustom.cpp \
-     bindings/js/JSClipboardCustom.cpp \
-     bindings/js/JSConsoleCustom.cpp \
-     bindings/js/JSCoordinatesCustom.cpp \
-     bindings/js/JSCustomVoidCallback.cpp \
-     bindings/js/JSCustomXPathNSResolver.cpp \
-     bindings/js/JSDictionary.cpp \
-     bindings/js/JSDOMBinding.cpp \
-     bindings/js/JSDOMFormDataCustom.cpp \
-     bindings/js/JSDOMGlobalObject.cpp \
-     bindings/js/JSDOMImplementationCustom.cpp \
-     bindings/js/JSDOMMimeTypeArrayCustom.cpp \
-     bindings/js/JSDOMPluginArrayCustom.cpp \
-     bindings/js/JSDOMPluginCustom.cpp \
-     bindings/js/JSDOMStringListCustom.cpp \
-     bindings/js/JSDOMStringMapCustom.cpp \
-     bindings/js/JSDOMTokenListCustom.cpp \
-     bindings/js/JSDOMWindowBase.cpp \
-     bindings/js/JSDOMWindowCustom.cpp \
-     bindings/js/JSDOMWindowShell.cpp \
-     bindings/js/JSDOMWindowWebAudioCustom.cpp \
-     bindings/js/JSDOMWindowWebSocketCustom.cpp \
-     bindings/js/JSDOMWrapper.cpp \
-     bindings/js/JSDataViewCustom.cpp \
-     bindings/js/JSDesktopNotificationsCustom.cpp \
-     bindings/js/JSDeviceMotionEventCustom.cpp \
-     bindings/js/JSDeviceOrientationEventCustom.cpp \
-     bindings/js/JSDocumentCustom.cpp \
-     bindings/js/JSElementCustom.cpp \
-     bindings/js/JSErrorHandler.cpp \
-     bindings/js/JSEventCustom.cpp \
-     bindings/js/JSEventListener.cpp \
-     bindings/js/JSEventTargetCustom.cpp \
-     bindings/js/JSExceptionBase.cpp \
-     bindings/js/JSFileReaderCustom.cpp \
-     bindings/js/JSFloat32ArrayCustom.cpp \
-     bindings/js/JSFloat64ArrayCustom.cpp \
-     bindings/js/JSGeolocationCustom.cpp \
-     bindings/js/JSHTMLAllCollectionCustom.cpp \
-     bindings/js/JSHTMLAppletElementCustom.cpp \
-     bindings/js/JSHTMLCanvasElementCustom.cpp \
-     bindings/js/JSHTMLCollectionCustom.cpp \
-     bindings/js/JSHTMLDocumentCustom.cpp \
-     bindings/js/JSHTMLElementCustom.cpp \
-     bindings/js/JSHTMLEmbedElementCustom.cpp \
-     bindings/js/JSHTMLFormElementCustom.cpp \
-     bindings/js/JSHTMLFrameElementCustom.cpp \
-     bindings/js/JSHTMLFrameSetElementCustom.cpp \
-     bindings/js/JSHTMLInputElementCustom.cpp \
-     bindings/js/JSHTMLLinkElementCustom.cpp \
-     bindings/js/JSHTMLMediaElementCustom.cpp \
-     bindings/js/JSHTMLObjectElementCustom.cpp \
-     bindings/js/JSHTMLOptionsCollectionCustom.cpp \
-     bindings/js/JSHTMLOutputElementCustom.cpp \
-     bindings/js/JSHTMLSelectElementCustom.cpp \
-     bindings/js/JSHTMLStyleElementCustom.cpp \
-     bindings/js/JSHistoryCustom.cpp \
-     bindings/js/JSImageConstructor.cpp \
-     bindings/js/JSImageDataCustom.cpp \
-     bindings/js/JSInjectedScriptHostCustom.cpp \
-     bindings/js/JSInjectedScriptManager.cpp \
-     bindings/js/JSInspectorFrontendHostCustom.cpp \
-     bindings/js/JSInt16ArrayCustom.cpp \
-     bindings/js/JSInt32ArrayCustom.cpp \
-     bindings/js/JSInt8ArrayCustom.cpp \
-     bindings/js/JSLazyEventListener.cpp \
-     bindings/js/JSLocationCustom.cpp \
-     bindings/js/JSMainThreadExecState.cpp \
-     bindings/js/JSMediaListCustom.cpp \
-     bindings/js/JSMemoryInfoCustom.cpp \
-     bindings/js/JSMessageChannelCustom.cpp \
-     bindings/js/JSMessageEventCustom.cpp \
-     bindings/js/JSMessagePortCustom.cpp \
-     bindings/js/JSMessagePortCustom.h \
-     bindings/js/JSMutationCallbackCustom.cpp \
-     bindings/js/JSMutationObserverCustom.cpp \
-     bindings/js/JSNamedNodeMapCustom.cpp \
-     bindings/js/JSNodeCustom.cpp \
-     bindings/js/JSNodeFilterCondition.cpp \
-     bindings/js/JSNodeFilterCustom.cpp \
-     bindings/js/JSNodeIteratorCustom.cpp \
-     bindings/js/JSNodeListCustom.cpp \
-     bindings/js/JSNotificationCustom.cpp \
-     bindings/js/JSPluginElementFunctions.cpp \
-     bindings/js/JSPopStateEventCustom.cpp \
-     bindings/js/JSProcessingInstructionCustom.cpp \
-     bindings/js/JSRequestAnimationFrameCallbackCustom.cpp \
-     bindings/js/JSScriptProfileNodeCustom.cpp \
-     bindings/js/JSStorageCustom.cpp \
-     bindings/js/JSStyleSheetCustom.cpp \
-     bindings/js/JSStyleSheetListCustom.cpp \
-     bindings/js/JSTextCustom.cpp \
-     bindings/js/JSTouchCustom.cpp \
-     bindings/js/JSTouchListCustom.cpp \
-     bindings/js/JSTreeWalkerCustom.cpp \
-     bindings/js/JSUint16ArrayCustom.cpp \
-     bindings/js/JSUint32ArrayCustom.cpp \
-     bindings/js/JSUint8ArrayCustom.cpp \
-     bindings/js/JSUint8ClampedArrayCustom.cpp \
-     bindings/js/JSWebKitAnimationCustom.cpp \
-     bindings/js/JSWebKitAnimationListCustom.cpp \
-     bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp \
-     bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp \
-     bindings/js/JSWebKitPointCustom.cpp \
-     bindings/js/JSXMLHttpRequestCustom.cpp \
-     bindings/js/JSXMLHttpRequestUploadCustom.cpp \
-     bindings/js/JSXPathResultCustom.cpp \
-     bindings/js/PageScriptDebugServer.cpp \
-     bindings/js/ScheduledAction.cpp \
-     bindings/js/ScriptCachedFrameData.cpp \
-     bindings/js/ScriptCallStackFactory.cpp \
-     bindings/js/ScriptController.cpp \
-     bindings/js/ScriptControllerQt.cpp \
-     bindings/js/ScriptDebugServer.cpp \
-     bindings/js/ScriptEventListener.cpp \
-     bindings/js/ScriptFunctionCall.cpp \
-     bindings/js/ScriptGCEvent.cpp \
-     bindings/js/ScriptObject.cpp \
-     bindings/js/ScriptProfile.cpp \
-     bindings/js/ScriptState.cpp \
-     bindings/js/ScriptValue.cpp \
-     bindings/js/SerializedScriptValue.cpp \
-     bridge/IdentifierRep.cpp \
-     bridge/NP_jsobject.cpp \
-     bridge/c/CRuntimeObject.cpp \
-     bridge/c/c_class.cpp \
-     bridge/c/c_instance.cpp \
-     bridge/c/c_runtime.cpp \
-     bridge/c/c_utility.cpp \
-     bridge/jsc/BridgeJSC.cpp \
-     bridge/npruntime.cpp \
-     bridge/qt/qt_class.cpp \
-     bridge/qt/qt_instance.cpp \
-     bridge/qt/qt_pixmapruntime.cpp \
-     bridge/runtime_array.cpp \
-     bridge/runtime_method.cpp \
-     bridge/runtime_object.cpp \
-     bridge/runtime_root.cpp \
-     testing/js/WebCoreTestSupport.cpp
+v8 {
+    include($$PWD/../JavaScriptCore/yarr/yarr.pri)
 
-haveQt(5) {
-    SOURCES += bridge/qt/qt_runtime.cpp
+    SOURCES += \
+        platform/qt/PlatformSupportQt.cpp \
+        bindings/generic/BindingSecurityBase.cpp \
+        \
+        bindings/v8/WorldContextHandle.cpp \
+        bindings/v8/V8IsolatedContext.cpp \
+        bindings/v8/custom/V8HistoryCustom.cpp \
+        bindings/v8/custom/V8PopStateEventCustom.cpp \
+        bindings/v8/ScriptGCEvent.cpp
+
+    SOURCES += \
+        bindings/v8/custom/V8ArrayBufferCustom.cpp \
+        bindings/v8/custom/V8ArrayBufferViewCustom.cpp \
+        bindings/v8/custom/V8BlobCustom.cpp \
+        bindings/v8/custom/V8CustomXPathNSResolver.cpp \
+        bindings/v8/custom/V8DataViewCustom.cpp \
+        bindings/v8/custom/V8DeviceMotionEventCustom.cpp \
+        bindings/v8/custom/V8DeviceOrientationEventCustom.cpp \
+        bindings/v8/custom/V8Float32ArrayCustom.cpp \
+        bindings/v8/custom/V8Float64ArrayCustom.cpp \
+        bindings/v8/custom/V8Int8ArrayCustom.cpp \
+        bindings/v8/custom/V8Int16ArrayCustom.cpp \
+        bindings/v8/custom/V8Int32ArrayCustom.cpp \
+        bindings/v8/custom/V8Uint8ArrayCustom.cpp \
+        bindings/v8/custom/V8Uint16ArrayCustom.cpp \
+        bindings/v8/custom/V8Uint32ArrayCustom.cpp \
+        bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp \
+        \
+        bindings/v8/DateExtension.cpp \
+        bindings/v8/DOMData.cpp \
+        bindings/v8/DOMDataStore.cpp \
+        bindings/v8/NPV8Object.cpp \
+        bindings/v8/NPObjectWrapper.cpp \
+        bindings/v8/Dictionary.cpp \
+        bindings/v8/PageScriptDebugServer.cpp \
+        bindings/v8/RetainedDOMInfo.cpp \
+        bindings/v8/ScheduledAction.cpp \
+        bindings/v8/ScopedDOMDataStore.cpp \
+        bindings/v8/ScriptCachedFrameData.cpp \
+        bindings/v8/ScriptCallStackFactory.cpp \
+        bindings/ScriptControllerBase.cpp \
+        bindings/v8/ScriptController.cpp \
+        bindings/v8/ScriptControllerQt.cpp \
+        bindings/v8/ScriptEventListener.cpp \
+        bindings/v8/ScriptFunctionCall.cpp \
+        bindings/v8/ScriptInstance.cpp \
+        bindings/v8/ScriptObject.cpp \
+        bindings/v8/ScriptScope.cpp \
+        bindings/v8/ScriptState.cpp \
+        bindings/v8/ScriptValue.cpp \
+        bindings/v8/StaticDOMDataStore.cpp \
+        bindings/v8/SerializedScriptValue.cpp \
+        bindings/v8/V8AbstractEventListener.cpp \
+        bindings/v8/V8Binding.cpp \
+        bindings/v8/V8BindingPerContextData.cpp \
+        bindings/v8/V8Collection.cpp \
+        bindings/v8/V8DOMMap.cpp \
+        bindings/v8/V8DOMWrapper.cpp \
+        bindings/v8/V8EventListener.cpp \
+        bindings/v8/V8EventListenerList.cpp \
+        bindings/v8/V8GCController.cpp \
+        bindings/v8/V8GCForContextDispose.cpp \
+        bindings/v8/V8Helpers.cpp \
+        bindings/v8/V8HiddenPropertyName.cpp \
+        bindings/v8/IsolatedWorld.cpp \
+        bindings/v8/V8LazyEventListener.cpp \
+        bindings/v8/V8NPObject.cpp \
+        bindings/v8/V8NPUtils.cpp \
+        bindings/v8/V8NodeFilterCondition.cpp \
+        bindings/v8/V8Proxy.cpp \
+        bindings/v8/V8RecursionScope.cpp \
+        bindings/v8/V8Utilities.cpp \
+        bindings/v8/V8WindowErrorHandler.cpp \
+        bindings/v8/V8WorkerContextEventListener.cpp \
+        bindings/v8/WorkerContextExecutionProxy.cpp \
+        bindings/v8/WorkerScriptDebugServer.cpp \
+        bindings/v8/WorkerScriptController.cpp \
+        \
+        bindings/v8/V8DOMWindowShell.cpp \
+        bindings/v8/DOMWrapperWorld.cpp \
+        \
+        bindings/v8/npruntime.cpp \
+        \
+        bindings/v8/custom/V8CSSRuleCustom.cpp \
+        bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp \
+        bindings/v8/custom/V8CSSValueCustom.cpp \
+        bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp \
+        bindings/v8/custom/V8ClipboardCustom.cpp \
+        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/V8DOMStringMapCustom.cpp
+
+    SOURCES += \
+        bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp \
+        bindings/v8/custom/V8CustomVoidCallback.cpp \
+        bindings/v8/custom/V8DOMFormDataCustom.cpp \
+        bindings/v8/custom/V8DOMWindowCustom.cpp \
+        bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp \
+        bindings/v8/custom/V8DocumentCustom.cpp \
+        bindings/v8/custom/V8DocumentLocationCustom.cpp \
+        bindings/v8/custom/V8EventCustom.cpp \
+        bindings/v8/custom/V8FileReaderCustom.cpp \
+        bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
+
+    SOURCES += \
+        bindings/v8/custom/V8HTMLCanvasElementCustom.cpp \
+        bindings/v8/custom/V8HTMLCollectionCustom.cpp \
+        bindings/v8/custom/V8HTMLDocumentCustom.cpp \
+        bindings/v8/custom/V8HTMLElementCustom.cpp \
+        bindings/v8/custom/V8HTMLFormElementCustom.cpp \
+        bindings/v8/custom/V8HTMLFrameElementCustom.cpp \
+        bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp \
+        bindings/v8/custom/V8HTMLImageElementConstructor.cpp \
+        bindings/v8/custom/V8HTMLInputElementCustom.cpp \
+        bindings/v8/custom/V8HTMLLinkElementCustom.cpp \
+        bindings/v8/custom/V8HTMLMediaElementCustom.cpp \
+        bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp \
+        bindings/v8/custom/V8HTMLOutputElementCustom.cpp \
+        bindings/v8/custom/V8HTMLPlugInElementCustom.cpp \
+        bindings/v8/custom/V8HTMLSelectElementCustom.cpp \
+        bindings/v8/custom/V8LocationCustom.cpp \
+        bindings/v8/custom/V8MessageChannelConstructor.cpp \
+        bindings/v8/custom/V8MessagePortCustom.cpp \
+        bindings/v8/custom/V8MessageEventCustom.cpp \
+        bindings/v8/custom/V8MutationCallbackCustom.cpp \
+        bindings/v8/custom/V8MutationObserverCustom.cpp \
+        bindings/v8/custom/V8NamedNodeMapCustom.cpp \
+        bindings/v8/custom/V8NamedNodesCollection.cpp \
+        bindings/v8/custom/V8NodeCustom.cpp \
+        bindings/v8/custom/V8NodeListCustom.cpp \
+        bindings/v8/custom/V8PerformanceCustom.cpp \
+        bindings/v8/custom/V8PerformanceEntryCustom.cpp \
+        bindings/v8/custom/V8SQLResultSetRowListCustom.cpp \
+        bindings/v8/custom/V8SQLTransactionCustom.cpp \
+        bindings/v8/custom/V8WebSocketCustom.cpp \
+        \
+        bindings/v8/custom/V8StorageCustom.cpp \
+        bindings/v8/custom/V8StyleSheetCustom.cpp \
+        bindings/v8/custom/V8StyleSheetListCustom.cpp \
+        bindings/v8/custom/V8WebKitAnimationCustom.cpp \
+        bindings/v8/custom/V8WebKitPointConstructor.cpp \
+        bindings/v8/custom/V8WorkerContextCustom.cpp \
+        bindings/v8/custom/V8WorkerCustom.cpp \
+        bindings/v8/custom/V8XMLHttpRequestConstructor.cpp \
+        bindings/v8/custom/V8XMLHttpRequestCustom.cpp \
+        \
+        bindings/v8/custom/V8SVGDocumentCustom.cpp \
+        bindings/v8/custom/V8SVGElementCustom.cpp \
+        bindings/v8/custom/V8SVGLengthCustom.cpp \
+        bindings/v8/custom/V8SVGPathSegCustom.cpp \
+        \
+        bindings/v8/specialization/V8BindingState.cpp\
+        \
+        bindings/v8/custom/V8NotificationCustom.cpp \
+        bindings/v8/custom/V8NotificationCenterCustom.cpp \
+        bindings/v8/custom/V8ConsoleCustom.cpp \
+        bindings/v8/custom/V8SQLTransactionSyncCustom.cpp \
+        bindings/v8/V8WorkerContextErrorHandler.cpp \
+        testing/v8/WebCoreTestSupport.cpp
 } else {
-    SOURCES += bridge/qt/qt_runtime_qt4.cpp
+    SOURCES += \
+        bindings/ScriptControllerBase.cpp \
+        bindings/js/CallbackFunction.cpp \
+        bindings/js/DOMObjectHashTableMap.cpp \
+        bindings/js/DOMWrapperWorld.cpp \
+        bindings/js/Dictionary.cpp \
+        bindings/js/GCController.cpp \
+        bindings/js/JSArrayBufferCustom.cpp \
+        bindings/js/JSAttrCustom.cpp \
+        bindings/js/JSBlobCustom.cpp \
+        bindings/js/JSCDATASectionCustom.cpp \
+        bindings/js/JSCSSFontFaceRuleCustom.cpp \
+        bindings/js/JSCSSImportRuleCustom.cpp \
+        bindings/js/JSCSSMediaRuleCustom.cpp \
+        bindings/js/JSCSSPageRuleCustom.cpp \
+        bindings/js/JSCSSRuleCustom.cpp \
+        bindings/js/JSCSSRuleListCustom.cpp \
+        bindings/js/JSCSSStyleDeclarationCustom.cpp \
+        bindings/js/JSCSSStyleRuleCustom.cpp \
+        bindings/js/JSCSSValueCustom.cpp \
+        bindings/js/JSCallbackData.cpp \
+        bindings/js/JSCanvasRenderingContext2DCustom.cpp \
+        bindings/js/JSCanvasRenderingContextCustom.cpp \
+        bindings/js/JSClipboardCustom.cpp \
+        bindings/js/JSConsoleCustom.cpp \
+        bindings/js/JSCoordinatesCustom.cpp \
+        bindings/js/JSCustomVoidCallback.cpp \
+        bindings/js/JSCustomXPathNSResolver.cpp \
+        bindings/js/JSDictionary.cpp \
+        bindings/js/JSDOMBinding.cpp \
+        bindings/js/JSDOMFormDataCustom.cpp \
+        bindings/js/JSDOMGlobalObject.cpp \
+        bindings/js/JSDOMImplementationCustom.cpp \
+        bindings/js/JSDOMMimeTypeArrayCustom.cpp \
+        bindings/js/JSDOMPluginArrayCustom.cpp \
+        bindings/js/JSDOMPluginCustom.cpp \
+        bindings/js/JSDOMStringListCustom.cpp \
+        bindings/js/JSDOMStringMapCustom.cpp \
+        bindings/js/JSDOMTokenListCustom.cpp \
+        bindings/js/JSDOMWindowBase.cpp \
+        bindings/js/JSDOMWindowCustom.cpp \
+        bindings/js/JSDOMWindowShell.cpp \
+        bindings/js/JSDOMWindowWebAudioCustom.cpp \
+        bindings/js/JSDOMWindowWebSocketCustom.cpp \
+        bindings/js/JSDOMWrapper.cpp \
+        bindings/js/JSDataViewCustom.cpp \
+        bindings/js/JSDesktopNotificationsCustom.cpp \
+        bindings/js/JSDeviceMotionEventCustom.cpp \
+        bindings/js/JSDeviceOrientationEventCustom.cpp \
+        bindings/js/JSDocumentCustom.cpp \
+        bindings/js/JSElementCustom.cpp \
+        bindings/js/JSErrorHandler.cpp \
+        bindings/js/JSEventCustom.cpp \
+        bindings/js/JSEventListener.cpp \
+        bindings/js/JSEventTargetCustom.cpp \
+        bindings/js/JSExceptionBase.cpp \
+        bindings/js/JSFileReaderCustom.cpp \
+        bindings/js/JSFloat32ArrayCustom.cpp \
+        bindings/js/JSFloat64ArrayCustom.cpp \
+        bindings/js/JSGeolocationCustom.cpp \
+        bindings/js/JSHTMLAllCollectionCustom.cpp \
+        bindings/js/JSHTMLAppletElementCustom.cpp \
+        bindings/js/JSHTMLCanvasElementCustom.cpp \
+        bindings/js/JSHTMLCollectionCustom.cpp \
+        bindings/js/JSHTMLDocumentCustom.cpp \
+        bindings/js/JSHTMLElementCustom.cpp \
+        bindings/js/JSHTMLEmbedElementCustom.cpp \
+        bindings/js/JSHTMLFormElementCustom.cpp \
+        bindings/js/JSHTMLFrameElementCustom.cpp \
+        bindings/js/JSHTMLFrameSetElementCustom.cpp \
+        bindings/js/JSHTMLInputElementCustom.cpp \
+        bindings/js/JSHTMLLinkElementCustom.cpp \
+        bindings/js/JSHTMLMediaElementCustom.cpp \
+        bindings/js/JSHTMLObjectElementCustom.cpp \
+        bindings/js/JSHTMLOptionsCollectionCustom.cpp \
+        bindings/js/JSHTMLOutputElementCustom.cpp \
+        bindings/js/JSHTMLSelectElementCustom.cpp \
+        bindings/js/JSHTMLStyleElementCustom.cpp \
+        bindings/js/JSHistoryCustom.cpp \
+        bindings/js/JSImageConstructor.cpp \
+        bindings/js/JSImageDataCustom.cpp \
+        bindings/js/JSInjectedScriptHostCustom.cpp \
+        bindings/js/JSInjectedScriptManager.cpp \
+        bindings/js/JSInspectorFrontendHostCustom.cpp \
+        bindings/js/JSInt16ArrayCustom.cpp \
+        bindings/js/JSInt32ArrayCustom.cpp \
+        bindings/js/JSInt8ArrayCustom.cpp \
+        bindings/js/JSLazyEventListener.cpp \
+        bindings/js/JSLocationCustom.cpp \
+        bindings/js/JSMainThreadExecState.cpp \
+        bindings/js/JSMediaListCustom.cpp \
+        bindings/js/JSMemoryInfoCustom.cpp \
+        bindings/js/JSMessageChannelCustom.cpp \
+        bindings/js/JSMessageEventCustom.cpp \
+        bindings/js/JSMessagePortCustom.cpp \
+        bindings/js/JSMessagePortCustom.h \
+        bindings/js/JSMutationCallbackCustom.cpp \
+        bindings/js/JSMutationObserverCustom.cpp \
+        bindings/js/JSNamedNodeMapCustom.cpp \
+        bindings/js/JSNodeCustom.cpp \
+        bindings/js/JSNodeFilterCondition.cpp \
+        bindings/js/JSNodeFilterCustom.cpp \
+        bindings/js/JSNodeIteratorCustom.cpp \
+        bindings/js/JSNodeListCustom.cpp \
+        bindings/js/JSNotificationCustom.cpp \
+        bindings/js/JSPluginElementFunctions.cpp \
+        bindings/js/JSPopStateEventCustom.cpp \
+        bindings/js/JSProcessingInstructionCustom.cpp \
+        bindings/js/JSRequestAnimationFrameCallbackCustom.cpp \
+        bindings/js/JSScriptProfileNodeCustom.cpp \
+        bindings/js/JSStorageCustom.cpp \
+        bindings/js/JSStyleSheetCustom.cpp \
+        bindings/js/JSStyleSheetListCustom.cpp \
+        bindings/js/JSTextCustom.cpp \
+        bindings/js/JSTouchCustom.cpp \
+        bindings/js/JSTouchListCustom.cpp \
+        bindings/js/JSTreeWalkerCustom.cpp \
+        bindings/js/JSUint16ArrayCustom.cpp \
+        bindings/js/JSUint32ArrayCustom.cpp \
+        bindings/js/JSUint8ArrayCustom.cpp \
+        bindings/js/JSUint8ClampedArrayCustom.cpp \
+        bindings/js/JSWebKitAnimationCustom.cpp \
+        bindings/js/JSWebKitAnimationListCustom.cpp \
+        bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp \
+        bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp \
+        bindings/js/JSWebKitPointCustom.cpp \
+        bindings/js/JSXMLHttpRequestCustom.cpp \
+        bindings/js/JSXMLHttpRequestUploadCustom.cpp \
+        bindings/js/JSXPathResultCustom.cpp \
+        bindings/js/PageScriptDebugServer.cpp \
+        bindings/js/ScheduledAction.cpp \
+        bindings/js/ScriptCachedFrameData.cpp \
+        bindings/js/ScriptCallStackFactory.cpp \
+        bindings/js/ScriptController.cpp \
+        bindings/js/ScriptControllerQt.cpp \
+        bindings/js/ScriptDebugServer.cpp \
+        bindings/js/ScriptEventListener.cpp \
+        bindings/js/ScriptFunctionCall.cpp \
+        bindings/js/ScriptGCEvent.cpp \
+        bindings/js/ScriptObject.cpp \
+        bindings/js/ScriptProfile.cpp \
+        bindings/js/ScriptState.cpp \
+        bindings/js/ScriptValue.cpp \
+        bindings/js/SerializedScriptValue.cpp \
+        bridge/IdentifierRep.cpp \
+        bridge/NP_jsobject.cpp \
+        bridge/c/CRuntimeObject.cpp \
+        bridge/c/c_class.cpp \
+        bridge/c/c_instance.cpp \
+        bridge/c/c_runtime.cpp \
+        bridge/c/c_utility.cpp \
+        bridge/jsc/BridgeJSC.cpp \
+        bridge/npruntime.cpp \
+        bridge/qt/qt_class.cpp \
+        bridge/qt/qt_instance.cpp \
+        bridge/qt/qt_pixmapruntime.cpp \
+        bridge/runtime_array.cpp \
+        bridge/runtime_method.cpp \
+        bridge/runtime_object.cpp \
+        bridge/runtime_root.cpp \
+        testing/js/WebCoreTestSupport.cpp
+
+    haveQt(5) {
+        SOURCES += bridge/qt/qt_runtime.cpp
+    } else {
+        SOURCES += bridge/qt/qt_runtime_qt4.cpp
+    }
 }
 
 SOURCES += \
@@ -1271,83 +1438,150 @@ HEADERS += \
     bindings/generic/ActiveDOMCallback.h \
     bindings/generic/RuntimeEnabledFeatures.h
 
-HEADERS += \
-    bindings/js/CachedScriptSourceProvider.h \
-    bindings/js/CallbackFunction.h \
-    bindings/js/GCController.h \
-    bindings/js/DOMObjectHashTableMap.h \
-    bindings/js/DOMWrapperWorld.h \
-    bindings/js/JSArrayBufferViewHelper.h \
-    bindings/js/JSCSSStyleDeclarationCustom.h \
-    bindings/js/JSCallbackData.h \
-    bindings/js/JSCustomVoidCallback.h \
-    bindings/js/JSCustomXPathNSResolver.h \
-    bindings/js/JSDictionary.h \
-    bindings/js/JSDOMBinding.h \
-    bindings/js/JSDOMGlobalObject.h \
-    bindings/js/JSDOMStringMapCustom.h \
-    bindings/js/JSDOMWindowBase.h \
-    bindings/js/JSDOMWindowCustom.h \
-    bindings/js/JSDOMWindowShell.h \
-    bindings/js/JSDOMWrapper.h \
-    bindings/js/JSErrorHandler.h \
-    bindings/js/JSEventListener.h \
-    bindings/js/JSHTMLAppletElementCustom.h \
-    bindings/js/JSHTMLEmbedElementCustom.h \
-    bindings/js/JSHTMLInputElementCustom.h \
-    bindings/js/JSHTMLObjectElementCustom.h \
-    bindings/js/JSHTMLSelectElementCustom.h \
-    bindings/js/JSHistoryCustom.h \
-    bindings/js/JSImageConstructor.h \
-    bindings/js/JSLazyEventListener.h \
-    bindings/js/JSLocationCustom.h \
-    bindings/js/JSNodeCustom.h \
-    bindings/js/JSNodeFilterCondition.h \
-    bindings/js/JSPluginElementFunctions.h \
-    bindings/js/JSStorageCustom.h \
-    bindings/js/JSWorkerContextBase.h \
-    bindings/js/JavaScriptCallFrame.h \
-    bindings/js/PageScriptDebugServer.h \
-    bindings/js/ScheduledAction.h \
-    bindings/js/ScriptCachedFrameData.h \
-    bindings/js/ScriptController.h \
-    bindings/js/ScriptDebugServer.h \
-    bindings/js/ScriptEventListener.h \
-    bindings/js/ScriptFunctionCall.h \
-    bindings/js/ScriptGCEvent.h \
-    bindings/js/ScriptHeapSnapshot.h \
-    bindings/js/ScriptObject.h \
-    bindings/js/ScriptProfile.h \
-    bindings/js/ScriptProfileNode.h \
-    bindings/js/ScriptProfiler.h \
-    bindings/js/ScriptSourceCode.h \
-    bindings/js/ScriptSourceProvider.h \
-    bindings/js/ScriptState.h \
-    bindings/js/ScriptValue.h \
-    bindings/js/ScriptWrappable.h \
-    bindings/js/SerializedScriptValue.h \
-    bindings/js/StringSourceProvider.h \
-    bindings/js/WebCoreJSClientData.h \
-    bindings/js/WorkerScriptController.h \
-    bindings/js/WorkerScriptDebugServer.h \
-    bridge/Bridge.h \
-    bridge/c/CRuntimeObject.h \
-    bridge/c/c_class.h \
-    bridge/c/c_instance.h \
-    bridge/c/c_runtime.h \
-    bridge/c/c_utility.h \
-    bridge/jsc/BridgeJSC.h \
-    bridge/IdentifierRep.h \
-    bridge/NP_jsobject.h \
-    bridge/qt/qt_class.h \
-    bridge/qt/qt_instance.h \
-    bridge/qt/qt_runtime.h \
-    bridge/qt/qt_pixmapruntime.h \
-    bridge/runtime_array.h \
-    bridge/runtime_method.h \
-    bridge/runtime_object.h \
-    bridge/runtime_root.h \
-    plugins/npruntime.h
+v8 {
+    HEADERS += \
+        bindings/v8/custom/V8CustomVoidCallback.h \
+        bindings/v8/custom/V8CustomXPathNSResolver.h \
+        bindings/v8/custom/V8HTMLImageElementConstructor.h \
+        bindings/v8/custom/V8HTMLSelectElementCustom.h \
+        bindings/v8/custom/V8NamedNodesCollection.h \
+        \
+        bindings/v8/DateExtension.h \
+        bindings/v8/DOMData.h \
+        bindings/v8/DOMDataStore.h \
+        bindings/v8/DOMWrapperWorld.h \
+        bindings/v8/IsolatedWorld.h \
+        bindings/v8/npruntime_impl.h \
+        bindings/v8/npruntime_priv.h \
+        bindings/v8/NPV8Object.h \
+        bindings/v8/NPObjectWrapper.h \
+        bindings/v8/OwnHandle.h \
+        bindings/v8/PageScriptDebugServer.h \
+        bindings/v8/RetainedDOMInfo.h \
+        bindings/v8/RetainedObjectInfo.h \
+        bindings/v8/SafeAllocation.h \
+        bindings/v8/ScheduledAction.h \
+        bindings/v8/ScopedDOMDataStore.h \
+        bindings/v8/ScriptCachedFrameData.h \
+        bindings/v8/ScriptController.h \
+        bindings/v8/ScriptEventListener.h \
+        bindings/v8/ScriptFunctionCall.h \
+        bindings/v8/ScriptInstance.h \
+        bindings/v8/ScriptObject.h \
+        bindings/v8/ScriptProfile.h \
+        bindings/v8/ScriptProfiler.h \
+        bindings/v8/ScriptScope.h \
+        bindings/v8/ScriptSourceCode.h \
+        bindings/v8/ScriptState.h \
+        bindings/v8/ScriptValue.h \
+        bindings/v8/ScriptWrappable.h \
+        bindings/v8/SerializedScriptValue.h \
+        bindings/v8/SharedPersistent.h \
+        bindings/v8/StaticDOMDataStore.h \
+        bindings/v8/V8AbstractEventListener.h \
+        bindings/v8/V8Binding.h \
+        bindings/v8/V8Collection.h \
+        bindings/v8/V8DOMMap.h \
+        bindings/v8/V8DOMWindowShell.h \
+        bindings/v8/V8DOMWrapper.h \
+        bindings/v8/V8EventListener.h \
+        bindings/v8/V8EventListenerList.h \
+        bindings/v8/V8GCController.h \
+        bindings/v8/V8Helpers.h \
+        bindings/v8/V8HiddenPropertyName.h \
+        bindings/v8/V8IsolatedContext.h \
+        bindings/v8/V8LazyEventListener.h \
+        bindings/v8/V8NodeFilterCondition.h \
+        bindings/v8/V8NPObject.h \
+        bindings/v8/V8NPUtils.h \
+        bindings/v8/V8Proxy.h \
+        bindings/v8/V8RecursionScope.h \
+        bindings/v8/V8Utilities.h \
+        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 {
+    HEADERS += \
+        bindings/js/CachedScriptSourceProvider.h \
+        bindings/js/CallbackFunction.h \
+        bindings/js/GCController.h \
+        bindings/js/DOMObjectHashTableMap.h \
+        bindings/js/DOMWrapperWorld.h \
+        bindings/js/JSArrayBufferViewHelper.h \
+        bindings/js/JSCSSStyleDeclarationCustom.h \
+        bindings/js/JSCallbackData.h \
+        bindings/js/JSCustomVoidCallback.h \
+        bindings/js/JSCustomXPathNSResolver.h \
+        bindings/js/JSDictionary.h \
+        bindings/js/JSDOMBinding.h \
+        bindings/js/JSDOMGlobalObject.h \
+        bindings/js/JSDOMStringMapCustom.h \
+        bindings/js/JSDOMWindowBase.h \
+        bindings/js/JSDOMWindowCustom.h \
+        bindings/js/JSDOMWindowShell.h \
+        bindings/js/JSDOMWrapper.h \
+        bindings/js/JSErrorHandler.h \
+        bindings/js/JSEventListener.h \
+        bindings/js/JSHTMLAppletElementCustom.h \
+        bindings/js/JSHTMLEmbedElementCustom.h \
+        bindings/js/JSHTMLInputElementCustom.h \
+        bindings/js/JSHTMLObjectElementCustom.h \
+        bindings/js/JSHTMLSelectElementCustom.h \
+        bindings/js/JSHistoryCustom.h \
+        bindings/js/JSImageConstructor.h \
+        bindings/js/JSLazyEventListener.h \
+        bindings/js/JSLocationCustom.h \
+        bindings/js/JSNodeCustom.h \
+        bindings/js/JSNodeFilterCondition.h \
+        bindings/js/JSPluginElementFunctions.h \
+        bindings/js/JSStorageCustom.h \
+        bindings/js/JSWorkerContextBase.h \
+        bindings/js/JavaScriptCallFrame.h \
+        bindings/js/PageScriptDebugServer.h \
+        bindings/js/ScheduledAction.h \
+        bindings/js/ScriptCachedFrameData.h \
+        bindings/js/ScriptController.h \
+        bindings/js/ScriptDebugServer.h \
+        bindings/js/ScriptEventListener.h \
+        bindings/js/ScriptFunctionCall.h \
+        bindings/js/ScriptGCEvent.h \
+        bindings/js/ScriptHeapSnapshot.h \
+        bindings/js/ScriptObject.h \
+        bindings/js/ScriptProfile.h \
+        bindings/js/ScriptProfileNode.h \
+        bindings/js/ScriptProfiler.h \
+        bindings/js/ScriptSourceCode.h \
+        bindings/js/ScriptSourceProvider.h \
+        bindings/js/ScriptState.h \
+        bindings/js/ScriptValue.h \
+        bindings/js/ScriptWrappable.h \
+        bindings/js/SerializedScriptValue.h \
+        bindings/js/StringSourceProvider.h \
+        bindings/js/WebCoreJSClientData.h \
+        bindings/js/WorkerScriptController.h \
+        bindings/js/WorkerScriptDebugServer.h \
+        bridge/Bridge.h \
+        bridge/c/CRuntimeObject.h \
+        bridge/c/c_class.h \
+        bridge/c/c_instance.h \
+        bridge/c/c_runtime.h \
+        bridge/c/c_utility.h \
+        bridge/jsc/BridgeJSC.h \
+        bridge/IdentifierRep.h \
+        bridge/NP_jsobject.h \
+        bridge/qt/qt_class.h \
+        bridge/qt/qt_instance.h \
+        bridge/qt/qt_runtime.h \
+        bridge/qt/qt_pixmapruntime.h \
+        bridge/runtime_array.h \
+        bridge/runtime_method.h \
+        bridge/runtime_object.h \
+        bridge/runtime_root.h \
+        plugins/npruntime.h
+}
 
 HEADERS += \
     Modules/geolocation/Geolocation.h \
@@ -2875,16 +3109,20 @@ contains(DEFINES, ENABLE_SQL_DATABASE=1) {
         Modules/webdatabase/SQLTransactionCoordinator.cpp \
         Modules/webdatabase/SQLTransactionSync.cpp \
 
-    SOURCES += \
-        bindings/js/JSCustomSQLStatementErrorCallback.cpp \
-        bindings/js/JSSQLResultSetRowListCustom.cpp \
-        bindings/js/JSSQLTransactionCustom.cpp \
-        bindings/js/JSSQLTransactionSyncCustom.cpp
+    !v8 {
+        SOURCES += \
+            bindings/js/JSCustomSQLStatementErrorCallback.cpp \
+            bindings/js/JSSQLResultSetRowListCustom.cpp \
+            bindings/js/JSSQLTransactionCustom.cpp \
+            bindings/js/JSSQLTransactionSyncCustom.cpp
+    }
 }
 
 contains(DEFINES, ENABLE_INDEXED_DATABASE=1) {
-    HEADERS += \
-        bindings/js/IDBBindingUtilities.h \
+    !v8 {
+        HEADERS += \
+            bindings/js/IDBBindingUtilities.h \
+    }
 
     HEADERS += \
         Modules/indexeddb/IDBAny.h \
@@ -2913,10 +3151,12 @@ contains(DEFINES, ENABLE_INDEXED_DATABASE=1) {
         Modules/indexeddb/IDBTransaction.h \
         Modules/indexeddb/IDBTransactionBackendInterface.h
 
-    SOURCES += \
-        bindings/js/IDBBindingUtilities.cpp \
-        bindings/js/JSIDBAnyCustom.cpp \
-        bindings/js/JSIDBKeyCustom.cpp
+    !v8 {
+        SOURCES += \
+            bindings/js/IDBBindingUtilities.cpp \
+            bindings/js/JSIDBAnyCustom.cpp \
+            bindings/js/JSIDBKeyCustom.cpp
+    }
 
     SOURCES += \
         Modules/indexeddb/DOMWindowIndexedDatabase.cpp \
@@ -3011,14 +3251,15 @@ contains(DEFINES, ENABLE_ICONDATABASE=1) {
 }
 
 contains(DEFINES, ENABLE_WORKERS=1) {
-    SOURCES += \
-        bindings/js/JSDedicatedWorkerContextCustom.cpp \
-        bindings/js/JSWorkerContextBase.cpp \
-        bindings/js/JSWorkerContextCustom.cpp \
-        bindings/js/JSWorkerCustom.cpp \
-        bindings/js/WorkerScriptController.cpp \
-        bindings/js/WorkerScriptDebugServer.cpp
-
+    !v8 {
+        SOURCES += \
+            bindings/js/JSDedicatedWorkerContextCustom.cpp \
+            bindings/js/JSWorkerContextBase.cpp \
+            bindings/js/JSWorkerContextCustom.cpp \
+            bindings/js/JSWorkerCustom.cpp \
+            bindings/js/WorkerScriptController.cpp \
+            bindings/js/WorkerScriptDebugServer.cpp
+    }
     SOURCES += \
         loader/WorkerThreadableLoader.cpp \
         page/WorkerNavigator.cpp \
@@ -3036,9 +3277,10 @@ contains(DEFINES, ENABLE_WORKERS=1) {
 }
 
 contains(DEFINES, ENABLE_SHARED_WORKERS=1) {
-    SOURCES += \
-        bindings/js/JSSharedWorkerCustom.cpp
-
+    !v8 {
+        SOURCES += \
+            bindings/js/JSSharedWorkerCustom.cpp
+    }
     SOURCES += \
         workers/DefaultSharedWorkerRepository.cpp \
         workers/SharedWorker.cpp \
@@ -3171,8 +3413,13 @@ contains(DEFINES, ENABLE_FULLSCREEN_API=1) {
 }
 
 contains(DEFINES, ENABLE_XSLT=1) {
-    SOURCES += \
-        bindings/js/JSXSLTProcessorCustom.cpp
+    v8 {
+        SOURCES += \
+            bindings/v8/custom/V8XSLTProcessorCustom.cpp
+    } else {
+         SOURCES += \
+            bindings/js/JSXSLTProcessorCustom.cpp
+    }
 
     SOURCES += xml/XMLTreeViewer.cpp
     HEADERS += xml/XMLTreeViewer.h
@@ -3297,12 +3544,21 @@ contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
         platform/qt/DeviceOrientationProviderQt.cpp
 }
 
+contains(DEFINES, ENABLE_GEOLOCATION=1) {
+    v8 {
+        SOURCES += \
+            bindings/v8/custom/V8GeolocationCustom.cpp
+    }
+}
+
 contains(DEFINES, ENABLE_SVG=1) {
-    SOURCES += \
-# TODO: this-one-is-not-auto-added! FIXME! tmp/SVGElementFactory.cpp \
-        bindings/js/JSSVGElementInstanceCustom.cpp \
-        bindings/js/JSSVGLengthCustom.cpp \
-        bindings/js/JSSVGPathSegCustom.cpp
+    !v8 {
+        SOURCES += \
+    # TODO: this-one-is-not-auto-added! FIXME! tmp/SVGElementFactory.cpp \
+            bindings/js/JSSVGElementInstanceCustom.cpp \
+            bindings/js/JSSVGLengthCustom.cpp \
+            bindings/js/JSSVGPathSegCustom.cpp
+    }
 
     SOURCES += \
         css/SVGCSSComputedStyleDeclaration.cpp \
@@ -3541,22 +3797,40 @@ contains(DEFINES, ENABLE_SVG=1) {
 }
 
 contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1) {
-    SOURCES += \
-        bindings/js/JSJavaScriptCallFrameCustom.cpp \
-        bindings/js/ScriptProfiler.cpp \
-        bindings/js/JavaScriptCallFrame.cpp
+    v8 {
+        SOURCES += \
+            bindings/v8/ScriptDebugServer.cpp \
+            bindings/v8/ScriptProfiler.cpp \
+            bindings/v8/ScriptHeapSnapshot.cpp \
+            bindings/v8/JavaScriptCallFrame.cpp \
+            bindings/v8/custom/V8ScriptProfileCustom.cpp \
+            bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp \
+            bindings/v8/custom/V8ScriptProfileNodeCustom.cpp \
+            bindings/v8/ScriptProfileNode.cpp \
+            bindings/v8/ScriptProfile.cpp
+    } else {
+        SOURCES += \
+            bindings/js/JSJavaScriptCallFrameCustom.cpp \
+            bindings/js/ScriptProfiler.cpp \
+            bindings/js/JavaScriptCallFrame.cpp
+    }
 }
 
 
 contains(DEFINES, ENABLE_VIDEO_TRACK=1) {
-    SOURCES += \
-        bindings/js/JSTextTrackCueCustom.cpp \
-        bindings/js/JSTextTrackCustom.cpp \
-        bindings/js/JSTextTrackCustom.h \
-        bindings/js/JSTrackCustom.cpp \
-        bindings/js/JSTrackCustom.h \
-        bindings/js/JSTrackEventCustom.cpp \
-        bindings/js/JSTextTrackListCustom.cpp
+    v8 {
+        SOURCES += \
+            bindings/v8/custom/V8TrackEventCustom.cpp
+    } else {
+        SOURCES += \
+            bindings/js/JSTextTrackCueCustom.cpp \
+            bindings/js/JSTextTrackCustom.cpp \
+            bindings/js/JSTextTrackCustom.h \
+            bindings/js/JSTrackCustom.cpp \
+            bindings/js/JSTrackCustom.h \
+            bindings/js/JSTrackEventCustom.cpp \
+            bindings/js/JSTextTrackListCustom.cpp
+    }
 }
 
 contains(DEFINES, ENABLE_WEB_SOCKETS=1) {
@@ -3595,8 +3869,10 @@ contains(DEFINES, ENABLE_WEB_SOCKETS=1) {
         platform/network/SocketStreamHandleBase.cpp \
         platform/network/qt/SocketStreamHandleQt.cpp
 
-    SOURCES += \
-        bindings/js/JSWebSocketCustom.cpp
+    !v8 {
+        SOURCES += \
+            bindings/js/JSWebSocketCustom.cpp
+    }
 
     contains(DEFINES, ENABLE_WORKERS=1) {
         HEADERS += \
@@ -3639,8 +3915,13 @@ contains(DEFINES, ENABLE_WEBGL=1) {
         html/canvas/WebGLUniformLocation.h \
         html/canvas/WebGLVertexArrayObjectOES.h \
 
-    SOURCES += \
-        bindings/js/JSWebGLRenderingContextCustom.cpp
+    v8 {
+        SOURCES += \
+            bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
+    } else {
+        SOURCES += \
+            bindings/js/JSWebGLRenderingContextCustom.cpp
+    }
 
     SOURCES += \
         html/canvas/CanvasContextAttributes.cpp \
index 49522f3..b399bc2 100644 (file)
@@ -94,12 +94,24 @@ INCLUDEPATH += \
     $$SOURCE_DIR/xml/parser \
     $$SOURCE_DIR/../ThirdParty
 
-INCLUDEPATH += \
-    $$SOURCE_DIR/bridge/jsc \
-    $$SOURCE_DIR/bindings/js \
-    $$SOURCE_DIR/bindings/js/specialization \
-    $$SOURCE_DIR/bridge/c \
-    $$SOURCE_DIR/testing/js
+v8 {
+    DEFINES *= V8_BINDING=1
+
+    INCLUDEPATH += \
+        $$SOURCE_DIR/bindings/v8 \
+        $$SOURCE_DIR/bindings/v8/custom \
+        $$SOURCE_DIR/bindings/v8/specialization \
+        $$SOURCE_DIR/bridge/qt/v8 \
+        $$SOURCE_DIR/testing/v8
+
+} else {
+    INCLUDEPATH += \
+        $$SOURCE_DIR/bridge/jsc \
+        $$SOURCE_DIR/bindings/js \
+        $$SOURCE_DIR/bindings/js/specialization \
+        $$SOURCE_DIR/bridge/c \
+        $$SOURCE_DIR/testing/js
+}
 
 INCLUDEPATH += $$WEBCORE_GENERATED_SOURCES_DIR
 
index f7af1b4..0a86d61 100644 (file)
 
 #include "config.h"
 #include "ScriptCachedFrameData.h"
+
+#if PLATFORM(QT)
+// FIXME: the right guard should be ENABLE(PAGE_CACHE). Replace with the right guard, once
+// https://bugs.webkit.org/show_bug.cgi?id=35061 is fixed.
+
+#include "Frame.h"
+#include "V8DOMWindow.h"
+
+namespace WebCore {
+
+ScriptCachedFrameData::ScriptCachedFrameData(Frame* frame)
+    : m_domWindow(0)
+{
+    v8::HandleScope handleScope;
+    // The context can only be the context of the main world.
+    ASSERT(V8Proxy::mainWorldContext(frame) == V8Proxy::context(frame));
+    m_context.set(V8Proxy::mainWorldContext(frame));
+    // The context can be 0, e.g. if JS is disabled in the browser.
+    if (m_context.get().IsEmpty())
+        return;
+    m_global.set(m_context.get()->Global());
+    m_domWindow = frame->domWindow();
+}
+
+DOMWindow* ScriptCachedFrameData::domWindow() const
+{
+    return m_domWindow;
+}
+
+void ScriptCachedFrameData::restore(Frame* frame)
+{
+    if (m_context.get().IsEmpty())
+        return;
+
+    if (!frame || !frame->script()->canExecuteScripts(NotAboutToExecuteScript))
+        return;
+
+    v8::HandleScope handleScope;
+    v8::Context::Scope contextScope(m_context.get());
+
+    m_context.get()->ReattachGlobal(m_global.get());
+    V8Proxy* proxy = V8Proxy::retrieve(frame);
+    if (proxy)
+        proxy->windowShell()->setContext(m_context.get());
+}
+
+void ScriptCachedFrameData::clear()
+{
+    m_context.clear();
+    m_global.clear();
+}
+
+} // namespace WebCore
+
+#endif // PLATFORM(QT)
index 75e51d4..1e3a2f6 100644 (file)
@@ -51,6 +51,37 @@ public:
 
 } // namespace WebCore
 
+#elif PLATFORM(QT)
+// FIXME: the right guard should be ENABLE(PAGE_CACHE). Replace with the right guard, once
+// https://bugs.webkit.org/show_bug.cgi?id=35061 is fixed.
+
+#include "OwnHandle.h"
+#include <v8.h>
+#include <wtf/Noncopyable.h>
+
+namespace WebCore {
+
+class Frame;
+class DOMWindow;
+
+class ScriptCachedFrameData  {
+    WTF_MAKE_NONCOPYABLE(ScriptCachedFrameData);
+public:
+    ScriptCachedFrameData(Frame*);
+    ~ScriptCachedFrameData() { }
+
+    void restore(Frame*);
+    void clear();
+    DOMWindow* domWindow() const;
+
+private:
+    OwnHandle<v8::Object> m_global;
+    OwnHandle<v8::Context> m_context;
+    DOMWindow* m_domWindow;
+};
+
+} // namespace WebCore
+
 #else
 #error You need to consider whether you want Page Cache and either add a stub or a real implementation.
 #endif // PLATFORM(CHROMIUM)
index 0a84a1c..d0a7e06 100644 (file)
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/CString.h>
 
+#if PLATFORM(QT)
+#include <QtQml/QJSEngine>
+#endif
+
 namespace WebCore {
 
 void ScriptController::initializeThreading()
index 32cb335..7c78368 100644 (file)
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
 
+#if PLATFORM(QT)
+#include <qglobal.h>
+QT_BEGIN_NAMESPACE
+class QJSEngine;
+QT_END_NAMESPACE
+#endif
+
 struct NPObject;
 
 namespace WebCore {
@@ -173,6 +180,10 @@ public:
     NPObject* createScriptObjectForPluginElement(HTMLPlugInElement*);
     NPObject* windowScriptNPObject();
 
+#if PLATFORM(QT)
+    QJSEngine* qtScriptEngine();
+#endif
+
     // Dummy method to avoid a bunch of ifdef's in WebCore.
     void evaluateInWorld(const ScriptSourceCode&, DOMWrapperWorld*);
     static void getAllWorlds(Vector<RefPtr<DOMWrapperWorld> >& worlds);
@@ -185,6 +196,9 @@ private:
 
     OwnPtr<V8Proxy> m_proxy;
     typedef HashMap<Widget*, NPObject*> PluginObjectMap;
+#if PLATFORM(QT)
+    OwnPtr<QJSEngine> m_qtScriptEngine;
+#endif
 
     // A mapping between Widgets and their corresponding script object.
     // This list is used so that when the plugin dies, we can immediately
diff --git a/Source/WebCore/bindings/v8/ScriptControllerQt.cpp b/Source/WebCore/bindings/v8/ScriptControllerQt.cpp
new file mode 100644 (file)
index 0000000..1d7f794
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ScriptController.h"
+
+#include <QtQml/QJSEngine>
+
+namespace WebCore {
+
+QJSEngine* ScriptController::qtScriptEngine()
+{
+    if (!m_qtScriptEngine) {
+        v8::HandleScope handleScope;
+        v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(m_frame);
+        v8::Context::Scope scope(v8Context);
+        if (v8Context.IsEmpty())
+            return 0;
+        m_qtScriptEngine = adoptPtr(new QJSEngine(QJSEngine::AdoptCurrentContext));
+     }
+     return m_qtScriptEngine.get();
+}
+
+}
+// vim: ts=4 sw=4 et
index 65182a7..5943dc3 100644 (file)
@@ -509,7 +509,7 @@ void V8GCController::gcEpilogue()
 
 void V8GCController::checkMemoryUsage()
 {
-#if PLATFORM(CHROMIUM)
+#if PLATFORM(CHROMIUM) || PLATFORM(QT)
     const int lowMemoryUsageMB = MemoryUsageSupport::lowMemoryUsageMB();
     const int highMemoryUsageMB = MemoryUsageSupport::highMemoryUsageMB();
     const int highUsageDeltaMB = MemoryUsageSupport::highUsageDeltaMB();
index 659fd8b..62ee6bd 100644 (file)
@@ -135,6 +135,7 @@ v8::Handle<v8::Value> V8InspectorFrontendHost::showContextMenuCallback(const v8:
     return v8::Undefined();
 }
 
+#if !PLATFORM(QT)
 static v8::Handle<v8::Value> histogramEnumeration(const char* name, const v8::Arguments& args, int boundaryValue)
 {
     if (args.Length() < 1 || !args[0]->IsInt32())
@@ -146,20 +147,33 @@ static v8::Handle<v8::Value> histogramEnumeration(const char* name, const v8::Ar
 
     return v8::Undefined();
 }
+#endif
 
 v8::Handle<v8::Value> V8InspectorFrontendHost::recordActionTakenCallback(const v8::Arguments& args)
 {
+#if !PLATFORM(QT)
     return histogramEnumeration("DevTools.ActionTaken", args, 100);
+#else
+    return v8::Undefined();
+#endif
 }
 
 v8::Handle<v8::Value> V8InspectorFrontendHost::recordPanelShownCallback(const v8::Arguments& args)
 {
+#if !PLATFORM(QT)
     return histogramEnumeration("DevTools.PanelShown", args, 20);
+#else
+    return v8::Undefined();
+#endif
 }
 
 v8::Handle<v8::Value> V8InspectorFrontendHost::recordSettingChangedCallback(const v8::Arguments& args)
 {
+#if !PLATFORM(QT)
     return histogramEnumeration("DevTools.SettingChanged", args, 100);
+#else
+    return v8::Undefined();
+#endif
 }
 
 } // namespace WebCore
index 94af147..3784eed 100644 (file)
 #include <wtf/ExportMacros.h>
 #include "PlatformExportMacros.h"
 
+#if PLATFORM(QT) && USE(V8)
+#include <JavaScriptCore/runtime/JSExportMacros.h>
+#else
 #include <runtime/JSExportMacros.h>
+#endif
 
 #ifdef __APPLE__
 #define HAVE_FUNC_USLEEP 1
@@ -154,6 +158,11 @@ typedef float CGFloat;
 #define WTF_USE_CA 1
 #endif
 
+#if PLATFORM(QT) && USE(V8) && defined(Q_WS_X11)
+/* protect ourselves from evil X11 defines */
+#include <bridge/npruntime_internal.h>
+#endif
+
 // FIXME: Move this to JavaScriptCore/wtf/Platform.h, which is where we define WTF_USE_AVFOUNDATION on the Mac.
 // https://bugs.webkit.org/show_bug.cgi?id=67334
 #if PLATFORM(WIN) && HAVE(AVCF)
index 50128cb..bdf204b 100644 (file)
@@ -33,6 +33,7 @@
 #include "HTMLElement.h"
 #include "StylePropertySet.h"
 #include "StyleRule.h"
+#if USE(JSC)
 #include "Completion.h"
 #include "JSGlobalObject.h"
 #include "JSHTMLElement.h"
 #include "PropertyNameArray.h"
 #include <parser/SourceCode.h>
 #include "qt_runtime.h"
+#elif USE(V8)
+#include "V8DOMWindow.h"
+#include "V8Binding.h"
+#include "NotImplemented.h"
+#endif
 #include "NodeList.h"
 #include "RenderImage.h"
 #include "ScriptState.h"
 #include "markup.h"
 #include "qwebframe.h"
 #include "qwebframe_p.h"
+#if USE(JSC)
 #include "runtime_root.h"
 #include <JSDocument.h>
+#endif
 #include <wtf/Vector.h>
 #include <wtf/text/CString.h>
 
@@ -708,6 +716,7 @@ QWebFrame *QWebElement::webFrame() const
     return QWebFramePrivate::kit(frame);
 }
 
+#if USE(JSC)
 static bool setupScriptContext(WebCore::Element* element, JSC::JSValue& thisValue, ScriptState*& state, ScriptController*& scriptController)
 {
     if (!element)
@@ -735,6 +744,27 @@ static bool setupScriptContext(WebCore::Element* element, JSC::JSValue& thisValu
 
     return true;
 }
+#elif USE(V8)
+static bool setupScriptContext(WebCore::Element* element, v8::Handle<v8::Value>& thisValue, ScriptState*& state, ScriptController*& scriptController)
+{
+    if (!element)
+        return false;
+
+    Document* document = element->document();
+    if (!document)
+        return false;
+
+    Frame* frame = document->frame();
+    if (!frame)
+        return false;
+
+    state = mainWorldScriptState(frame);
+    // Get V8 wrapper for DOM element
+    thisValue = toV8(frame->domWindow());
+    return true;
+}
+#endif
+
 
 /*!
     Executes \a scriptSource with this element as \c this object.
@@ -745,11 +775,16 @@ QVariant QWebElement::evaluateJavaScript(const QString& scriptSource)
         return QVariant();
 
     ScriptState* state = 0;
+#if USE(JSC)
     JSC::JSValue thisValue;
+#elif USE(V8)
+    v8::Handle<v8::Value> thisValue;
+#endif
     ScriptController* scriptController = 0;
 
     if (!setupScriptContext(m_element, thisValue, state, scriptController))
         return QVariant();
+#if USE(JSC)
     JSC::ScopeChainNode* scopeChain = state->dynamicGlobalObject()->globalScopeChain();
     JSC::UString script(reinterpret_cast_ptr<const UChar*>(scriptSource.data()), scriptSource.length());
 
@@ -760,6 +795,10 @@ QVariant QWebElement::evaluateJavaScript(const QString& scriptSource)
 
     int distance = 0;
     return JSC::Bindings::convertValueToQVariant(state, evaluationResult, QMetaType::Void, &distance);
+#elif USE(V8)
+    notImplemented();
+    return QVariant();
+#endif
 }
 
 /*!
@@ -2036,6 +2075,7 @@ QList<QWebElement> QWebElementCollection::toList() const
     element pointed to by the \a other iterator.
 */
 
+#if USE(JSC)
 QWebElement QtWebElementRuntime::create(Element* element)
 {
     return QWebElement(element);
@@ -2071,6 +2111,7 @@ static JSC::JSValue convertWebElementVariantToJSValue(JSC::ExecState* exec, WebC
 {
     return WebCore::toJS(exec, globalObject, QtWebElementRuntime::get(variant.value<QWebElement>()));
 }
+#endif
 
 void QtWebElementRuntime::initialize()
 {
@@ -2078,6 +2119,8 @@ void QtWebElementRuntime::initialize()
     if (initialized)
         return;
     initialized = true;
+#if USE(JSC)
     int id = qRegisterMetaType<QWebElement>();
     JSC::Bindings::registerCustomType(id, convertJSValueToWebElementVariant, convertWebElementVariantToJSValue);
+#endif
 }
index dac4165..6d2c404 100644 (file)
 #include "config.h"
 #include "qwebframe.h"
 
+#if USE(JSC)
 #include "APICast.h"
 #include "BridgeJSC.h"
 #include "CallFrame.h"
+#elif USE(V8)
+#include "V8Binding.h"
+#include <QJSEngine>
+#endif
 #include "Document.h"
 #include "DocumentLoader.h"
 #include "DragData.h"
 #include "FrameSelection.h"
 #include "FrameTree.h"
 #include "FrameView.h"
+#if USE(JSC)
 #include "GCController.h"
+#elif USE(V8)
+#include "V8GCController.h"
+#endif
 #include "GraphicsContext.h"
 #include "HTMLFormElement.h"
 #include "HTMLMetaElement.h"
@@ -42,6 +51,7 @@
 #include "HTTPParsers.h"
 #include "IconDatabase.h"
 #include "InspectorController.h"
+#if USE(JSC)
 #include "JavaScript.h"
 #include "JSDOMBinding.h"
 #include "JSDOMWindowBase.h"
 #include "JSObject.h"
 #include "JSRetainPtr.h"
 #include "OpaqueJSString.h"
+#elif USE(V8)
+#include "V8DOMWrapper.h"
+#include "V8DOMWindowShell.h"
+#endif
 #include "NetworkingContext.h"
 #include "NodeList.h"
 #include "Page.h"
 #include "PlatformMouseEvent.h"
 #include "PlatformWheelEvent.h"
 #include "PrintContext.h"
+#if USE(JSC)
 #include "PropertyDescriptor.h"
 #include "PutPropertySlot.h"
+#endif
 #include "RenderLayer.h"
 #include "RenderTreeAsText.h"
 #include "RenderView.h"
 #include "TiledBackingStore.h"
 #include "htmlediting.h"
 #include "markup.h"
+#if USE(JSC)
 #include "qt_instance.h"
 #include "qt_runtime.h"
+#endif
 #include "qwebelement.h"
 #include "qwebframe_p.h"
 #include "qwebpage.h"
 #include "qwebsecurityorigin_p.h"
 #include "qwebscriptworld.h"
 #include "qwebscriptworld_p.h"
+#if USE(JSC)
 #include "runtime_object.h"
 #include "runtime_root.h"
+#endif
 #if USE(TEXTURE_MAPPER)
 #include "texmap/TextureMapper.h"
 #include "texmap/TextureMapperLayer.h"
@@ -492,11 +512,14 @@ void QWebFramePrivate::_q_orientationChanged()
 
 void QWebFramePrivate::didClearWindowObject()
 {
+#if USE(JSC)
     if (page->settings()->testAttribute(QWebSettings::JavascriptEnabled))
         addQtSenderToGlobalObject();
+#endif
     emit q->javaScriptWindowObjectCleared();
 }
 
+#if USE(JSC)
 static JSValueRef qtSenderCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
 {
     QObject* sender = JSC::Bindings::QtInstance::qtSenderStack()->top();
@@ -530,6 +553,7 @@ void QWebFramePrivate::addQtSenderToGlobalObject()
     descriptor.setConfigurable(false);
     window->methodTable()->defineOwnProperty(window, exec, propertyName.get()->identifier(&exec->globalData()), descriptor, false);
 }
+#endif
 
 /*!
     \class QWebFrame
@@ -658,6 +682,7 @@ void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object
 {
     if (!page()->settings()->testAttribute(QWebSettings::JavascriptEnabled))
         return;
+#if USE(JSC)
     JSC::Bindings::QtInstance::ValueOwnership valueOwnership = static_cast<JSC::Bindings::QtInstance::ValueOwnership>(ownership);
     JSDOMWindow* window = toJSDOMWindow(d->frame, mainThreadNormalWorld());
     JSC::Bindings::RootObject* root;
@@ -683,6 +708,13 @@ void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object
 
     JSC::PutPropertySlot slot;
     window->methodTable()->put(window, exec, JSC::Identifier(&exec->globalData(), reinterpret_cast_ptr<const UChar*>(name.constData()), name.length()), runtimeObject, slot);
+#elif USE(V8)
+    QJSEngine* engine = d->frame->script()->qtScriptEngine();
+    if (!engine)
+        return;
+    QJSValue v = engine->newQObject(object); // FIXME: Ownership not propagated yet.
+    engine->globalObject().property(QLatin1String("window")).setProperty(name, v);
+#endif
 }
 
 /*!
@@ -1572,10 +1604,17 @@ QVariant QWebFrame::evaluateJavaScript(const QString& scriptSource)
     ScriptController *proxy = d->frame->script();
     QVariant rc;
     if (proxy) {
+#if USE(JSC)
         int distance = 0;
         JSC::JSValue v = d->frame->script()->executeScript(ScriptSourceCode(scriptSource)).jsValue();
 
         rc = JSC::Bindings::convertValueToQVariant(proxy->globalObject(mainThreadNormalWorld())->globalExec(), v, QMetaType::Void, &distance);
+#elif USE(V8)
+        QJSEngine* engine = d->frame->script()->qtScriptEngine();
+        if (!engine)
+            return rc;
+        rc = engine->evaluate(scriptSource).toVariant();
+#endif
     }
     return rc;
 }
index 29d4c86..c76e862 100644 (file)
@@ -1,3 +1,45 @@
+2012-07-17  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r122834.
+        http://trac.webkit.org/changeset/122834
+        https://bugs.webkit.org/show_bug.cgi?id=91492
+
+        it broke the chromium (Requested by kkristof on #webkit).
+
+        * Api/qwebelement.cpp:
+        (setupScriptContext):
+        (QWebElement::evaluateJavaScript):
+        (QtWebElementRuntime::initialize):
+        * Api/qwebframe.cpp:
+        (QWebFramePrivate::didClearWindowObject):
+        (QWebFrame::addToJavaScriptWindowObject):
+        (QWebFrame::evaluateJavaScript):
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        (QtDRTNodeRuntime::initialize):
+        (DumpRenderTreeSupportQt::javaScriptObjectsCount):
+        (DumpRenderTreeSupportQt::garbageCollectorCollect):
+        (DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread):
+        (DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld):
+        (DumpRenderTreeSupportQt::injectInternalsObject):
+        (DumpRenderTreeSupportQt::resetInternalsObject):
+        * WebCoreSupport/DumpRenderTreeSupportQt.h:
+        (Bindings):
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore):
+        (WebCore::FrameLoaderClientQt::didCreateScriptContext):
+        (WebCore::FrameLoaderClientQt::willReleaseScriptContext):
+        (WebCore::FrameLoaderClientQt::didCreateIsolatedScriptContext):
+        (WebCore::FrameLoaderClientQt::createDocumentLoader):
+        * WebCoreSupport/FrameLoaderClientQt.h:
+        (FrameLoaderClientQt):
+        (WebCore::FrameLoaderClientQt::allowScriptExtension):
+        * v8/ForwardingHeaders/v8-debug.h: Added.
+        * v8/ForwardingHeaders/v8-preparser.h: Added.
+        * v8/ForwardingHeaders/v8-profiler.h: Added.
+        * v8/ForwardingHeaders/v8-testing.h: Added.
+        * v8/ForwardingHeaders/v8.h: Added.
+        * v8/ForwardingHeaders/v8stdint.h: Added.
+
 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
 
         [Qt][V8] Remove the V8 related codepaths and configuration
index d6fa627..1492c39 100644 (file)
@@ -23,7 +23,9 @@
 #include "config.h"
 #include "DumpRenderTreeSupportQt.h"
 
+#if USE(JSC)
 #include "APICast.h"
+#endif
 #include "ApplicationCacheStorage.h"
 #include "CSSComputedStyleDeclaration.h"
 #include "ChromeClientQt.h"
 #include "Frame.h"
 #include "FrameLoaderClientQt.h"
 #include "FrameView.h"
+#if USE(JSC)
 #include "GCController.h"
 #include "JSNode.h"
 #include "qt_runtime.h"
+#elif USE(V8)
+#include "V8GCController.h"
+#include "V8Proxy.h"
+#endif
 #include "GeolocationClient.h"
 #include "GeolocationClientMock.h"
 #include "GeolocationController.h"
@@ -156,6 +163,7 @@ QDRTNode& QDRTNode::operator=(const QDRTNode& other)
     return *this;
 }
 
+#if USE(JSC)
 QDRTNode QtDRTNodeRuntime::create(WebCore::Node* node)
 {
     return QDRTNode(node);
@@ -177,6 +185,7 @@ static JSC::JSValue convertNodeVariantToJSValue(JSC::ExecState* exec, WebCore::J
 {
     return toJS(exec, globalObject, QtDRTNodeRuntime::get(variant.value<QDRTNode>()));
 }
+#endif
 
 void QtDRTNodeRuntime::initialize()
 {
@@ -184,8 +193,10 @@ void QtDRTNodeRuntime::initialize()
     if (initialized)
         return;
     initialized = true;
+#if USE(JSC)
     int id = qRegisterMetaType<QDRTNode>();
     JSC::Bindings::registerCustomType(id, convertJSValueToNodeVariant, convertNodeVariantToJSValue);
+#endif
 }
 
 DumpRenderTreeSupportQt::DumpRenderTreeSupportQt()
@@ -373,17 +384,31 @@ void DumpRenderTreeSupportQt::clearFrameName(QWebFrame* frame)
 
 int DumpRenderTreeSupportQt::javaScriptObjectsCount()
 {
+#if USE(JSC)
     return JSDOMWindowBase::commonJSGlobalData()->heap.globalObjectCount();
+#elif USE(V8)
+    // FIXME: Find a way to do this using V8.
+    return 1;
+#endif
 }
 
 void DumpRenderTreeSupportQt::garbageCollectorCollect()
 {
+#if USE(JSC)
     gcController().garbageCollectNow();
+#elif USE(V8)
+    v8::V8::LowMemoryNotification();
+#endif
 }
 
 void DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread(bool waitUntilDone)
 {
+#if USE(JSC)
     gcController().garbageCollectOnAlternateThreadForDebugging(waitUntilDone);
+#elif USE(V8)
+    // FIXME: Find a way to do this using V8.
+    garbageCollectorCollect();
+#endif
 }
 
 int DumpRenderTreeSupportQt::pageNumberForElementById(QWebFrame* frame, const QString& id, float width, float height)
@@ -868,7 +893,15 @@ void DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(QWebFrame* frame, in
 
     if (!proxy)
         return;
+#if USE(JSC)
     proxy->executeScriptInWorld(scriptWorld->world(), script, true);
+#elif USE(V8)
+    ScriptSourceCode source(script);
+    Vector<ScriptSourceCode> sources;
+    sources.append(source);
+    Vector<ScriptValue> result;
+    proxy->evaluateInIsolatedWorld(0, sources, &result);
+#endif
 }
 
 QString DumpRenderTreeSupportQt::pageSizeAndMarginsInPixels(QWebFrame* frame, int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft)
@@ -1062,6 +1095,7 @@ QString DumpRenderTreeSupportQt::layerTreeAsText(QWebFrame* frame)
 void DumpRenderTreeSupportQt::injectInternalsObject(QWebFrame* frame)
 {
     WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
+#if USE(JSC)
     JSDOMWindow* window = toJSDOMWindow(coreFrame, mainThreadNormalWorld());
     Q_ASSERT(window);
 
@@ -1071,16 +1105,23 @@ void DumpRenderTreeSupportQt::injectInternalsObject(QWebFrame* frame)
 
     JSContextRef context = toRef(exec);
     WebCoreTestSupport::injectInternalsObject(context);
+#elif USE(V8)
+    v8::HandleScope handleScope;
+    WebCoreTestSupport::injectInternalsObject(V8Proxy::mainWorldContext(coreFrame));
+#endif
 }
 
 void DumpRenderTreeSupportQt::injectInternalsObject(JSContextRef context)
 {
+#if USE(JSC)
     WebCoreTestSupport::injectInternalsObject(context);
+#endif
 }
 
 void DumpRenderTreeSupportQt::resetInternalsObject(QWebFrame* frame)
 {
     WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
+#if USE(JSC)
     JSDOMWindow* window = toJSDOMWindow(coreFrame, mainThreadNormalWorld());
     Q_ASSERT(window);
 
@@ -1090,6 +1131,10 @@ void DumpRenderTreeSupportQt::resetInternalsObject(QWebFrame* frame)
 
     JSContextRef context = toRef(exec);
     WebCoreTestSupport::resetInternalsObject(context);
+#elif USE(V8)
+    v8::HandleScope handleScope;
+    WebCoreTestSupport::resetInternalsObject(V8Proxy::mainWorldContext(coreFrame));
+#endif
 }
 
 QImage DumpRenderTreeSupportQt::paintPagesWithBoundaries(QWebFrame* qframe)
index e0c8680..21564e2 100644 (file)
@@ -34,11 +34,20 @@ class Text;
 class Node;
 }
 
+
+#if defined(WTF_USE_V8) && WTF_USE_V8
+namespace V8 {
+namespace Bindings {
+class QtDRTNodeRuntime;
+}
+}
+#else
 namespace JSC {
 namespace Bindings {
 class QtDRTNodeRuntime;
 }
 }
+#endif
 
 class QWebElement;
 class QWebFrame;
@@ -65,7 +74,11 @@ private:
 
     friend class DumpRenderTreeSupportQt;
 
+#if defined(WTF_USE_V8) && WTF_USE_V8
+    friend class V8::Bindings::QtDRTNodeRuntime;
+#else
     friend class QtDRTNodeRuntime;
+#endif
 
     WebCore::Node* m_node;
 };
index a2c3cb2..70f2936 100644 (file)
@@ -50,7 +50,9 @@
 #if ENABLE(ICONDATABASE)
 #include "IconDatabaseClientQt.h"
 #endif
+#if USE(JSC)
 #include "JSDOMWindowBase.h"
+#endif
 #include "MIMETypeRegistry.h"
 #include "MouseEvent.h"
 #include "NotImplemented.h"
@@ -67,6 +69,9 @@
 #include "ResourceResponse.h"
 #include "ScriptController.h"
 #include "Settings.h"
+#if USE(V8)
+#include "V8DOMWindow.h"
+#endif
 #include "ViewportArguments.h"
 #include "WebEventConversion.h"
 
@@ -385,6 +390,17 @@ void FrameLoaderClientQt::dispatchDidChangeLocationWithinPage()
     m_webFrame->page()->d->updateNavigationActions();
 }
 
+#if USE(V8)
+void FrameLoaderClientQt::didCreateScriptContext(v8::Handle<v8::Context>, int, int)
+{
+}
+void FrameLoaderClientQt::willReleaseScriptContext(v8::Handle<v8::Context>, int)
+{
+}
+void FrameLoaderClientQt::didCreateIsolatedScriptContext()
+{
+}
+#endif
 
 void FrameLoaderClientQt::dispatchDidPushStateWithinPage()
 {
@@ -973,7 +989,12 @@ WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClientQt::createDocumentLoad
         // Use the default timeout interval for JS as the HTML tokenizer delay. This ensures
         // that long-running JavaScript will still allow setHtml() to be synchronous, while
         // still giving a reasonable timeout to prevent deadlock.
+#if USE(JSC)
         double delay = JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.timeoutInterval() / 1000.0f;
+#elif USE(V8)
+        // FIXME: Hard coded for now.
+        double delay = 10000 / 1000.0f;
+#endif
         m_frame->page()->setCustomHTMLTokenizerTimeDelay(delay);
     } else
         m_frame->page()->setCustomHTMLTokenizerTimeDelay(-1);
index 781971d..d123b56 100644 (file)
@@ -218,6 +218,21 @@ public:
     virtual void documentElementAvailable();
     virtual void didPerformFirstNavigation() const;
 
+#if USE(V8)
+    // A frame's V8 context was created or destroyed.
+    virtual void didCreateScriptContext(v8::Handle<v8::Context>, int, int);
+    virtual void willReleaseScriptContext(v8::Handle<v8::Context>, int);
+
+    // A context untied to a frame was created (through evaluateInIsolatedWorld).
+    // This context is not tied to the lifetime of its frame, and is destroyed
+    // in garbage collection.
+    virtual void didCreateIsolatedScriptContext();
+
+    // Returns true if we should allow the given V8 extension to be added to
+    // the script context at the currently loading page and given extension group.
+    virtual bool allowScriptExtension(const String& extensionName, int extensionGroup, int worldID) { return false; }
+#endif
+
     virtual void registerForIconNotification(bool);
 
     QString chooseFile(const QString& oldFile);
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8-debug.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8-debug.h
new file mode 100644 (file)
index 0000000..e6bfdb7
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8-debug.h>
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8-preparser.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8-preparser.h
new file mode 100644 (file)
index 0000000..7198b74
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8-preparser.h>
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8-profiler.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8-profiler.h
new file mode 100644 (file)
index 0000000..37fbebd
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8-profiler.h>
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8-testing.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8-testing.h
new file mode 100644 (file)
index 0000000..d62f8f9
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8-testing.h>
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8.h
new file mode 100644 (file)
index 0000000..195f5fb
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8.h>
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8stdint.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8stdint.h
new file mode 100644 (file)
index 0000000..850e670
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8stdint.h>
index 61984d2..00c9fe1 100644 (file)
@@ -77,7 +77,7 @@ runSyncQt() # Generate forwarding headers for the QtWebKit API
 
 WEBKIT += wtf
 
-WEBKIT += javascriptcore
+!v8:WEBKIT += javascriptcore
 
 WEBKIT += webcore
 
index 261fd55..4c56c6c 100644 (file)
@@ -1,3 +1,13 @@
+2012-07-17  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r122834.
+        http://trac.webkit.org/changeset/122834
+        https://bugs.webkit.org/show_bug.cgi?id=91492
+
+        it broke the chromium (Requested by kkristof on #webkit).
+
+        * Scripts/build-webkit:
+
 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
 
         [Qt][V8] Remove the V8 related codepaths and configuration
index c37bce7..44a1bbf 100755 (executable)
@@ -54,6 +54,7 @@ my $showHelp = 0;
 my $clean = 0;
 my $useGYP = 0;
 my $minimal = 0;
+my $v8 = 0;
 my $installHeaders;
 my $installLibs;
 my $prefixPath;
@@ -95,6 +96,8 @@ push @ARGV, split(/ /, $ENV{'BUILD_WEBKIT_ARGS'}) if ($ENV{'BUILD_WEBKIT_ARGS'})
 foreach (@ARGV) {
     if ($_ eq '--minimal') {
         $minimal = 1;
+    } elsif ($_ eq '--v8') {
+        $v8 = 1;
     }
 }
 
@@ -125,6 +128,7 @@ Usage: $programName [options] [options to pass to build system]
 
   --install-headers=<path>          Set installation path for the headers (Qt only)
   --install-libs=<path>             Set installation path for the libraries (Qt only)
+  --v8                              Use V8 as JavaScript engine (Qt only)
 
   --prefix=<path>                   Set installation prefix to the given path (Gtk/Efl/BlackBerry only)
   --makeargs=<arguments>            Optional Makefile flags
@@ -148,6 +152,7 @@ my %options = (
     'makeargs=s' => \$makeArgs,
     'cmakeargs=s' => \$cmakeArgs,
     'minimal' => \$minimal,
+    'v8' => \$v8,
     'only-webkit' => \$onlyWebKitProject,
     'no-webkit2' => \$noWebKit2,
     'coverage' => \$coverageSupport,
@@ -267,6 +272,13 @@ if (isGtk()) {
     foreach (@features) {
         push @options, "DEFINES+=$_->{define}=${$_->{value}}" if $_->{define} && ${$_->{value}} != $_->{default};
     }
+
+    if ($v8) {
+        print "Building WebKit2 with v8 is not supported currently. Disabling WebKit2.\n";
+        # FIXME: Deal with this in defaults_pre, once Qt has support for getting at the
+        # command line arguments at that stage.
+        push @options, "CONFIG+=v8 CONFIG+=no_webkit2";
+    }
 }
 
 # If asked to build just the WebKit project, overwrite the projects
index ef25ea5..8d4cbbb 100644 (file)
@@ -20,9 +20,11 @@ WTF.file = Source/WTF/WTF.pro
 WTF.makefile = Makefile.WTF
 SUBDIRS += WTF
 
-JavaScriptCore.file = Source/JavaScriptCore/JavaScriptCore.pro
-JavaScriptCore.makefile = Makefile.JavaScriptCore
-SUBDIRS += JavaScriptCore
+!v8 {
+    JavaScriptCore.file = Source/JavaScriptCore/JavaScriptCore.pro
+    JavaScriptCore.makefile = Makefile.JavaScriptCore
+    SUBDIRS += JavaScriptCore
+}
 
 WebCore.file = Source/WebCore/WebCore.pro
 WebCore.makefile = Makefile.WebCore