2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Apr 2010 04:54:55 +0000 (04:54 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Apr 2010 04:54:55 +0000 (04:54 +0000)
        Unreviewed, rolling out r57468.
        http://trac.webkit.org/changeset/57468
        https://bugs.webkit.org/show_bug.cgi?id=37433

        Broke the world...  Must have applied the patch wrong
        (Requested by abarth on #webkit).

        * src/ContextMenuClientImpl.cpp:
        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
        * src/FrameLoaderClientImpl.cpp:
        (WebKit::FrameLoaderClientImpl::finishedLoading):
        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::encoding):
        (WebKit::WebFrameImpl::commitDocumentData):
        * src/WebPageSerializerImpl.cpp:
        (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag):
        (WebKit::WebPageSerializerImpl::serialize):
        * src/WebSearchableFormData.cpp:
        (WebCore::GetFormEncoding):
        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::pageEncoding):
2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r57468.
        http://trac.webkit.org/changeset/57468
        https://bugs.webkit.org/show_bug.cgi?id=37433

        Broke the world...  Must have applied the patch wrong
        (Requested by abarth on #webkit).

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::finishedLoading):
        (WebCore::FrameLoaderClientQt::setMainDocumentError):
        (WebCore::FrameLoaderClientQt::committedLoad):
        (WebCore::FrameLoaderClientQt::dispatchDidFailLoading):
2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r57468.
        http://trac.webkit.org/changeset/57468
        https://bugs.webkit.org/show_bug.cgi?id=37433

        Broke the world...  Must have applied the patch wrong
        (Requested by abarth on #webkit).

        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::FrameLoaderClient::committedLoad):
        (WebKit::FrameLoaderClient::finishedLoading):
        * webkit/webkitwebview.cpp:
        (webkit_web_view_get_encoding):
2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r57468.
        http://trac.webkit.org/changeset/57468
        https://bugs.webkit.org/show_bug.cgi?id=37433

        Broke the world...  Must have applied the patch wrong
        (Requested by abarth on #webkit).

        * WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::receivedData):
2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r57468.
        http://trac.webkit.org/changeset/57468
        https://bugs.webkit.org/show_bug.cgi?id=37433

        Broke the world...  Must have applied the patch wrong
        (Requested by abarth on #webkit).

        * WebKitSupport/FrameLoaderClientWx.cpp:
        (WebCore::FrameLoaderClientWx::committedLoad):
2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r57468.
        http://trac.webkit.org/changeset/57468
        https://bugs.webkit.org/show_bug.cgi?id=37433

        Broke the world...  Must have applied the patch wrong
        (Requested by abarth on #webkit).

        * WebView/WebFrame.mm:
        (-[WebFrame _canProvideDocumentSource]):
        (-[WebFrame _receivedData:textEncodingName:]):
2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r57468.
        http://trac.webkit.org/changeset/57468
        https://bugs.webkit.org/show_bug.cgi?id=37433

        Broke the world...  Must have applied the patch wrong
        (Requested by abarth on #webkit).

        * WebCoreSupport/FrameLoaderClientHaiku.cpp:
        (WebCore::FrameLoaderClientHaiku::committedLoad):
2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r57468.
        http://trac.webkit.org/changeset/57468
        https://bugs.webkit.org/show_bug.cgi?id=37433

        Broke the world...  Must have applied the patch wrong
        (Requested by abarth on #webkit).

        * Android.mk:
        * GNUmakefile.am:
        * WebCore.base.exp:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/ScriptControllerBase.cpp:
        (WebCore::ScriptController::executeIfJavaScriptURL):
        * dom/Document.cpp:
        (WebCore::Document::close):
        * dom/ProcessingInstruction.cpp:
        (WebCore::ProcessingInstruction::checkStyleSheet):
        * dom/ScriptElement.cpp:
        (WebCore::ScriptElementData::scriptCharset):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):
        * loader/DocLoader.cpp:
        (WebCore::DocLoader::requestPreload):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::finishedLoading):
        (WebCore::DocumentLoader::setupForReplaceByMIMEType):
        * loader/DocumentWriter.cpp: Removed.
        * loader/DocumentWriter.h: Removed.
        * loader/FrameLoader.cpp:
        (WebCore::canReferToParentFrameEncoding):
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::init):
        (WebCore::FrameLoader::replaceDocument):
        (WebCore::FrameLoader::clear):
        (WebCore::FrameLoader::receivedFirstData):
        (WebCore::FrameLoader::responseMIMEType):
        (WebCore::FrameLoader::setResponseMIMEType):
        (WebCore::FrameLoader::begin):
        (WebCore::FrameLoader::write):
        (WebCore::FrameLoader::end):
        (WebCore::FrameLoader::endIfNotLoadingMainResource):
        (WebCore::FrameLoader::encoding):
        (WebCore::FrameLoader::setEncoding):
        (WebCore::FrameLoader::addData):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::open):
        (WebCore::FrameLoader::finishedLoadingDocument):
        (WebCore::FrameLoader::addExtraFieldsToRequest):
        * loader/FrameLoader.h:
        * loader/MediaDocument.cpp:
        (WebCore::MediaDocument::replaceMediaElementTimerFired):
        * loader/PluginDocument.cpp:
        (WebCore::PluginTokenizer::createDocumentStructure):
        * platform/network/FormDataBuilder.cpp:
        (WebCore::FormDataBuilder::dataEncoding):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@57469 268f45cc-cd09-0410-ab3c-d52691b4dbfc

43 files changed:
WebCore/Android.mk
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.base.exp
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/ScriptControllerBase.cpp
WebCore/dom/Document.cpp
WebCore/dom/ProcessingInstruction.cpp
WebCore/dom/ScriptElement.cpp
WebCore/html/HTMLLinkElement.cpp
WebCore/loader/DocLoader.cpp
WebCore/loader/DocumentLoader.cpp
WebCore/loader/DocumentWriter.cpp [deleted file]
WebCore/loader/DocumentWriter.h [deleted file]
WebCore/loader/FrameLoader.cpp
WebCore/loader/FrameLoader.h
WebCore/loader/MediaDocument.cpp
WebCore/loader/PluginDocument.cpp
WebCore/platform/network/FormDataBuilder.cpp
WebCore/svg/graphics/SVGImage.cpp
WebKit/chromium/ChangeLog
WebKit/chromium/src/ContextMenuClientImpl.cpp
WebKit/chromium/src/FrameLoaderClientImpl.cpp
WebKit/chromium/src/WebFrameImpl.cpp
WebKit/chromium/src/WebPageSerializerImpl.cpp
WebKit/chromium/src/WebSearchableFormData.cpp
WebKit/chromium/src/WebViewImpl.cpp
WebKit/gtk/ChangeLog
WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
WebKit/gtk/webkit/webkitwebview.cpp
WebKit/haiku/ChangeLog
WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebFrame.mm
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
WebKit/win/ChangeLog
WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
WebKit/wx/ChangeLog
WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp

index 3757d8f..a19d7e2 100644 (file)
@@ -285,7 +285,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
        loader/DocLoader.cpp \
        loader/DocumentLoader.cpp \
        loader/DocumentThreadableLoader.cpp \
-       loader/DocumentWriter.cpp \
        loader/FormState.cpp \
        loader/FrameLoader.cpp \
        loader/HistoryController.cpp \
