[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
kov at webkit.org
kov at webkit.org
Tue Jan 5 23:56:19 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit afb3d1d4567f1de5fc0410f0d405e23edd112fdb
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Dec 20 12:02:42 2009 +0000
Reviewed by Xan Lopez.
Create a new WebKitDataSource object when attaching to a frame, if
one does not exist. This may happen when we are fetching data from
the page cache.
* WebCoreSupport/DocumentLoaderGtk.cpp:
(WebKit::DocumentLoader::attachToFrame):
(WebKit::DocumentLoader::unrefDataSource):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 14dfa9d..d5b49f1 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,5 +1,17 @@
2009-12-20 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+ Reviewed by Xan Lopez.
+
+ Create a new WebKitDataSource object when attaching to a frame, if
+ one does not exist. This may happen when we are fetching data from
+ the page cache.
+
+ * WebCoreSupport/DocumentLoaderGtk.cpp:
+ (WebKit::DocumentLoader::attachToFrame):
+ (WebKit::DocumentLoader::unrefDataSource):
+
+2009-12-20 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+
Rubber-stamped by Xan Lopez.
Make sure the text encoding machinery is initialized from the main
diff --git a/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp b/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
index 0efc9fa..2b355cb 100644
--- a/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
@@ -30,6 +30,7 @@
#include "config.h"
#include "DocumentLoaderGtk.h"
+#include "webkitprivate.h"
#include "webkitwebdatasource.h"
using namespace WebCore;
@@ -60,7 +61,16 @@ void DocumentLoader::attachToFrame()
{
WebCore::DocumentLoader::attachToFrame();
- refDataSource();
+ if (m_dataSource) {
+ refDataSource();
+ return;
+ }
+
+ // We may get to here without having a datasource, when the data
+ // is coming from the page cache.
+ WebKitWebDataSource* dataSource = webkit_web_data_source_new_with_loader(this);
+ setDataSource(dataSource);
+ g_object_unref(dataSource);
}
void DocumentLoader::detachFromFrame()
@@ -110,6 +120,7 @@ void DocumentLoader::unrefDataSource()
ASSERT(m_dataSource);
m_isDataSourceReffed = false;
g_object_unref(m_dataSource);
+ m_dataSource = 0;
}
} // end namespace WebKit
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list