Diff
Modified: trunk/LayoutTests/ChangeLog (88445 => 88446)
--- trunk/LayoutTests/ChangeLog 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/LayoutTests/ChangeLog 2011-06-09 14:06:51 UTC (rev 88446)
@@ -1,3 +1,14 @@
+2011-06-09 Robert Hogan <[email protected]>
+
+ Reviewed by Andreas Kling.
+
+ Teach Qt about window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=61074
+
+ Unskip fast/harness/internals-object.html
+
+ * platform/qt/Skipped:
+
2011-06-09 Csaba Osztrogonác <[email protected]>
[Qt][WK2] Canvas tests make css2.1 ones failing
Modified: trunk/LayoutTests/platform/qt/Skipped (88445 => 88446)
--- trunk/LayoutTests/platform/qt/Skipped 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/LayoutTests/platform/qt/Skipped 2011-06-09 14:06:51 UTC (rev 88446)
@@ -2516,9 +2516,6 @@
# JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540)
http/tests/security/isolatedWorld/cross-origin-xhr.html
-# https://bugs.webkit.org/show_bug.cgi?id=61074
-fast/harness/internals-object.html
-
# failing new tests
fast/block/float/overhanging-tall-block.html
fast/backgrounds/border-radius-split-background-image.html
Modified: trunk/Source/WebCore/ChangeLog (88445 => 88446)
--- trunk/Source/WebCore/ChangeLog 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/Source/WebCore/ChangeLog 2011-06-09 14:06:51 UTC (rev 88446)
@@ -1,3 +1,22 @@
+2011-06-09 Robert Hogan <[email protected]>
+
+ Reviewed by Andreas Kling.
+
+ Teach Qt about window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=61074
+
+ A weakness of the Qt DRT setup is that things like JSContextRef are abstracted
+ away from the QtWebKit API so we need DumpRenderTreeSupportQt to access WebCore internals.
+ Since the window.internals object requires JSContextRef we need to implement it in DumpRenderTreeSupportQt
+ where we can access it. DumpRenderTreeSupportQt cannot be compiled outside Qt's WebCore and as it
+ is our only possible route into the WebCoreTestSupport class neither can the new window.internals plumbing.
+ Likewise we can't put the accessor in WebCoreTestSupport because it would then need to know about QWebFrame
+ and others. The only alternative seems like a compile time guard which we would have to teach the bots about.
+
+ * CodeGenerators.pri:
+ * WebCore.pri:
+ * WebCore.pro:
+
2011-06-08 Mikołaj Małecki <[email protected]>
Reviewed by Pavel Feldman.
Modified: trunk/Source/WebCore/CodeGenerators.pri (88445 => 88446)
--- trunk/Source/WebCore/CodeGenerators.pri 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/Source/WebCore/CodeGenerators.pri 2011-06-09 14:06:51 UTC (rev 88446)
@@ -524,6 +524,7 @@
svg/SVGUseElement.idl \
svg/SVGViewElement.idl \
svg/SVGVKernElement.idl \
+ testing/Internals.idl \
webaudio/AudioBuffer.idl \
webaudio/AudioBufferSourceNode.idl \
webaudio/AudioChannelMerger.idl \
@@ -629,6 +630,7 @@
--include $$PWD/svg \
--include $$PWD/storage \
--include $$PWD/css \
+ --include $$PWD/testing \
--include $$PWD/webaudio \
--include $$PWD/workers \
--outputDir $$WC_GENERATED_SOURCES_DIR \
Modified: trunk/Source/WebCore/WebCore.pri (88445 => 88446)
--- trunk/Source/WebCore/WebCore.pri 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/Source/WebCore/WebCore.pri 2011-06-09 14:06:51 UTC (rev 88446)
@@ -48,14 +48,16 @@
$$SOURCE_DIR/WebCore/bindings/v8 \
$$SOURCE_DIR/WebCore/bindings/v8/custom \
$$SOURCE_DIR/WebCore/bindings/v8/specialization \
- $$SOURCE_DIR/WebCore/bridge/qt/v8
+ $$SOURCE_DIR/WebCore/bridge/qt/v8 \
+ $$SOURCE_DIR/WebCore/testing/v8
} else {
WEBCORE_INCLUDEPATH = \
$$SOURCE_DIR/WebCore/bridge/jsc \
$$SOURCE_DIR/WebCore/bindings/js \
$$SOURCE_DIR/WebCore/bindings/js/specialization \
- $$SOURCE_DIR/WebCore/bridge/c
+ $$SOURCE_DIR/WebCore/bridge/c \
+ $$SOURCE_DIR/WebCore/testing/js
}
WEBCORE_INCLUDEPATH = \
@@ -110,6 +112,7 @@
$$SOURCE_DIR/WebCore/svg/graphics \
$$SOURCE_DIR/WebCore/svg/graphics/filters \
$$SOURCE_DIR/WebCore/svg/properties \
+ $$SOURCE_DIR/WebCore/testing \
$$SOURCE_DIR/WebCore/webaudio \
$$SOURCE_DIR/WebCore/websockets \
$$SOURCE_DIR/WebCore/workers \
Modified: trunk/Source/WebCore/WebCore.pro (88445 => 88446)
--- trunk/Source/WebCore/WebCore.pro 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/Source/WebCore/WebCore.pro 2011-06-09 14:06:51 UTC (rev 88446)
@@ -224,7 +224,8 @@
bindings/v8/custom/V8NotificationCenterCustom.cpp \
bindings/v8/custom/V8ConsoleCustom.cpp \
bindings/v8/custom/V8SQLTransactionSyncCustom.cpp \
- bindings/v8/V8WorkerContextErrorHandler.cpp
+ bindings/v8/V8WorkerContextErrorHandler.cpp \
+ testing/v8/WebCoreTestSupport.cpp
} else {
SOURCES += \
bindings/ScriptControllerBase.cpp \
@@ -376,7 +377,8 @@
bridge/runtime_array.cpp \
bridge/runtime_method.cpp \
bridge/runtime_object.cpp \
- bridge/runtime_root.cpp
+ bridge/runtime_root.cpp \
+ testing/js/WebCoreTestSupport.cpp
}
SOURCES += \
@@ -1182,6 +1184,7 @@
rendering/style/StyleSurroundData.cpp \
rendering/style/StyleTransformData.cpp \
rendering/style/StyleVisualData.cpp \
+ testing/Internals.cpp \
xml/DOMParser.cpp \
xml/XMLHttpRequest.cpp \
xml/XMLHttpRequestProgressEventThrottle.cpp \
@@ -2447,6 +2450,7 @@
svg/SVGVKernElement.h \
svg/SVGZoomAndPan.h \
svg/SVGZoomEvent.h \
+ testing/Internals.h \
workers/AbstractWorker.h \
workers/DedicatedWorkerContext.h \
workers/DedicatedWorkerThread.h \
Modified: trunk/Source/WebKit/qt/ChangeLog (88445 => 88446)
--- trunk/Source/WebKit/qt/ChangeLog 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/Source/WebKit/qt/ChangeLog 2011-06-09 14:06:51 UTC (rev 88446)
@@ -1,3 +1,14 @@
+2011-06-09 Robert Hogan <[email protected]>
+
+ Reviewed by Andreas Kling.
+
+ Teach Qt about window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=61074
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::injectInternalsObject):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
2011-06-08 Andreas Kling <[email protected]>
Reviewed by Benjamin Poulain.
Modified: trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp (88445 => 88446)
--- trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp 2011-06-09 14:06:51 UTC (rev 88446)
@@ -23,6 +23,9 @@
#include "config.h"
#include "DumpRenderTreeSupportQt.h"
+#if USE(JSC)
+#include "APICast.h"
+#endif
#include "ApplicationCacheStorage.h"
#include "CSSComputedStyleDeclaration.h"
#include "ChromeClientQt.h"
@@ -74,6 +77,7 @@
#include "SVGSMILElement.h"
#endif
#include "TextIterator.h"
+#include "WebCoreTestSupport.h"
#include "WorkerThread.h"
#include <wtf/CurrentTime.h>
@@ -1166,6 +1170,25 @@
return coreFrame->layerTreeAsText();
}
+void DumpRenderTreeSupportQt::injectInternalsObject(QWebFrame* frame)
+{
+ WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
+#if USE(JSC)
+ JSC::JSLock lock(JSC::SilenceAssertionsOnly);
+
+ JSDOMWindow* window = toJSDOMWindow(coreFrame, mainThreadNormalWorld());
+ Q_ASSERT(window);
+
+ JSC::ExecState* exec = window->globalExec();
+ Q_ASSERT(exec);
+
+ JSContextRef context = toRef(exec);
+ WebCoreTestSupport::injectInternalsObject(context);
+#elif USE(V8)
+ WebCoreTestSupport::injectInternalsObject(V8Proxy::mainWorldContext(coreFrame));
+#endif
+}
+
// Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* frame)
Modified: trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h (88445 => 88446)
--- trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h 2011-06-09 14:06:51 UTC (rev 88446)
@@ -216,6 +216,8 @@
static QString shadowPseudoId(const QWebElement&);
static QString layerTreeAsText(QWebFrame*);
+
+ static void injectInternalsObject(QWebFrame*);
};
#endif
Modified: trunk/Tools/ChangeLog (88445 => 88446)
--- trunk/Tools/ChangeLog 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/Tools/ChangeLog 2011-06-09 14:06:51 UTC (rev 88446)
@@ -1,3 +1,13 @@
+2011-06-09 Robert Hogan <[email protected]>
+
+ Reviewed by Andreas Kling.
+
+ Teach Qt about window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=61074
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::initJSObjects):
+
2011-06-09 Eric Seidel <[email protected]>
Reviewed by Adam Barth.
Modified: trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp (88445 => 88446)
--- trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp 2011-06-09 13:54:56 UTC (rev 88445)
+++ trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp 2011-06-09 14:06:51 UTC (rev 88446)
@@ -751,6 +751,7 @@
frame->addToJavaScriptWindowObject(QLatin1String("textInputController"), m_textInputController);
frame->addToJavaScriptWindowObject(QLatin1String("GCController"), m_gcController);
frame->addToJavaScriptWindowObject(QLatin1String("plainText"), m_plainTextController);
+ DumpRenderTreeSupportQt::injectInternalsObject(frame);
}
void DumpRenderTree::showPage()