index 7dc57a7..6ffa768 100644 (file)
@@ -1,3 +1,66 @@
+2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r57468.
+        http://trac.webkit.org/changeset/57468
+        https://bugs.webkit.org/show_bug.cgi?id=37433
+
+        Broke the world...  Must have applied the patch wrong
+        (Requested by abarth on #webkit).
+
+        * Android.mk:
+        * GNUmakefile.am:
+        * WebCore.base.exp:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/ScriptControllerBase.cpp:
+        (WebCore::ScriptController::executeIfJavaScriptURL):
+        * dom/Document.cpp:
+        (WebCore::Document::close):
+        * dom/ProcessingInstruction.cpp:
+        (WebCore::ProcessingInstruction::checkStyleSheet):
+        * dom/ScriptElement.cpp:
+        (WebCore::ScriptElementData::scriptCharset):
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::process):
+        * loader/DocLoader.cpp:
+        (WebCore::DocLoader::requestPreload):
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::finishedLoading):
+        (WebCore::DocumentLoader::setupForReplaceByMIMEType):
+        * loader/DocumentWriter.cpp: Removed.
+        * loader/DocumentWriter.h: Removed.
+        * loader/FrameLoader.cpp:
+        (WebCore::canReferToParentFrameEncoding):
+        (WebCore::FrameLoader::FrameLoader):
+        (WebCore::FrameLoader::init):
+        (WebCore::FrameLoader::replaceDocument):
+        (WebCore::FrameLoader::clear):
+        (WebCore::FrameLoader::receivedFirstData):
+        (WebCore::FrameLoader::responseMIMEType):
+        (WebCore::FrameLoader::setResponseMIMEType):
+        (WebCore::FrameLoader::begin):
+        (WebCore::FrameLoader::write):
+        (WebCore::FrameLoader::end):
+        (WebCore::FrameLoader::endIfNotLoadingMainResource):
+        (WebCore::FrameLoader::encoding):
+        (WebCore::FrameLoader::setEncoding):
+        (WebCore::FrameLoader::addData):
+        (WebCore::FrameLoader::transitionToCommitted):
+        (WebCore::FrameLoader::open):
+        (WebCore::FrameLoader::finishedLoadingDocument):
+        (WebCore::FrameLoader::addExtraFieldsToRequest):
+        * loader/FrameLoader.h:
+        * loader/MediaDocument.cpp:
+        (WebCore::MediaDocument::replaceMediaElementTimerFired):
+        * loader/PluginDocument.cpp:
+        (WebCore::PluginTokenizer::createDocumentStructure):
+        * platform/network/FormDataBuilder.cpp:
+        (WebCore::FormDataBuilder::dataEncoding):
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::dataChanged):
+
 2010-04-11  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index e49b93e..9b24c3e 100644 (file)
@@ -1306,8 +1306,6 @@ webcore_sources += \
        WebCore/loader/DocumentLoader.h \
        WebCore/loader/DocumentThreadableLoader.cpp \
        WebCore/loader/DocumentThreadableLoader.h \
-       WebCore/loader/DocumentWriter.cpp \
-       WebCore/loader/DocumentWriter.h \
        WebCore/loader/EmptyClients.h \
        WebCore/loader/FTPDirectoryDocument.cpp \
        WebCore/loader/FTPDirectoryDocument.h \
index 2b5790b..315c7e8 100644 (file)
@@ -157,6 +157,7 @@ __ZN7WebCore11FileChooser11chooseFilesERKN3WTF6VectorINS_6StringELm0EEE
 __ZN7WebCore11FileChooserD1Ev
 __ZN7WebCore11FrameLoader11completeURLERKNS_6StringE
 __ZN7WebCore11FrameLoader11loadArchiveEN3WTF10PassRefPtrINS_7ArchiveEEE
+__ZN7WebCore11FrameLoader11setEncodingERKNS_6StringEb
 __ZN7WebCore11FrameLoader12shouldReloadERKNS_4KURLES3_
 __ZN7WebCore11FrameLoader14detachChildrenEv
 __ZN7WebCore11FrameLoader14stopAllLoadersENS_14DatabasePolicyE
@@ -301,7 +302,6 @@ __ZN7WebCore14DocumentLoader8setTitleERKNS_6StringE
 __ZN7WebCore14DocumentLoaderC1ERKNS_15ResourceRequestERKNS_14SubstituteDataE
 __ZN7WebCore14DocumentLoaderC2ERKNS_15ResourceRequestERKNS_14SubstituteDataE
 __ZN7WebCore14DocumentLoaderD2Ev
-__ZN7WebCore14DocumentWriter11setEncodingERKNS_6StringEb
 __ZN7WebCore14ResourceHandle12releaseProxyEv
 __ZN7WebCore14ResourceHandle20forceContentSniffingEv
 __ZN7WebCore14ResourceLoader14cancelledErrorEv
@@ -813,6 +813,7 @@ __ZNK7WebCore11FrameLoader14frameHasLoadedEv
 __ZNK7WebCore11FrameLoader15containsPluginsEv
 __ZNK7WebCore11FrameLoader15firstLayoutDoneEv
 __ZNK7WebCore11FrameLoader16outgoingReferrerEv
+__ZNK7WebCore11FrameLoader16responseMIMETypeEv
 __ZNK7WebCore11FrameLoader20activeDocumentLoaderEv
 __ZNK7WebCore11FrameLoader27numPendingOrLoadingRequestsEb
 __ZNK7WebCore11FrameLoader8loadTypeEv
index e65ffd7..eb3cc20 100644 (file)
             'loader/DocumentLoader.h',
             'loader/DocumentThreadableLoader.cpp',
             'loader/DocumentThreadableLoader.h',
-            'loader/DocumentWriter.cpp',
-            'loader/DocumentWriter.h',
             'loader/EmptyClients.h',
             'loader/FTPDirectoryDocument.cpp',
             'loader/FTPDirectoryDocument.h',
index 0e2ee7d..7988273 100644 (file)
@@ -734,7 +734,6 @@ SOURCES += \
     loader/DocLoader.cpp \
     loader/DocumentLoader.cpp \
     loader/DocumentThreadableLoader.cpp \
-    loader/DocumentWriter.cpp \
     loader/FormState.cpp \
     loader/FrameLoader.cpp \
     loader/HistoryController.cpp \
index 56ca154..9deaccf 100644 (file)
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\loader\DocumentWriter.cpp"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\loader\DocumentWriter.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
                                RelativePath="..\loader\DocumentThreadableLoader.cpp"\r
                                >\r
                        </File>\r
index 68d5fca..a6668c5 100644 (file)
                97059978107D975200A50A7C /* PolicyCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 97059974107D975200A50A7C /* PolicyCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
                97059979107D975200A50A7C /* PolicyChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97059975107D975200A50A7C /* PolicyChecker.cpp */; };
                9705997A107D975200A50A7C /* PolicyChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 97059976107D975200A50A7C /* PolicyChecker.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               973889A0116EA9DC00ADF313 /* DocumentWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9738899E116EA9DC00ADF313 /* DocumentWriter.cpp */; };
-               973889A1116EA9DC00ADF313 /* DocumentWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9738899F116EA9DC00ADF313 /* DocumentWriter.h */; settings = {ATTRIBUTES = (Private, ); }; };
                973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 973E325410883B7C005BC493 /* ResourceLoadNotifier.cpp */; };
                973E325710883B7C005BC493 /* ResourceLoadNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 973E325510883B7C005BC493 /* ResourceLoadNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
                979F43D31075E44A0000F83B /* RedirectScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 979F43D11075E44A0000F83B /* RedirectScheduler.cpp */; };
                97059974107D975200A50A7C /* PolicyCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyCallback.h; sourceTree = "<group>"; };
                97059975107D975200A50A7C /* PolicyChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolicyChecker.cpp; sourceTree = "<group>"; };
                97059976107D975200A50A7C /* PolicyChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyChecker.h; sourceTree = "<group>"; };
-               9738899E116EA9DC00ADF313 /* DocumentWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentWriter.cpp; sourceTree = "<group>"; };
-               9738899F116EA9DC00ADF313 /* DocumentWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentWriter.h; sourceTree = "<group>"; };
                973E325410883B7C005BC493 /* ResourceLoadNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadNotifier.cpp; sourceTree = "<group>"; };
                973E325510883B7C005BC493 /* ResourceLoadNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadNotifier.h; sourceTree = "<group>"; };
                979F43D11075E44A0000F83B /* RedirectScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RedirectScheduler.cpp; sourceTree = "<group>"; };
                                656D371E0ADBA5DE00A4554D /* DocumentLoader.h */,
                                0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */,
                                0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */,
