[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
xan at webkit.org
xan at webkit.org
Tue Jan 5 23:56:21 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 6f8bb998515da30fbb9b5ec5661ab5f37d9759cc
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Dec 20 12:27:51 2009 +0000
2009-12-20 Xan Lopez <xlopez at igalia.com>
Reviewed by Gustavo Noronha.
[GTK] crash when loading new page
https://bugs.webkit.org/show_bug.cgi?id=32752
Wait until the document is attached to adjust our alignments,
since we need to make sure the FrameView in the document content
render object matches the newly created FrameView for the new
page, otherwise we'll try to relayout the wrong view.
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::committedLoad):
(WebKit::FrameLoaderClient::transitionToCommittedForNewPage):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index d5b49f1..887a763 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,19 @@
+2009-12-20 Xan Lopez <xlopez at igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] crash when loading new page
+ https://bugs.webkit.org/show_bug.cgi?id=32752
+
+ Wait until the document is attached to adjust our alignments,
+ since we need to make sure the FrameView in the document content
+ render object matches the newly created FrameView for the new
+ page, otherwise we'll try to relayout the wrong view.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::committedLoad):
+ (WebKit::FrameLoaderClient::transitionToCommittedForNewPage):
+
2009-12-20 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Xan Lopez.
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index a2e3ca7..d3c1c17 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -137,25 +137,6 @@ void FrameLoaderClient::dispatchWillSubmitForm(FramePolicyFunction policyFunctio
void FrameLoaderClient::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length)
{
- if (!m_pluginView) {
- ASSERT(loader->frame());
- // Setting the encoding on the frame loader is our way to get work done that is normally done
- // when the first bit of data is received, even for the case of a document with no data (like about:blank).
- String encoding = loader->overrideEncoding();
- bool userChosen = !encoding.isNull();
- if (!userChosen)
- encoding = loader->response().textEncodingName();
-
- FrameLoader* frameLoader = loader->frameLoader();
- frameLoader->setEncoding(encoding, userChosen);
- if (data)
- frameLoader->addData(data, length);
-
- Frame* coreFrame = loader->frame();
- if (coreFrame && coreFrame->document() && coreFrame->document()->isMediaDocument())
- loader->cancelMainResourceLoad(frameLoader->client()->pluginWillHandleLoadError(loader->response()));
- }
-
if (m_pluginView) {
if (!m_hasSentResponseToPlugin) {
m_pluginView->didReceiveResponse(loader->response());
@@ -165,11 +146,42 @@ void FrameLoaderClient::committedLoad(WebCore::DocumentLoader* loader, const cha
// FIXME: We may want to investigate refactoring our plugin loading
// code to be similar to mac's.
// Also, see http://trac.webkit.org/changeset/24118.
- if (!m_pluginView)
- return;
+ if (m_pluginView)
+ m_pluginView->didReceiveData(data, length);
+
+ return;
+ }
- m_pluginView->didReceiveData(data, length);
+ ASSERT(loader->frame());
+ // Setting the encoding on the frame loader is our way to get work done that is normally done
+ // when the first bit of data is received, even for the case of a document with no data (like about:blank).
+ String encoding = loader->overrideEncoding();
+ bool userChosen = !encoding.isNull();
+ if (!userChosen)
+ encoding = loader->response().textEncodingName();
+
+ FrameLoader* frameLoader = loader->frameLoader();
+ frameLoader->setEncoding(encoding, userChosen);
+ if (data)
+ frameLoader->addData(data, length);
+
+ Frame* coreFrame = loader->frame();
+ if (!coreFrame || !coreFrame->document())
+ return;
+
+ if (coreFrame->document()->isMediaDocument()) {
+ loader->cancelMainResourceLoad(frameLoader->client()->pluginWillHandleLoadError(loader->response()));
+ return;
}
+
+ // We need to wait until the document is attached (a side
+ // effect of calling setEncoding previously) to set our gtk
+ // adjustments, since that process syncs the FrameView
+ // attached to the Document's content renderer with the new
+ // FrameView set after the new page is committed
+ WebKitWebView* containingWindow = getViewFromFrame(m_frame);
+ WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW_GET_PRIVATE(containingWindow);
+ coreFrame->view()->setGtkAdjustments(priv->horizontalAdjustment, priv->verticalAdjustment);
}
bool
@@ -1112,7 +1124,6 @@ void FrameLoaderClient::transitionToCommittedForNewPage()
return;
WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW_GET_PRIVATE(containingWindow);
- frame->view()->setGtkAdjustments(priv->horizontalAdjustment, priv->verticalAdjustment);
if (priv->currentMenu) {
GtkMenu* menu = priv->currentMenu;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list