From fc030d87941fec5b3f4ecd0fe65a131bcc526ef6 Mon Sep 17 00:00:00 2001 From: "mrowe@apple.com" Date: Mon, 5 Nov 2007 14:39:25 +0000 Subject: [PATCH] 2007-11-05 Mark Rowe Reviewed by Alp Toker. Fix http://bugs.webkit.org/show_bug.cgi?id=15842 Bug 15842: [Gtk] about:blank doesn't work * WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::finishedLoading): Set the encoding on the frame loader to get work done that is normally done when the first bit of data is received, even in the case of a document with no data (like about:blank). git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27436 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebKit/gtk/ChangeLog | 12 ++++++++++++ WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp | 14 +++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog index 7f66b4b49808..cfb0d971cf8d 100644 --- a/WebKit/gtk/ChangeLog +++ b/WebKit/gtk/ChangeLog @@ -1,3 +1,15 @@ +2007-11-05 Mark Rowe + + Reviewed by Alp Toker. + + Fix http://bugs.webkit.org/show_bug.cgi?id=15842 + Bug 15842: [Gtk] about:blank doesn't work + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::finishedLoading): Set the encoding on the frame loader to + get work done that is normally done when the first bit of data is received, even in the + case of a document with no data (like about:blank). + 2007-11-03 Alp Toker Reviewed by Mark Rowe. diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index c930cee0b084..280f0593805a 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -346,7 +346,6 @@ void FrameLoaderClient::revertToProvisionalState(DocumentLoader*) { notImplement void FrameLoaderClient::clearUnarchivingState(DocumentLoader*) { notImplemented(); } void FrameLoaderClient::willChangeTitle(DocumentLoader*) { notImplemented(); } void FrameLoaderClient::didChangeTitle(DocumentLoader *l) { setTitle(l->title(), l->URL()); } -void FrameLoaderClient::finishedLoading(DocumentLoader*) { notImplemented(); } void FrameLoaderClient::finalSetupForReplace(DocumentLoader*) { notImplemented(); } void FrameLoaderClient::setDefersLoading(bool) { notImplemented(); } bool FrameLoaderClient::isArchiveLoadPending(ResourceLoader*) const { notImplemented(); return false; } @@ -357,6 +356,19 @@ bool FrameLoaderClient::canShowMIMEType(const String&) const { notImplemented(); bool FrameLoaderClient::representationExistsForURLScheme(const String&) const { notImplemented(); return false; } String FrameLoaderClient::generatedMIMETypeForURLScheme(const String&) const { notImplemented(); return String(); } +void FrameLoaderClient::finishedLoading(DocumentLoader* documentLoader) +{ + ASSERT(documentLoader->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 = documentLoader->overrideEncoding(); + bool userChosen = !encoding.isNull(); + if (encoding.isNull()) + encoding = documentLoader->response().textEncodingName(); + documentLoader->frameLoader()->setEncoding(encoding, userChosen); +} + + void FrameLoaderClient::provisionalLoadStarted() { notImplemented(); -- 2.36.0