-                               9738899E116EA9DC00ADF313 /* DocumentWriter.cpp */,
-                               9738899F116EA9DC00ADF313 /* DocumentWriter.h */,
                                B255990D0D00D8B900BB825C /* EmptyClients.h */,
                                656D37230ADBA5DE00A4554D /* FormState.cpp */,
                                656D37220ADBA5DE00A4554D /* FormState.h */,
                                2542F4DA1166C25A00E89A86 /* UserGestureIndicator.cpp in Sources */,
                                C5D4AA79116BAFB60069CA93 /* GlyphMetricsMap.cpp in Sources */,
                                895253D7116C4C6800CABF00 /* FileStream.cpp in Sources */,
-                               973889A0116EA9DC00ADF313 /* DocumentWriter.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 41d2e0a..0467f2d 100644 (file)
@@ -101,7 +101,7 @@ bool ScriptController::executeIfJavaScriptURL(const KURL& url, bool userGesture,
     //        synchronously can cause crashes:
     //        http://bugs.webkit.org/show_bug.cgi?id=16782
     if (replaceDocument) 
-        m_frame->loader()->writer()->replaceDocument(scriptResult);
+        m_frame->loader()->replaceDocument(scriptResult);
 
     return true;
 }
index e56da73..638f479 100644 (file)
@@ -1769,7 +1769,7 @@ void Document::close()
     if (frame) {
         // This code calls implicitClose() if all loading has completed.
         FrameLoader* frameLoader = frame->loader();
-        frameLoader->writer()->endIfNotLoadingMainResource();
+        frameLoader->endIfNotLoadingMainResource();
         frameLoader->checkCompleted();
     } else {
         // Because we have no frame, we don't know if all loading has completed,
index 194dd9a..92a2b40 100644 (file)
@@ -165,7 +165,7 @@ void ProcessingInstruction::checkStyleSheet()
             {
                 String charset = attrs.get("charset");
                 if (charset.isEmpty())
-                    charset = document()->frame()->loader()->writer()->encoding();
+                    charset = document()->frame()->loader()->encoding();
 
                 m_cachedSheet = document()->docLoader()->requestCSSStyleSheet(url, charset);
             }
index 22d6981..731c3ba 100644 (file)
@@ -263,7 +263,7 @@ String ScriptElementData::scriptCharset() const
     // If charset has not been declared in script tag, fall back to frame encoding.
     if (charset.isEmpty()) {
         if (Frame* frame = m_element->document()->frame())
-            charset = frame->loader()->writer()->encoding();
+            charset = frame->loader()->encoding();
     }
 
     return charset;
index e85007f..e73a360 100644 (file)
@@ -194,7 +194,7 @@ void HTMLLinkElement::process()
         
         String charset = getAttribute(charsetAttr);
         if (charset.isEmpty() && document()->frame())
-            charset = document()->frame()->loader()->writer()->encoding();
+            charset = document()->frame()->loader()->encoding();
 
         if (m_cachedSheet) {
             if (m_loading)
index a39d3aa..31e1f91 100644 (file)
@@ -404,7 +404,7 @@ void DocLoader::requestPreload(CachedResource::Type type, const String& url, con
 {
     String encoding;
     if (type == CachedResource::Script || type == CachedResource::CSSStyleSheet)
-        encoding = charset.isEmpty() ? m_doc->frame()->loader()->writer()->encoding() : charset;
+        encoding = charset.isEmpty() ? m_doc->frame()->loader()->encoding() : charset;
 
     CachedResource* resource = requestResource(type, url, encoding, true);
     if (!resource || m_preloads.contains(resource))
index 95a9d66..37a2de2 100644 (file)
@@ -265,7 +265,7 @@ void DocumentLoader::finishedLoading()
     commitIfReady();
     if (FrameLoader* loader = frameLoader()) {
         loader->finishedLoadingDocument(this);
-        loader->writer()->end();
+        loader->end();
     }
 }
 
@@ -307,7 +307,7 @@ void DocumentLoader::setupForReplaceByMIMEType(const String& newMIMEType)
     }
     
     frameLoader()->finishedLoadingDocument(this);
-    m_frame->loader()->writer()->end();
+    m_frame->loader()->end();
     
     frameLoader()->setReplacing();
     m_gotFirstByte = false;
diff --git a/WebCore/loader/DocumentWriter.cpp b/WebCore/loader/DocumentWriter.cpp
deleted file mode 100644 (file)
index a485839..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (C) 2010. Adam Barth. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "DocumentWriter.h"
-
-#include "DOMImplementation.h"
-#include "DOMWindow.h"
-#include "Frame.h"
-#include "FrameLoader.h"
-#include "FrameLoaderClient.h"
-#include "FrameView.h"
-#include "PlaceholderDocument.h"
-#include "PluginDocument.h"
-#include "SecurityOrigin.h"
-#include "SegmentedString.h"
-#include "Settings.h"
-#include "TextResourceDecoder.h"
-#include "Tokenizer.h"
-
-namespace WebCore {
-
-static inline bool canReferToParentFrameEncoding(const Frame* frame, const Frame* parentFrame) 
-{
-    return parentFrame && parentFrame->document()->securityOrigin()->canAccess(frame->document()->securityOrigin());
-}
-    
-DocumentWriter::DocumentWriter(Frame* frame)
-    : m_frame(frame)
-    , m_receivedData(false)
-    , m_encodingWasChosenByUser(false)
-{
-}
-
-void DocumentWriter::replaceDocument(const String& html)
-{
-    m_frame->loader()->stopAllLoaders();
-    begin(m_frame->loader()->url(), true, m_frame->document()->securityOrigin());
-    addData(html);
-    end();
-}
-
-void DocumentWriter::clear()
-{
-    m_decoder = 0;
-    m_receivedData = false;
-    if (!m_encodingWasChosenByUser)
-        m_encoding = String();
-}
-
-void DocumentWriter::begin()
-{
-    begin(KURL());
-}
-
-void DocumentWriter::begin(const KURL& url, bool dispatch, SecurityOrigin* origin)
-{
-    // We need to take a reference to the security origin because |clear|
-    // might destroy the document that owns it.
-    RefPtr<SecurityOrigin> forcedSecurityOrigin = origin;
-
-    RefPtr<Document> document;
-
-    // Create a new document before clearing the frame, because it may need to inherit an aliased security context.
-    if (!m_frame->loader()->isDisplayingInitialEmptyDocument() && m_frame->loader()->client()->shouldUsePluginDocument(m_mimeType))
-        document = PluginDocument::create(m_frame);
-    else if (!m_frame->loader()->client()->hasHTMLView())
-        document = PlaceholderDocument::create(m_frame);
-    else
-        document = DOMImplementation::createDocument(m_mimeType, m_frame, m_frame->inViewSourceMode());
-
-    bool resetScripting = !(m_frame->loader()->isDisplayingInitialEmptyDocument() && m_frame->document()->securityOrigin()->isSecureTransitionTo(url));
-    m_frame->loader()->clear(resetScripting, resetScripting);
-    if (resetScripting)
-        m_frame->script()->updatePlatformScriptObjects();
-
-    m_frame->loader()->setURL(url);
-    document->setURL(url);
-    m_frame->setDocument(document);
-    if (m_decoder)
-        document->setDecoder(m_decoder.get());
-    if (forcedSecurityOrigin)
-        document->setSecurityOrigin(forcedSecurityOrigin.get());
-    m_frame->domWindow()->setURL(document->url());
-    m_frame->domWindow()->setSecurityOrigin(document->securityOrigin());
-
-    m_frame->loader()->didBeginDocument(dispatch);
-
-    document->implicitOpen();
-
-    if (m_frame->view() && m_frame->loader()->client()->hasHTMLView())
-        m_frame->view()->setContentsSize(IntSize());
-}
-
-void DocumentWriter::addData(const char* str, int len, bool flush)
-{
-    if (len == 0 && !flush)
-        return;
-
-    if (len == -1)
-        len = strlen(str);
-
-    Tokenizer* tokenizer = m_frame->document()->tokenizer();
-    if (tokenizer && tokenizer->wantsRawData()) {
-        if (len > 0)
-            tokenizer->writeRawData(str, len);
-        return;
-    }
-    
-    if (!m_decoder) {
-        if (Settings* settings = m_frame->settings()) {
-            m_decoder = TextResourceDecoder::create(m_mimeType,
-                settings->defaultTextEncodingName(),
-                settings->usesEncodingDetector());
-            Frame* parentFrame = m_frame->tree()->parent();
-            // Set the hint encoding to the parent frame encoding only if
-            // the parent and the current frames share the security origin.
-            // We impose this condition because somebody can make a child frame 
-            // containing a carefully crafted html/javascript in one encoding
-            // that can be mistaken for hintEncoding (or related encoding) by
-            // an auto detector. When interpreted in the latter, it could be
-            // an attack vector.
-            // FIXME: This might be too cautious for non-7bit-encodings and
-            // we may consider relaxing this later after testing.
-            if (canReferToParentFrameEncoding(m_frame, parentFrame))
-                m_decoder->setHintEncoding(parentFrame->document()->decoder());
-        } else
-            m_decoder = TextResourceDecoder::create(m_mimeType, String());
-        Frame* parentFrame = m_frame->tree()->parent();
-        if (m_encoding.isEmpty()) {
-            if (canReferToParentFrameEncoding(m_frame, parentFrame))
-                m_decoder->setEncoding(parentFrame->document()->inputEncoding(), TextResourceDecoder::EncodingFromParentFrame);
-        } else {
-            m_decoder->setEncoding(m_encoding,
-                m_encodingWasChosenByUser ? TextResourceDecoder::UserChosenEncoding : TextResourceDecoder::EncodingFromHTTPHeader);
-        }
-        m_frame->document()->setDecoder(m_decoder.get());
-    }
-
-    String decoded = m_decoder->decode(str, len);
-    if (flush)
-        decoded += m_decoder->flush();
-    if (decoded.isEmpty())
-        return;
-
-    if (!m_receivedData) {
-        m_receivedData = true;
-        if (m_decoder->encoding().usesVisualOrdering())
-            m_frame->document()->setVisuallyOrdered();
-        m_frame->document()->recalcStyle(Node::Force);
-    }
-
-    if (tokenizer) {
-        ASSERT(!tokenizer->wantsRawData());
-        tokenizer->write(decoded, true);
-    }
-}
-
-void DocumentWriter::addData(const String& str)
-{
-    if (str.isNull())
-        return;
-
-    if (!m_receivedData) {
-        m_receivedData = true;
-        m_frame->document()->setParseMode(Document::Strict);
-    }
-
-    if (Tokenizer* tokenizer = m_frame->document()->tokenizer())
-        tokenizer->write(str, true);
-}
-
-void DocumentWriter::end()
-{
-    m_frame->loader()->didEndDocument();
-    endIfNotLoadingMainResource();
-}
-
-void DocumentWriter::endIfNotLoadingMainResource()
-{
-    if (m_frame->loader()->isLoadingMainResource() || !m_frame->page() || !m_frame->document())
-        return;
-
-    // http://bugs.webkit.org/show_bug.cgi?id=10854
-    // The frame's last ref may be removed and it can be deleted by checkCompleted(), 
-    // so we'll add a protective refcount
-    RefPtr<Frame> protector(m_frame);
-
-    // make sure nothing's left in there
-    write(0, 0, true);
-    m_frame->document()->finishParsing();
-}
-
-String DocumentWriter::encoding() const
-{
-    if (m_encodingWasChosenByUser && !m_encoding.isEmpty())
-        return m_encoding;
-    if (m_decoder && m_decoder->encoding().isValid())
-        return m_decoder->encoding().name();
-    Settings* settings = m_frame->settings();
-    return settings ? settings->defaultTextEncodingName() : String();
-}
-
-void DocumentWriter::setEncoding(const String& name, bool userChosen)
-{
-    m_frame->loader()->willSetEncoding();
-    m_encoding = name;
-    m_encodingWasChosenByUser = userChosen;
-}
-
-void DocumentWriter::setDecoder(TextResourceDecoder* decoder)
-{
-    m_decoder = decoder;
-}
-
-String DocumentWriter::depricatedFrameEncoding() const
-{
-    return m_frame->loader()->url().isEmpty() ? m_encoding : encoding();
-}
-
-} // namespace WebCore
diff --git a/WebCore/loader/DocumentWriter.h b/WebCore/loader/DocumentWriter.h
deleted file mode 100644 (file)
index 3abb53c..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2010. Adam Barth. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Adam Barth. ("Adam Barth") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DocumentWriter_h
-#define DocumentWriter_h
-
-#include "KURL.h"
-#include "PlatformString.h"
-
-namespace WebCore {
-
-class Frame;
-class SecurityOrigin;
-class TextResourceDecoder;
-
-class DocumentWriter : public Noncopyable {
-public:
-    DocumentWriter(Frame*);
-
-    void replaceDocument(const String&);
-
-    void begin();
-    void begin(const KURL&, bool dispatchWindowObjectAvailable = true, SecurityOrigin* forcedSecurityOrigin = 0);
-    void addData(const char* string, int length = -1, bool flush = false);
-    void end();
-    void endIfNotLoadingMainResource();
-    void clear();
-
-    String encoding() const;
-    void setEncoding(const String& encoding, bool userChosen);
-
-    // FIXME: It's really unforunate to need to expose this piece of state.
-    // I suspect a better design is to disentangle user-provided encodings,
-    // default encodings, and the decoding we're currently using.
-    String depricatedFrameEncoding() const;
-
-    const String& mimeType() const { return m_mimeType; }
-    void setMIMEType(const String& type) { m_mimeType = type; }
-
-    void setDecoder(TextResourceDecoder*);
-
-private:
-    void addData(const String&);
-
-    Frame* m_frame;
-
-    bool m_receivedData;
-    String m_mimeType;
-
-    bool m_encodingWasChosenByUser;
-    String m_encoding;
-    RefPtr<TextResourceDecoder> m_decoder;
-};
-
-} // namespace WebCore
-
-#endif // DocumentWriter_h
index 32c2e9a..27c796e 100644 (file)
@@ -164,13 +164,17 @@ static int numRequests(Document* document)
     return document->docLoader()->requestCount();
 }
 
+static inline bool canReferToParentFrameEncoding(const Frame* frame, const Frame* parentFrame) 
+{
+    return parentFrame && parentFrame->document()->securityOrigin()->canAccess(frame->document()->securityOrigin());
+}
+
 FrameLoader::FrameLoader(Frame* frame, FrameLoaderClient* client)
     : m_frame(frame)
     , m_client(client)
     , m_policyChecker(frame)
     , m_history(frame)
     , m_notifer(frame)
-    , m_writer(frame)
     , m_state(FrameStateCommittedPage)
     , m_loadType(FrameLoadTypeStandard)
     , m_delegateIsHandlingProvisionalLoadError(false)
@@ -185,6 +189,8 @@ FrameLoader::FrameLoader(Frame* frame, FrameLoaderClient* client)
     , m_isComplete(false)
     , m_isLoadingMainResource(false)
     , m_needsClear(false)
+    , m_receivedData(false)
+    , m_encodingWasChosenByUser(false)
     , m_containsPlugIns(false)
     , m_checkTimer(this, &FrameLoader::checkTimerFired)
     , m_shouldCallCheckCompleted(false)
@@ -225,8 +231,8 @@ void FrameLoader::init()
     setState(FrameStateProvisional);
     m_provisionalDocumentLoader->setResponse(ResourceResponse(KURL(), "text/html", 0, String(), String()));
     m_provisionalDocumentLoader->finishedLoading();
-    writer()->begin(KURL(), false);
-    writer()->end();
+    begin(KURL(), false);
+    end();
     m_frame->document()->cancelParsing();
     m_creatingInitialEmptyDocument = false;
     m_didCallImplicitClose = true;
@@ -699,6 +705,14 @@ void FrameLoader::cancelAndClear()
     m_frame->script()->updatePlatformScriptObjects();
 }
 
+void FrameLoader::replaceDocument(const String& html)
+{
+    stopAllLoaders();
+    begin(m_URL, true, m_frame->document()->securityOrigin());
+    write(html);
+    end();
+}
+
 void FrameLoader::clear(bool clearWindowProperties, bool clearScriptObjects, bool clearFrameView)
 {
     m_frame->editor()->clear();
@@ -732,7 +746,7 @@ void FrameLoader::clear(bool clearWindowProperties, bool clearScriptObjects, boo
     // Do not drop the document before the ScriptController and view are cleared
     // as some destructors might still try to access the document.
     m_frame->setDocument(0);
-    writer()->clear();
+    m_decoder = 0;
 
     m_containsPlugIns = false;
 
@@ -744,12 +758,17 @@ void FrameLoader::clear(bool clearWindowProperties, bool clearScriptObjects, boo
     m_checkTimer.stop();
     m_shouldCallCheckCompleted = false;
     m_shouldCallCheckLoadComplete = false;
+
+    m_receivedData = false;
     m_isDisplayingInitialEmptyDocument = false;
+
+    if (!m_encodingWasChosenByUser)
+        m_encoding = String();
 }
 
 void FrameLoader::receivedFirstData()
 {
-    writer()->begin(m_workingURL, false);
+    begin(m_workingURL, false);
 
     dispatchDidCommitLoad();
     dispatchDidClearWindowObjectsInAllWorlds();
@@ -780,49 +799,190 @@ void FrameLoader::receivedFirstData()
     m_frame->redirectScheduler()->scheduleRedirect(delay, url);
 }
 
-void FrameLoader::setURL(const KURL& url)
+const String& FrameLoader::responseMIMEType() const
+{
+    return m_responseMIMEType;
+}
+
+void FrameLoader::setResponseMIMEType(const String& type)
+{
+    m_responseMIMEType = type;
+}
+    
+void FrameLoader::begin()
 {
+    begin(KURL());
+}
+
+void FrameLoader::begin(const KURL& url, bool dispatch, SecurityOrigin* origin)
+{
+    // We need to take a reference to the security origin because |clear|
+    // might destroy the document that owns it.
+    RefPtr<SecurityOrigin> forcedSecurityOrigin = origin;
+
+    RefPtr<Document> document;
+
+    // Create a new document before clearing the frame, because it may need to inherit an aliased security context.
+    if (!m_isDisplayingInitialEmptyDocument && m_client->shouldUsePluginDocument(m_responseMIMEType))
+        document = PluginDocument::create(m_frame);
+    else if (!m_client->hasHTMLView())
+        document = PlaceholderDocument::create(m_frame);
+    else
+        document = DOMImplementation::createDocument(m_responseMIMEType, m_frame, m_frame->inViewSourceMode());
+
+    bool resetScripting = !(m_isDisplayingInitialEmptyDocument && m_frame->document()->securityOrigin()->isSecureTransitionTo(url));
+    clear(resetScripting, resetScripting);
+    if (resetScripting)
+        m_frame->script()->updatePlatformScriptObjects();
+
+    m_needsClear = true;
+    m_isComplete = false;
+    m_didCallImplicitClose = false;
+    m_isLoadingMainResource = true;
+    m_isDisplayingInitialEmptyDocument = m_creatingInitialEmptyDocument;
+
     KURL ref(url);
     ref.setUser(String());
     ref.setPass(String());
     ref.removeFragmentIdentifier();
     m_outgoingReferrer = ref.string();
     m_URL = url;
-}
 
-void FrameLoader::didBeginDocument(bool dispatch)
-{
+    document->setURL(m_URL);
+    m_frame->setDocument(document);
+
     if (m_pendingStateObject) {
-        m_frame->document()->statePopped(m_pendingStateObject.get());
+        document->statePopped(m_pendingStateObject.get());
         m_pendingStateObject.clear();
     }
+    
+    if (m_decoder)
+        document->setDecoder(m_decoder.get());
+    if (forcedSecurityOrigin)
+        document->setSecurityOrigin(forcedSecurityOrigin.get());
 
-    m_needsClear = true;
-    m_isComplete = false;
-    m_didCallImplicitClose = false;
-    m_isLoadingMainResource = true;
-    m_isDisplayingInitialEmptyDocument = m_creatingInitialEmptyDocument;
+    m_frame->domWindow()->setURL(document->url());
+    m_frame->domWindow()->setSecurityOrigin(document->securityOrigin());
 
     if (dispatch)
         dispatchDidClearWindowObjectsInAllWorlds();
-
+    
     updateFirstPartyForCookies();
 
-    Settings* settings = m_frame->document()->settings();
-    m_frame->document()->docLoader()->setAutoLoadImages(settings && settings->loadsImagesAutomatically());
+    Settings* settings = document->settings();
+    document->docLoader()->setAutoLoadImages(settings && settings->loadsImagesAutomatically());
 
     if (m_documentLoader) {
         String dnsPrefetchControl = m_documentLoader->response().httpHeaderField("X-DNS-Prefetch-Control");
         if (!dnsPrefetchControl.isEmpty())
-            m_frame->document()->parseDNSPrefetchControlHeader(dnsPrefetchControl);
+            document->parseDNSPrefetchControlHeader(dnsPrefetchControl);
     }
 
     history()->restoreDocumentState();
+
+    document->implicitOpen();
+    
+    if (m_frame->view() && m_client->hasHTMLView())
+        m_frame->view()->setContentsSize(IntSize());
+}
+
+void FrameLoader::write(const char* str, int len, bool flush)
+{
+    if (len == 0 && !flush)
+        return;
+    
+    if (len == -1)
+        len = strlen(str);
+
+    Tokenizer* tokenizer = m_frame->document()->tokenizer();
+    if (tokenizer && tokenizer->wantsRawData()) {
+        if (len > 0)
+            tokenizer->writeRawData(str, len);
+        return;
+    }
+    
+    if (!m_decoder) {
+        if (Settings* settings = m_frame->settings()) {
+            m_decoder = TextResourceDecoder::create(m_responseMIMEType,
+                settings->defaultTextEncodingName(),
+                settings->usesEncodingDetector());
+            Frame* parentFrame = m_frame->tree()->parent();
+            // Set the hint encoding to the parent frame encoding only if
+            // the parent and the current frames share the security origin.
+            // We impose this condition because somebody can make a child frame 
+            // containing a carefully crafted html/javascript in one encoding
+            // that can be mistaken for hintEncoding (or related encoding) by
+            // an auto detector. When interpreted in the latter, it could be
+            // an attack vector.
+            // FIXME: This might be too cautious for non-7bit-encodings and
+            // we may consider relaxing this later after testing.
+            if (canReferToParentFrameEncoding(m_frame, parentFrame))
+                m_decoder->setHintEncoding(parentFrame->document()->decoder());
+        } else
+            m_decoder = TextResourceDecoder::create(m_responseMIMEType, String());
+        Frame* parentFrame = m_frame->tree()->parent();
+        if (m_encoding.isEmpty()) {
+            if (canReferToParentFrameEncoding(m_frame, parentFrame))
+                m_decoder->setEncoding(parentFrame->document()->inputEncoding(), TextResourceDecoder::EncodingFromParentFrame);
+        } else {
+            m_decoder->setEncoding(m_encoding,
+                m_encodingWasChosenByUser ? TextResourceDecoder::UserChosenEncoding : TextResourceDecoder::EncodingFromHTTPHeader);
+        }
+        m_frame->document()->setDecoder(m_decoder.get());
+    }
+
+    String decoded = m_decoder->decode(str, len);
+    if (flush)
+        decoded += m_decoder->flush();
+    if (decoded.isEmpty())
+        return;
+
+    if (!m_receivedData) {
+        m_receivedData = true;
+        if (m_decoder->encoding().usesVisualOrdering())
+            m_frame->document()->setVisuallyOrdered();
+        m_frame->document()->recalcStyle(Node::Force);
+    }
+
+    if (tokenizer) {
+        ASSERT(!tokenizer->wantsRawData());
+        tokenizer->write(decoded, true);
+    }
+}
+
+void FrameLoader::write(const String& str)
+{
+    if (str.isNull())
+        return;
+
+    if (!m_receivedData) {
+        m_receivedData = true;
+        m_frame->document()->setParseMode(Document::Strict);
+    }
+
+    if (Tokenizer* tokenizer = m_frame->document()->tokenizer())
+        tokenizer->write(str, true);
 }
 
-void FrameLoader::didEndDocument()
+void FrameLoader::end()
 {
     m_isLoadingMainResource = false;
+    endIfNotLoadingMainResource();
+}
+
+void FrameLoader::endIfNotLoadingMainResource()
+{
+    if (m_isLoadingMainResource || !m_frame->page() || !m_frame->document())
+        return;
+
+    // http://bugs.webkit.org/show_bug.cgi?id=10854
+    // The frame's last ref may be removed and it can be deleted by checkCompleted(), 
+    // so we'll add a protective refcount
+    RefPtr<Frame> protector(m_frame);
+
+    // make sure nothing's left in there
+    write(0, 0, true);
+    m_frame->document()->finishParsing();
 }
 
 void FrameLoader::iconLoadDecisionAvailable()
@@ -1100,6 +1260,16 @@ void FrameLoader::loadArchive(PassRefPtr<Archive> prpArchive)
     load(documentLoader.get());
 }
 
+String FrameLoader::encoding() const
+{
+    if (m_encodingWasChosenByUser && !m_encoding.isEmpty())
+        return m_encoding;
+    if (m_decoder && m_decoder->encoding().isValid())
+        return m_decoder->encoding().name();
+    Settings* settings = m_frame->settings();
+    return settings ? settings->defaultTextEncodingName() : String();
+}
+
 bool FrameLoader::requestObject(RenderEmbeddedObject* renderer, const String& url, const AtomicString& frameName,
     const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
 {
@@ -1363,10 +1533,12 @@ void FrameLoader::resetMultipleFormSubmissionProtection()
     m_submittedFormURL = KURL();
 }
 
-void FrameLoader::willSetEncoding()
+void FrameLoader::setEncoding(const String& name, bool userChosen)
 {
     if (!m_workingURL.isEmpty())
         receivedFirstData();
+    m_encoding = name;
+    m_encodingWasChosenByUser = userChosen;
 }
 
 void FrameLoader::addData(const char* bytes, int length)
@@ -1374,7 +1546,7 @@ void FrameLoader::addData(const char* bytes, int length)
     ASSERT(m_workingURL.isEmpty());
     ASSERT(m_frame->document());
     ASSERT(m_frame->document()->parsing());
-    writer()->addData(bytes, length);
+    write(bytes, length);
 }
 
 #if ENABLE(WML)
@@ -2486,7 +2658,7 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
             ASSERT_NOT_REACHED();
     }
 
-    writer()->setMIMEType(dl->responseMIMEType());
+    m_responseMIMEType = dl->responseMIMEType();
 
     // Tell the client we've committed this URL.
     ASSERT(m_frame->view());
@@ -2603,8 +2775,8 @@ void FrameLoader::open(CachedFrameBase& cachedFrame)
     m_URL = url;
     m_workingURL = url;
 
-    m_frame->loader()->started();
-    m_frame->loader()->clear(true, true, cachedFrame.isMainFrame());
+    started();
+    clear(true, true, cachedFrame.isMainFrame());
 
     Document* document = cachedFrame.document();
     ASSERT(document);
@@ -2631,11 +2803,7 @@ void FrameLoader::open(CachedFrameBase& cachedFrame)
     m_frame->domWindow()->setURL(document->url());
     m_frame->domWindow()->setSecurityOrigin(document->securityOrigin());
 
-    // FIXME: I would have expected us to restore the value of
-    // DocumentWriter::m_encoding here, but we don't seem to. I wonder if
-    // that's a bug.  One way to test is to look at the fallback array of
-    // encodings for decoding content disposition.
-    writer()->setDecoder(document->decoder());
+    m_decoder = document->decoder();
 
     updateFirstPartyForCookies();
 
@@ -2727,14 +2895,14 @@ void FrameLoader::finishedLoadingDocument(DocumentLoader* loader)
     ArchiveResource* mainResource = archive->mainResource();
     loader->setParsedArchiveData(mainResource->data());
 
-    writer()->setMIMEType(mainResource->mimeType());
+    m_responseMIMEType = mainResource->mimeType();
 
     closeURL();
     didOpenURL(mainResource->url());
 
     String userChosenEncoding = documentLoader()->overrideEncoding();
     bool encodingIsUserChosen = !userChosenEncoding.isNull();
-    writer()->setEncoding(encodingIsUserChosen ? userChosenEncoding : mainResource->textEncoding(), encodingIsUserChosen);
+    setEncoding(encodingIsUserChosen ? userChosenEncoding : mainResource->textEncoding(), encodingIsUserChosen);
 
     ASSERT(m_frame->document());
 
@@ -3141,12 +3309,8 @@ void FrameLoader::addExtraFieldsToRequest(ResourceRequest& request, FrameLoadTyp
 
     // Always try UTF-8. If that fails, try frame encoding (if any) and then the default.
     // For a newly opened frame with an empty URL, encoding() should not be used, because this methods asks decoder, which uses ISO-8859-1.
-    String encoding1 = "UTF-8";
-    String encoding2 = writer()->depricatedFrameEncoding();
-    String encoding3;
-    if (Settings* settings = m_frame->settings())
-        encoding3 = settings->defaultTextEncodingName();
-    request.setResponseContentDispositionEncodingFallbackArray(encoding1, encoding2, encoding3);
+    Settings* settings = m_frame->settings();
+    request.setResponseContentDispositionEncodingFallbackArray("UTF-8", m_URL.isEmpty() ? m_encoding : encoding(), settings ? settings->defaultTextEncodingName() : String());
 }
 
 void FrameLoader::addHTTPOriginIfNeeded(ResourceRequest& request, String origin)
index 1d71eb4..ed4ff66 100644 (file)
@@ -32,7 +32,6 @@
 #define FrameLoader_h
 
 #include "CachePolicy.h"
-#include "DocumentWriter.h"
 #include "FrameLoaderTypes.h"
 #include "HistoryController.h"
 #include "PolicyCallback.h"
@@ -100,7 +99,6 @@ public:
     PolicyChecker* policyChecker() const { return &m_policyChecker; }
     HistoryController* history() const { return &m_history; }
     ResourceLoadNotifier* notifier() const { return &m_notifer; }
-    DocumentWriter* writer() const { return &m_writer; }
 
     // FIXME: This is not cool, people. There are too many different functions that all start loads.
     // We should aim to consolidate these into a smaller set of functions, and try to reuse more of
@@ -228,16 +226,24 @@ public:
 
     void didExplicitOpen();
 
-    // Callbacks from DocumentWriter
-    void didBeginDocument(bool dispatchWindowObjectAvailable);
-    void didEndDocument();
-    void willSetEncoding();
-
     KURL iconURL();
     void commitIconURLToIconDatabase(const KURL&);
 
     KURL baseURL() const;
 
+    void replaceDocument(const String&);
+
+    void begin();
+    void begin(const KURL&, bool dispatchWindowObjectAvailable = true, SecurityOrigin* forcedSecurityOrigin = 0);
+
+    void write(const char* string, int length = -1, bool flush = false);
+    void write(const String&);
+    void end();
+    void endIfNotLoadingMainResource();
+
+    void setEncoding(const String& encoding, bool userChosen);
+    String encoding() const;
+
     void tokenizerProcessedData();
 
     void handledOnloadEvents();
@@ -277,8 +283,8 @@ public:
 
     const KURL& url() const { return m_URL; }
 
-    // setURL is a low-level setter and does not trigger loading.
-    void setURL(const KURL&);
+    void setResponseMIMEType(const String&);
+    const String& responseMIMEType() const;
 
     bool allowPlugins(ReasonForCallingAllowPlugins);
     bool containsPlugins() const;
@@ -297,7 +303,6 @@ public:
     KURL completeURL(const String& url);
 
     void cancelAndClear();
-    void clear(bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true);
 
     void setTitle(const String&);
 
@@ -342,8 +347,6 @@ public:
 
     static ObjectContentType defaultObjectContentType(const KURL& url, const String& mimeType);
 
-    bool isDisplayingInitialEmptyDocument() const { return m_isDisplayingInitialEmptyDocument; }
-
 private:
     bool canCachePageContainingThisFrame();
 #ifndef NDEBUG
@@ -408,6 +411,8 @@ private:
 
     void updateHistoryAfterClientRedirect();
 
+    void clear(bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true);
+
     bool shouldReloadToHandleUnreachableURL(DocumentLoader*);
 
     void dispatchDidCommitLoad();
@@ -460,7 +465,6 @@ private:
     mutable PolicyChecker m_policyChecker;
     mutable HistoryController m_history;
     mutable ResourceLoadNotifier m_notifer;
-    mutable DocumentWriter m_writer;
 
     FrameState m_state;
     FrameLoadType m_loadType;
@@ -484,6 +488,8 @@ private:
 
     bool m_isExecutingJavaScriptFormAction;
 
+    String m_responseMIMEType;
+
     bool m_didCallImplicitClose;
     bool m_wasUnloadEventEmitted;
     bool m_unloadEventBeingDispatched;
@@ -501,6 +507,11 @@ private:
     bool m_cancellingWithLoadInProgress;
 
     bool m_needsClear;
+    bool m_receivedData;
+
+    bool m_encodingWasChosenByUser;
+    String m_encoding;
+    RefPtr<TextResourceDecoder> m_decoder;
 
     bool m_containsPlugIns;
 
index 27361fc..a2d6276 100644 (file)
@@ -227,7 +227,7 @@ void MediaDocument::replaceMediaElementTimerFired(Timer<MediaDocument>*)
         embedElement->setAttribute(heightAttr, "100%");
         embedElement->setAttribute(nameAttr, "plugin");
         embedElement->setAttribute(srcAttr, url().string());
-        embedElement->setAttribute(typeAttr, frame()->loader()->writer()->mimeType());
+        embedElement->setAttribute(typeAttr, frame()->loader()->responseMIMEType());
 
         ExceptionCode ec;
         videoElement->parent()->replaceChild(embedElement, videoElement, ec);
index 7024333..1d2c2b7 100644 (file)
@@ -105,7 +105,7 @@ void PluginTokenizer::createDocumentStructure()
     
     m_embedElement->setAttribute(nameAttr, "plugin");
     m_embedElement->setAttribute(srcAttr, m_doc->url().string());
-    m_embedElement->setAttribute(typeAttr, m_doc->frame()->loader()->writer()->mimeType());
+    m_embedElement->setAttribute(typeAttr, m_doc->frame()->loader()->responseMIMEType());
     
     body->appendChild(embedElement, ec);    
 }
index 436dc8b..cf890a1 100644 (file)
@@ -87,7 +87,7 @@ TextEncoding FormDataBuilder::dataEncoding(Document* document) const
     }
 
     if (Frame* frame = document->frame())
-        return frame->loader()->writer()->encoding();
+        return frame->loader()->encoding();
 
     return Latin1Encoding();
 }
index f496b32..3cde619 100644 (file)
@@ -259,10 +259,10 @@ bool SVGImage::dataChanged(bool allDataReceived)
         loader->load(fakeRequest, false); // Make sure the DocumentLoader is created
         loader->policyChecker()->cancelCheck(); // cancel any policy checks
         loader->commitProvisionalLoad(0);
-        loader->writer()->setMIMEType("image/svg+xml");
-        loader->writer()->begin(KURL()); // create the empty document
-        loader->writer()->addData(data()->data(), data()->size());
-        loader->writer()->end();
+        loader->setResponseMIMEType("image/svg+xml");
+        loader->begin(KURL()); // create the empty document
+        loader->write(data()->data(), data()->size());
+        loader->end();
         frame->view()->setTransparent(true); // SVG Images are transparent.
     }
 
index d5ae26f..1dd062c 100644 (file)
@@ -1,3 +1,27 @@
+2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r57468.
+        http://trac.webkit.org/changeset/57468
+        https://bugs.webkit.org/show_bug.cgi?id=37433
+
+        Broke the world...  Must have applied the patch wrong
+        (Requested by abarth on #webkit).
+
+        * src/ContextMenuClientImpl.cpp:
+        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+        * src/FrameLoaderClientImpl.cpp:
+        (WebKit::FrameLoaderClientImpl::finishedLoading):
+        * src/WebFrameImpl.cpp:
+        (WebKit::WebFrameImpl::encoding):
+        (WebKit::WebFrameImpl::commitDocumentData):
+        * src/WebPageSerializerImpl.cpp:
+        (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag):
+        (WebKit::WebPageSerializerImpl::serialize):
+        * src/WebSearchableFormData.cpp:
+        (WebCore::GetFormEncoding):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::pageEncoding):
+
 2010-04-11  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index bee4310..708d113 100644 (file)
@@ -192,7 +192,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
 
     // If it's not a link, an image, a media element, or an image/media link,
     // show a selection menu or a more generic page menu.
-    data.frameEncoding = selectedFrame->loader()->writer()->encoding();
+    data.frameEncoding = selectedFrame->loader()->encoding();
 
     // Send the frame and page URLs in any case.
     data.pageURL = urlFromFrame(m_webView->mainFrameImpl()->frame());
index 135392b..cecfbb3 100644 (file)
@@ -1066,7 +1066,7 @@ void FrameLoaderClientImpl::finishedLoading(DocumentLoader* dl)
         // However, we only want to do this if makeRepresentation has been called, to
         // match the behavior on the Mac.
         if (m_hasRepresentation)
-            dl->frameLoader()->writer()->setEncoding("", false);
+            dl->frameLoader()->setEncoding("", false);
     }
 }
 
index ebd015c..359477d 100644 (file)
@@ -522,7 +522,7 @@ WebURL WebFrameImpl::openSearchDescriptionURL() const
 
 WebString WebFrameImpl::encoding() const
 {
-    return frame()->loader()->writer()->encoding();
+    return frame()->loader()->encoding();
 }
 
 WebSize WebFrameImpl::scrollOffset() const
@@ -1016,7 +1016,7 @@ void WebFrameImpl::commitDocumentData(const char* data, size_t dataLen)
         userChosen = false;
         encoding = documentLoader->response().textEncodingName();
     }
-    m_frame->loader()->writer()->setEncoding(encoding, userChosen);
+    m_frame->loader()->setEncoding(encoding, userChosen);
 
     // NOTE: mac only does this if there is a document
     m_frame->loader()->addData(data, dataLen);
index e82b5c0..d5b2b7f 100644 (file)
@@ -170,7 +170,7 @@ String WebPageSerializerImpl::preActionBeforeSerializeOpenTag(
             // Get encoding info.
             String xmlEncoding = param->doc->xmlEncoding();
             if (xmlEncoding.isEmpty())
-                xmlEncoding = param->doc->frame()->loader()->writer()->encoding();
+                xmlEncoding = param->doc->frame()->loader()->encoding();
             if (xmlEncoding.isEmpty())
                 xmlEncoding = UTF8Encoding().name();
             result.append("<?xml version=\"");
@@ -514,7 +514,7 @@ bool WebPageSerializerImpl::serialize()
             // A new document, we will serialize it.
             didSerialization = true;
             // Get target encoding for current document.
-            String encoding = currentFrame->frame()->loader()->writer()->encoding();
+            String encoding = currentFrame->frame()->loader()->encoding();
             // Create the text encoding object with target encoding.
             TextEncoding textEncoding(encoding);
             // Construct serialize parameter for late processing document.
index 8eef6cc..eddaffe 100644 (file)
@@ -62,7 +62,7 @@ void GetFormEncoding(const HTMLFormElement* form, TextEncoding* encoding)
             return;
     }
     const Frame* frame = form->document()->frame();
-    *encoding = frame ? TextEncoding(frame->loader()->writer()->encoding()) : Latin1Encoding();
+    *encoding = frame ? TextEncoding(frame->loader()->encoding()) : Latin1Encoding();
 }
 
 // Returns true if the submit request results in an HTTP URL.
index 198a81e..63e1e5f 100644 (file)
@@ -1282,7 +1282,7 @@ WebString WebViewImpl::pageEncoding() const
     if (!m_page.get())
         return WebString();
 
-    return m_page->mainFrame()->loader()->writer()->encoding();
+    return m_page->mainFrame()->loader()->encoding();
 }
 
 void WebViewImpl::setPageEncoding(const WebString& encodingName)
index d093101..f5888de 100644 (file)
@@ -1,3 +1,18 @@
+2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r57468.
+        http://trac.webkit.org/changeset/57468
+        https://bugs.webkit.org/show_bug.cgi?id=37433
+
+        Broke the world...  Must have applied the patch wrong
+        (Requested by abarth on #webkit).
+
+        * WebCoreSupport/FrameLoaderClientGtk.cpp:
+        (WebKit::FrameLoaderClient::committedLoad):
+        (WebKit::FrameLoaderClient::finishedLoading):
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_get_encoding):
+
 2010-04-11  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index 27ff3c8..84c4323 100644 (file)
@@ -149,7 +149,7 @@ void FrameLoaderClient::committedLoad(WebCore::DocumentLoader* loader, const cha
             encoding = loader->response().textEncodingName();
 
         FrameLoader* frameLoader = loader->frameLoader();
-        frameLoader->writer()->setEncoding(encoding, userChosen);
+        frameLoader->setEncoding(encoding, userChosen);
         if (data)
             frameLoader->addData(data, length);
 
@@ -868,7 +868,7 @@ void FrameLoaderClient::finishedLoading(WebCore::DocumentLoader* documentLoader)
 {
     if (!m_pluginView) {
         FrameLoader* loader = documentLoader->frameLoader();
-        loader->writer()->setEncoding(m_response.textEncodingName(), false);
+        loader->setEncoding(m_response.textEncodingName(), false);
     } else {
         m_pluginView->didFinishLoading();
         m_pluginView = 0;
index 22f6d04..6f81625 100644 (file)
@@ -4011,7 +4011,7 @@ const gchar* webkit_web_view_get_encoding(WebKitWebView* webView)
 {
     g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), NULL);
 
-    String encoding = core(webView)->mainFrame()->loader()->writer()->encoding();
+    String encoding = core(webView)->mainFrame()->loader()->encoding();
 
     if (!encoding.isEmpty()) {
         WebKitWebViewPrivate* priv = webView->priv;
index be38ded..2d2acbe 100644 (file)
@@ -1,3 +1,15 @@
+2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r57468.
+        http://trac.webkit.org/changeset/57468
+        https://bugs.webkit.org/show_bug.cgi?id=37433
+
+        Broke the world...  Must have applied the patch wrong
+        (Requested by abarth on #webkit).
+
+        * WebCoreSupport/FrameLoaderClientHaiku.cpp:
+        (WebCore::FrameLoaderClientHaiku::committedLoad):
+
 2010-04-11  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index 430194a..1949421 100644 (file)
@@ -510,7 +510,7 @@ void FrameLoaderClientHaiku::committedLoad(WebCore::DocumentLoader* loader, cons
         return;
 
     FrameLoader* frameLoader = loader->frameLoader();
-    frameLoader->writer()->setEncoding(m_response.textEncodingName(), false);
+    frameLoader->setEncoding(m_response.textEncodingName(), false);
     frameLoader->addData(data, length);
 }
 
index 43d6f93..7f5899b 100644 (file)
@@ -1,3 +1,16 @@
+2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r57468.
+        http://trac.webkit.org/changeset/57468
+        https://bugs.webkit.org/show_bug.cgi?id=37433
+
+        Broke the world...  Must have applied the patch wrong
+        (Requested by abarth on #webkit).
+
+        * WebView/WebFrame.mm:
+        (-[WebFrame _canProvideDocumentSource]):
+        (-[WebFrame _receivedData:textEncodingName:]):
+
 2010-04-11  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index 4ce9876..538c23a 100644 (file)
@@ -961,7 +961,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
 - (BOOL)_canProvideDocumentSource
 {
     Frame* frame = _private->coreFrame;
-    String mimeType = frame->loader()->writer()->mimeType();
+    String mimeType = frame->loader()->responseMIMEType();
     PluginData* pluginData = frame->page() ? frame->page()->pluginData() : 0;
 
     if (WebCore::DOMImplementation::isTextMIMEType(mimeType) ||
@@ -986,7 +986,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
     bool userChosen = !encoding.isNull();
     if (encoding.isNull())
         encoding = textEncodingName;
-    _private->coreFrame->loader()->writer()->setEncoding(encoding, userChosen);
+    _private->coreFrame->loader()->setEncoding(encoding, userChosen);
     [self _addData:data];
 }
 
index 0da3395..2d1ebc1 100644 (file)
@@ -1,3 +1,18 @@
+2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r57468.
+        http://trac.webkit.org/changeset/57468
+        https://bugs.webkit.org/show_bug.cgi?id=37433
+
+        Broke the world...  Must have applied the patch wrong
+        (Requested by abarth on #webkit).
+
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::finishedLoading):
+        (WebCore::FrameLoaderClientQt::setMainDocumentError):
+        (WebCore::FrameLoaderClientQt::committedLoad):
+        (WebCore::FrameLoaderClientQt::dispatchDidFailLoading):
+
 2010-04-11  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index 5e6c518..e497dcc 100644 (file)
@@ -536,7 +536,7 @@ void FrameLoaderClientQt::finishedLoading(DocumentLoader* loader)
     if (!m_pluginView) {
         if(m_firstData) {
             FrameLoader *fl = loader->frameLoader();
-            fl->writer()->setEncoding(m_response.textEncodingName(), false);
+            fl->setEncoding(m_response.textEncodingName(), false);
             m_firstData = false; 
         }
     }
@@ -727,7 +727,7 @@ void FrameLoaderClientQt::setMainDocumentError(WebCore::DocumentLoader* loader,
 {
     if (!m_pluginView) {
         if (m_firstData) {
-            loader->frameLoader()->writer()->setEncoding(m_response.textEncodingName(), false);
+            loader->frameLoader()->setEncoding(m_response.textEncodingName(), false);
             m_firstData = false;
         }
     } else {
@@ -745,7 +745,7 @@ void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const c
             return;
         FrameLoader *fl = loader->frameLoader();
         if (m_firstData) {
-            fl->writer()->setEncoding(m_response.textEncodingName(), false);
+            fl->setEncoding(m_response.textEncodingName(), false);
             m_firstData = false;
         }
         fl->addData(data, length);
@@ -931,7 +931,7 @@ void FrameLoaderClientQt::dispatchDidFailLoading(WebCore::DocumentLoader* loader
 
     if (m_firstData) {
         FrameLoader *fl = loader->frameLoader();
-        fl->writer()->setEncoding(m_response.textEncodingName(), false);
+        fl->setEncoding(m_response.textEncodingName(), false);
         m_firstData = false;
     }
 }
index ddb1c66..38af6f6 100644 (file)
@@ -1,3 +1,15 @@
+2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r57468.
+        http://trac.webkit.org/changeset/57468
+        https://bugs.webkit.org/show_bug.cgi?id=37433
+
+        Broke the world...  Must have applied the patch wrong
+        (Requested by abarth on #webkit).
+
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::receivedData):
+
 2010-04-11  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index fc75ea4..4752040 100644 (file)
@@ -509,7 +509,7 @@ void WebFrameLoaderClient::receivedData(const char* data, int length, const Stri
     bool userChosen = !encoding.isNull();
     if (encoding.isNull())
         encoding = textEncoding;
-    coreFrame->loader()->writer()->setEncoding(encoding, userChosen);
+    coreFrame->loader()->setEncoding(encoding, userChosen);
 
     coreFrame->loader()->addData(data, length);
 }
index 82024ea..35cd577 100644 (file)
@@ -1,3 +1,15 @@
+2010-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r57468.
+        http://trac.webkit.org/changeset/57468
+        https://bugs.webkit.org/show_bug.cgi?id=37433
+
+        Broke the world...  Must have applied the patch wrong
+        (Requested by abarth on #webkit).
+
+        * WebKitSupport/FrameLoaderClientWx.cpp:
+        (WebCore::FrameLoaderClientWx::committedLoad):
+
 2010-04-11  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index 0389fbc..3d2d067 100644 (file)
@@ -604,7 +604,7 @@ void FrameLoaderClientWx::committedLoad(WebCore::DocumentLoader* loader, const c
         return;
     if (!m_pluginView) {
         FrameLoader* fl = loader->frameLoader();
-        fl->writer()->setEncoding(m_response.textEncodingName(), false);
+        fl->setEncoding(m_response.textEncodingName(), false);
         fl->addData(data, length);
     }