[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreas.kling at nokia.com
andreas.kling at nokia.com
Wed Dec 22 13:20:24 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 21517c680fe02b8d81dd5542d25712d0e7b5635e
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Sep 11 17:44:17 2010 +0000
2010-09-11 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Simon Hausmann.
[Qt] V8 port for Qt platform: Qt WebCoreSupport changes
https://bugs.webkit.org/show_bug.cgi?id=45149
Original patch by Vlad Burlik <volodimir.burlik at nokia.com>
Implemented the V8 specifics needed in DumpRenderTreeSupportQt and
FrameLoaderClientQt.
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::javaScriptObjectsCount):
(DumpRenderTreeSupportQt::garbageCollectorCollect):
(DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread):
(DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld):
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::didCreateScriptContextForFrame):
(WebCore::FrameLoaderClientQt::didDestroyScriptContextForFrame):
(WebCore::FrameLoaderClientQt::didCreateIsolatedScriptContext):
(WebCore::FrameLoaderClientQt::createDocumentLoader):
* WebCoreSupport/FrameLoaderClientQt.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 66e8fd7..e3c8b98 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,27 @@
+2010-09-11 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] V8 port for Qt platform: Qt WebCoreSupport changes
+ https://bugs.webkit.org/show_bug.cgi?id=45149
+
+ Original patch by Vlad Burlik <volodimir.burlik at nokia.com>
+
+ Implemented the V8 specifics needed in DumpRenderTreeSupportQt and
+ FrameLoaderClientQt.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::javaScriptObjectsCount):
+ (DumpRenderTreeSupportQt::garbageCollectorCollect):
+ (DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread):
+ (DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld):
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::didCreateScriptContextForFrame):
+ (WebCore::FrameLoaderClientQt::didDestroyScriptContextForFrame):
+ (WebCore::FrameLoaderClientQt::didCreateIsolatedScriptContext):
+ (WebCore::FrameLoaderClientQt::createDocumentLoader):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
2010-09-11 Vlad Burlik <volodimir.burlik at nokia.com>
Reviewed by Andreas Kling.
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index d2e65a8..6591c2a 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -34,7 +34,12 @@
#include "Frame.h"
#include "FrameLoaderClientQt.h"
#include "FrameView.h"
+#if USE(JSC)
#include "GCController.h"
+#elif USE(V8)
+#include "V8GCController.h"
+#include "V8Proxy.h"
+#endif
#include "Geolocation.h"
#include "GeolocationServiceMock.h"
#include "Geoposition.h"
@@ -296,17 +301,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
}
// Returns the value of counter in the element specified by \a id.
@@ -670,8 +689,16 @@ void DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(QWebFrame* frame, in
ScriptController* proxy = coreFrame->script();
- if (proxy)
- proxy->executeScriptInWorld(scriptWorld->world(), script, true);
+ if (!proxy)
+ return;
+#if USE(JSC)
+ proxy->executeScriptInWorld(scriptWorld->world(), script, true);
+#elif USE(V8)
+ ScriptSourceCode source(script);
+ Vector<ScriptSourceCode> sources;
+ sources.append(source);
+ proxy->evaluateInIsolatedWorld(0, sources, true);
+#endif
}
bool DumpRenderTreeSupportQt::isPageBoxVisible(QWebFrame* frame, int pageIndex)
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index fb8107f..549889a 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -40,7 +40,11 @@
#include "FrameView.h"
#include "DocumentLoader.h"
#include "HitTestResult.h"
+#if USE(JSC)
#include "JSDOMWindowBase.h"
+#elif USE(V8)
+#include "V8DOMWindow.h"
+#endif
#include "MIMETypeRegistry.h"
#include "MouseEvent.h"
#include "ResourceResponse.h"
@@ -357,6 +361,18 @@ void FrameLoaderClientQt::dispatchDidChangeLocationWithinPage()
m_webFrame->page()->d->updateNavigationActions();
}
+#if USE(V8)
+void FrameLoaderClientQt::didCreateScriptContextForFrame()
+{
+}
+void FrameLoaderClientQt::didDestroyScriptContextForFrame()
+{
+}
+void FrameLoaderClientQt::didCreateIsolatedScriptContext()
+{
+}
+#endif
+
void FrameLoaderClientQt::dispatchDidPushStateWithinPage()
{
if (dumpFrameLoaderCallbacks)
@@ -874,7 +890,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);
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index c082f91..9941324 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -211,6 +211,17 @@ public:
virtual void documentElementAvailable();
virtual void didPerformFirstNavigation() const;
+#if USE(V8)
+ // A frame's V8 context was created or destroyed.
+ virtual void didCreateScriptContextForFrame();
+ virtual void didDestroyScriptContextForFrame();
+
+ // 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();
+#endif
+
virtual void registerForIconNotification(bool);
QString chooseFile(const QString& oldFile);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list