Title: [109121] trunk/Source/WebKit2
- Revision
- 109121
- Author
- [email protected]
- Date
- 2012-02-28 10:29:12 -0800 (Tue, 28 Feb 2012)
Log Message
[Qt] Initialize QtWebContext as much as we can in its constructor.
https://bugs.webkit.org/show_bug.cgi?id=79809
Reviewed by Tor Arne Vestbø.
The icon database wouldn't be initialized on the QtWebContext while in WebKitTestRunner
since it doesn't call the initialize method on it after creating it.
Remove the initialize method, move the download manager and icon database initialization
in the constructor and call initializeContextInjectedBundleClient directly in
defaultContext to prevent overriding WKTR's injected bundle client.
* UIProcess/qt/QtWebContext.cpp:
(WebKit::QtWebContext::QtWebContext):
(WebKit::QtWebContext::defaultContext):
* UIProcess/qt/QtWebContext.h:
(QtWebContext):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (109120 => 109121)
--- trunk/Source/WebKit2/ChangeLog 2012-02-28 18:24:46 UTC (rev 109120)
+++ trunk/Source/WebKit2/ChangeLog 2012-02-28 18:29:12 UTC (rev 109121)
@@ -1,3 +1,22 @@
+2012-02-28 Jocelyn Turcotte <[email protected]>
+
+ [Qt] Initialize QtWebContext as much as we can in its constructor.
+ https://bugs.webkit.org/show_bug.cgi?id=79809
+
+ Reviewed by Tor Arne Vestbø.
+
+ The icon database wouldn't be initialized on the QtWebContext while in WebKitTestRunner
+ since it doesn't call the initialize method on it after creating it.
+ Remove the initialize method, move the download manager and icon database initialization
+ in the constructor and call initializeContextInjectedBundleClient directly in
+ defaultContext to prevent overriding WKTR's injected bundle client.
+
+ * UIProcess/qt/QtWebContext.cpp:
+ (WebKit::QtWebContext::QtWebContext):
+ (WebKit::QtWebContext::defaultContext):
+ * UIProcess/qt/QtWebContext.h:
+ (QtWebContext):
+
2012-02-28 Carlos Garcia Campos <[email protected]>
[GTK] Inconsistent state of WebKitWebView when replacing content in WebKit2
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebContext.cpp (109120 => 109121)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebContext.cpp 2012-02-28 18:24:46 UTC (rev 109120)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebContext.cpp 2012-02-28 18:29:12 UTC (rev 109121)
@@ -45,9 +45,11 @@
QtWebContext* QtWebContext::s_defaultContext = 0;
QtWebContext::QtWebContext(WebContext* context)
- : m_context(context)
+ : m_contextID(generateContextID())
+ , m_context(context)
+ , m_downloadManager(adoptPtr(new QtDownloadManager(context)))
+ , m_iconDatabase(adoptPtr(new QtWebIconDatabaseClient(this)))
{
- m_contextID = generateContextID();
contextMap.set(m_contextID, this);
}
@@ -72,7 +74,8 @@
RefPtr<WebContext> context = WebContext::sharedProcessContext();
RefPtr<QtWebContext> defaultContext = QtWebContext::create(context.get());
s_defaultContext = defaultContext.get();
- defaultContext->initialize();
+ // Make sure that this doesn't get called in WebKitTestRunner (defaultContext isn't used there).
+ defaultContext->initializeContextInjectedBundleClient();
return defaultContext.release();
}
@@ -107,13 +110,6 @@
return contextMap.get(id);
}
-void QtWebContext::initialize()
-{
- m_downloadManager = adoptPtr(new QtDownloadManager(m_context.get()));
- m_iconDatabase = adoptPtr(new QtWebIconDatabaseClient(this));
- initializeContextInjectedBundleClient();
-}
-
void QtWebContext::initializeContextInjectedBundleClient()
{
WKContextInjectedBundleClient injectedBundleClient;
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebContext.h (109120 => 109121)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebContext.h 2012-02-28 18:24:46 UTC (rev 109120)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebContext.h 2012-02-28 18:29:12 UTC (rev 109121)
@@ -63,7 +63,6 @@
private:
explicit QtWebContext(WebContext*);
- void initialize();
void initializeContextInjectedBundleClient();
static void didReceiveMessageFromInjectedBundle(WKContextRef, WKStringRef messageName, WKTypeRef messageBody, const void*);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes