Title: [116121] trunk/Source
Revision
116121
Author
jap...@chromium.org
Date
2012-05-04 10:31:03 -0700 (Fri, 04 May 2012)

Log Message

Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
https://bugs.webkit.org/show_bug.cgi?id=85533

Reviewed by Alexey Proskuryakov.

Source/WebKit/blackberry:

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::finishedLoading):

Source/WebKit/chromium:

* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::FrameLoaderClientImpl):
(WebKit):
(WebKit::FrameLoaderClientImpl::finishedLoading):
* src/FrameLoaderClientImpl.h:
(WebKit::FrameLoaderClientImpl::makeRepresentation):
(WebKit::FrameLoaderClientImpl::revertToProvisionalState):
(FrameLoaderClientImpl):

Source/WebKit/efl:

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::FrameLoaderClientEfl):
(WebCore):
(WebCore::FrameLoaderClientEfl::finishedLoading):
* WebCoreSupport/FrameLoaderClientEfl.h:
(WebCore::FrameLoaderClientEfl::makeRepresentation):
(WebCore::FrameLoaderClientEfl::revertToProvisionalState):
(FrameLoaderClientEfl):

Source/WebKit/gtk:

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::FrameLoaderClient):
(WebKit):
(WebKit::FrameLoaderClient::finishedLoading):
* WebCoreSupport/FrameLoaderClientGtk.h:
(WebKit::FrameLoaderClient::makeRepresentation):
(WebKit::FrameLoaderClient::revertToProvisionalState):
(FrameLoaderClient):

Source/WebKit/mac:

* WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Calling commitData when finishing is no longer necessary,
    as WebCore will take care of simulating the receipt of data and ensuring the requisite work gets done in the blank document case.

Source/WebKit/qt:

* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::FrameLoaderClientQt):
(WebCore):
(WebCore::FrameLoaderClientQt::finishedLoading):
* WebCoreSupport/FrameLoaderClientQt.h:
(WebCore::FrameLoaderClientQt::makeRepresentation):
(WebCore::FrameLoaderClientQt::revertToProvisionalState):
(FrameLoaderClientQt):

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::finishedLoading):

Source/WebKit/wince:

* WebCoreSupport/FrameLoaderClientWinCE.cpp:
(WebKit::FrameLoaderClientWinCE::finishedLoading):

Source/WebKit/wx:

* WebKitSupport/FrameLoaderClientWx.cpp:
(WebCore::FrameLoaderClientWx::finishedLoading):
(WebCore::FrameLoaderClientWx::setMainDocumentError):
(WebCore::FrameLoaderClientWx::dispatchDidReceiveResponse):
(WebCore::FrameLoaderClientWx::dispatchDidFailLoading):
* WebKitSupport/FrameLoaderClientWx.h:
(FrameLoaderClientWx):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::finishedLoading):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (116120 => 116121)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-05-04 17:31:03 UTC (rev 116121)
@@ -1,3 +1,13 @@
+2012-05-04  Nate Chapin  <jap...@chromium.org>
+
+        Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+        https://bugs.webkit.org/show_bug.cgi?id=85533
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+        (WebCore::FrameLoaderClientBlackBerry::finishedLoading):
+
 2012-05-04  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed, rolling out r116085, r116091, and r116095.

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp (116120 => 116121)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp	2012-05-04 17:31:03 UTC (rev 116121)
@@ -363,17 +363,12 @@
     m_frame->loader()->documentLoader()->writer()->addData(data, length);
 }
 
-void FrameLoaderClientBlackBerry::finishedLoading(DocumentLoader* loader)
+void FrameLoaderClientBlackBerry::finishedLoading(DocumentLoader*)
 {
     if (m_pluginView) {
         m_pluginView->didFinishLoading();
         m_pluginView = 0;
         m_hasSentResponseToPlugin = false;
-    } else {
-        // Telling the frame we received some data and passing 0 as the data 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).
-        committedLoad(loader, 0, 0);
     }
 }
 

Modified: trunk/Source/WebKit/chromium/ChangeLog (116120 => 116121)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-04 17:31:03 UTC (rev 116121)
@@ -1,3 +1,19 @@
+2012-05-04  Nate Chapin  <jap...@chromium.org>
+
+        Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+        https://bugs.webkit.org/show_bug.cgi?id=85533
+
+        Reviewed by Alexey Proskuryakov.
+
+        * src/FrameLoaderClientImpl.cpp:
+        (WebKit::FrameLoaderClientImpl::FrameLoaderClientImpl):
+        (WebKit):
+        (WebKit::FrameLoaderClientImpl::finishedLoading):
+        * src/FrameLoaderClientImpl.h:
+        (WebKit::FrameLoaderClientImpl::makeRepresentation):
+        (WebKit::FrameLoaderClientImpl::revertToProvisionalState):
+        (FrameLoaderClientImpl):
+
 2012-05-04  Alexander Pavlov  <apav...@chromium.org>
 
         Web Inspector: [Device Metrics] With "Fit window" option on, page contents are downscaled incorrectly

Modified: trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp (116120 => 116121)


--- trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp	2012-05-04 17:31:03 UTC (rev 116121)
@@ -110,7 +110,6 @@
 
 FrameLoaderClientImpl::FrameLoaderClientImpl(WebFrameImpl* frame)
     : m_webFrame(frame)
-    , m_hasRepresentation(false)
     , m_sentInitialResponseToPlugin(false)
     , m_nextNavigationPolicy(WebNavigationPolicyIgnore)
 {
@@ -272,11 +271,6 @@
     m_webFrame->createFrameView();
 }
 
-void FrameLoaderClientImpl::makeRepresentation(DocumentLoader*)
-{
-    m_hasRepresentation = true;
-}
-
 void FrameLoaderClientImpl::forceLayout()
 {
     // FIXME
@@ -1049,11 +1043,6 @@
     (m_webFrame->frame()->loader()->policyChecker()->*function)(PolicyUse);
 }
 
-void FrameLoaderClientImpl::revertToProvisionalState(DocumentLoader*)
-{
-    m_hasRepresentation = true;
-}
-
 void FrameLoaderClientImpl::setMainDocumentError(DocumentLoader*,
                                                  const ResourceError& error)
 {
@@ -1150,18 +1139,12 @@
     }
 }
 
-void FrameLoaderClientImpl::finishedLoading(DocumentLoader* dl)
+void FrameLoaderClientImpl::finishedLoading(DocumentLoader*)
 {
     if (m_pluginWidget) {
         m_pluginWidget->didFinishLoading();
         m_pluginWidget = 0;
         m_sentInitialResponseToPlugin = false;
-    } else {
-        // This is necessary to create an empty document. See bug 634004.
-        // However, we only want to do this if makeRepresentation has been called, to
-        // match the behavior on the Mac.
-        if (m_hasRepresentation)
-            dl->writer()->setEncoding("", false);
     }
 }
 

Modified: trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.h (116120 => 116121)


--- trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.h	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.h	2012-05-04 17:31:03 UTC (rev 116121)
@@ -72,7 +72,7 @@
 
     virtual bool hasWebView() const;
     virtual bool hasFrameView() const;
-    virtual void makeRepresentation(WebCore::DocumentLoader*);
+    virtual void makeRepresentation(WebCore::DocumentLoader*) { }
     virtual void forceLayout();
     virtual void forceLayoutForNonHTML();
     virtual void setCopiesOnScroll();
@@ -118,7 +118,7 @@
     virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
     virtual void dispatchWillSendSubmitEvent(PassRefPtr<WebCore::FormState>);
     virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>);
-    virtual void revertToProvisionalState(WebCore::DocumentLoader*);
+    virtual void revertToProvisionalState(WebCore::DocumentLoader*) { }
     virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
     virtual void willChangeEstimatedProgress() { }
     virtual void didChangeEstimatedProgress() { }
@@ -225,11 +225,6 @@
     // the web frame object is guaranteed to exist.
     WebFrameImpl* m_webFrame;
 
-    // True if makeRepresentation was called.  We don't actually have a concept
-    // of a "representation", but we need to know when we're expected to have one.
-    // See finishedLoading().
-    bool m_hasRepresentation;
-
     // Used to help track client redirects. When a provisional load starts, it
     // has no redirects in its chain. But in the case of client redirects, we want
     // to add that initial load as a redirect. When we get a new provisional load

Modified: trunk/Source/WebKit/efl/ChangeLog (116120 => 116121)


--- trunk/Source/WebKit/efl/ChangeLog	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-05-04 17:31:03 UTC (rev 116121)
@@ -1,3 +1,19 @@
+2012-05-04  Nate Chapin  <jap...@chromium.org>
+
+        Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+        https://bugs.webkit.org/show_bug.cgi?id=85533
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebCoreSupport/FrameLoaderClientEfl.cpp:
+        (WebCore::FrameLoaderClientEfl::FrameLoaderClientEfl):
+        (WebCore):
+        (WebCore::FrameLoaderClientEfl::finishedLoading):
+        * WebCoreSupport/FrameLoaderClientEfl.h:
+        (WebCore::FrameLoaderClientEfl::makeRepresentation):
+        (WebCore::FrameLoaderClientEfl::revertToProvisionalState):
+        (FrameLoaderClientEfl):
+
 2012-05-04  Christophe Dumez  <christophe.du...@intel.com>
 
         [EFL] Frame load callbacks output is missing for redirections

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (116120 => 116121)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-05-04 17:31:03 UTC (rev 116121)
@@ -70,7 +70,6 @@
     , m_customUserAgent("")
     , m_pluginView(0)
     , m_hasSentResponseToPlugin(false)
-    , m_hasRepresentation(false)
 {
 }
 
@@ -531,11 +530,6 @@
     ewk_frame_xss_detected(m_frame, &xssInfo);
 }
 
-void FrameLoaderClientEfl::makeRepresentation(DocumentLoader*)
-{
-    m_hasRepresentation = true;
-}
-
 void FrameLoaderClientEfl::forceLayout()
 {
     ewk_frame_force_layout(m_frame);
@@ -664,11 +658,6 @@
     notImplemented();
 }
 
-void FrameLoaderClientEfl::revertToProvisionalState(DocumentLoader*)
-{
-    m_hasRepresentation = true;
-}
-
 void FrameLoaderClientEfl::willChangeTitle(DocumentLoader*)
 {
     // no need for, dispatchDidReceiveTitle is the right callback
@@ -717,13 +706,10 @@
     return String();
 }
 
-void FrameLoaderClientEfl::finishedLoading(DocumentLoader* documentLoader)
+void FrameLoaderClientEfl::finishedLoading(DocumentLoader*)
 {
-    if (!m_pluginView) {
-        if (m_hasRepresentation)
-            documentLoader->writer()->setEncoding("", false);
+    if (!m_pluginView)
         return;
-    }
     m_pluginView->didFinishLoading();
     m_pluginView = 0;
     m_hasSentResponseToPlugin = false;

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h (116120 => 116121)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h	2012-05-04 17:31:03 UTC (rev 116121)
@@ -61,7 +61,7 @@
 
     void callPolicyFunction(FramePolicyFunction, PolicyAction);
 
-    virtual void makeRepresentation(DocumentLoader*);
+    virtual void makeRepresentation(DocumentLoader*) { }
     virtual void forceLayout();
     virtual void forceLayoutForNonHTML();
 
@@ -122,7 +122,7 @@
     virtual void dispatchWillSendSubmitEvent(WTF::PassRefPtr<FormState>) { }
     virtual void dispatchWillSubmitForm(FramePolicyFunction, WTF::PassRefPtr<FormState>);
 
-    virtual void revertToProvisionalState(DocumentLoader*);
+    virtual void revertToProvisionalState(DocumentLoader*) { }
     virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
 
     virtual void postProgressStartedNotification();
@@ -217,7 +217,6 @@
     // Plugin view to redirect data to
     PluginView* m_pluginView;
     bool m_hasSentResponseToPlugin;
-    bool m_hasRepresentation;
 };
 
 }

Modified: trunk/Source/WebKit/gtk/ChangeLog (116120 => 116121)


--- trunk/Source/WebKit/gtk/ChangeLog	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/gtk/ChangeLog	2012-05-04 17:31:03 UTC (rev 116121)
@@ -1,3 +1,19 @@
+2012-05-04  Nate Chapin  <jap...@chromium.org>
+
+        Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+        https://bugs.webkit.org/show_bug.cgi?id=85533
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebCoreSupport/FrameLoaderClientGtk.cpp:
+        (WebKit::FrameLoaderClient::FrameLoaderClient):
+        (WebKit):
+        (WebKit::FrameLoaderClient::finishedLoading):
+        * WebCoreSupport/FrameLoaderClientGtk.h:
+        (WebKit::FrameLoaderClient::makeRepresentation):
+        (WebKit::FrameLoaderClient::revertToProvisionalState):
+        (FrameLoaderClient):
+
 2012-05-03  Martin Robinson  <mrobin...@igalia.com>
 
         [GTK] Rework IME handling to fix bugs and prepare for WebKit2

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp (116120 => 116121)


--- trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp	2012-05-04 17:31:03 UTC (rev 116121)
@@ -106,7 +106,6 @@
     , m_loadingErrorPage(false)
     , m_pluginView(0)
     , m_hasSentResponseToPlugin(false)
-    , m_hasRepresentation(false)
 {
     ASSERT(m_frame);
 }
@@ -665,11 +664,6 @@
     notImplemented();
 }
 
-void FrameLoaderClient::makeRepresentation(WebCore::DocumentLoader*)
-{
-    m_hasRepresentation = true;
-}
-
 void FrameLoaderClient::forceLayout()
 {
     FrameView* view = core(m_frame)->view();
@@ -883,11 +877,6 @@
         webkit_web_policy_decision_cancel(m_policyDecision);
 }
 
-void FrameLoaderClient::revertToProvisionalState(WebCore::DocumentLoader*)
-{
-    m_hasRepresentation = true;
-}
-
 void FrameLoaderClient::willChangeTitle(WebCore::DocumentLoader*)
 {
     notImplemented();
@@ -930,14 +919,9 @@
     return String();
 }
 
-void FrameLoaderClient::finishedLoading(WebCore::DocumentLoader* documentLoader)
+void FrameLoaderClient::finishedLoading(WebCore::DocumentLoader*)
 {
-    if (!m_pluginView) {
-        // This is necessary to create an empty document,
-        // but it has to be skipped in the provisional phase.
-        if (m_hasRepresentation)
-            documentLoader->writer()->setEncoding("", false);
-    } else {
+    if (m_pluginView) {
         m_pluginView->didFinishLoading();
         m_pluginView = 0;
         m_hasSentResponseToPlugin = false;

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h (116120 => 116121)


--- trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h	2012-05-04 17:31:03 UTC (rev 116121)
@@ -49,7 +49,7 @@
 
         virtual bool hasWebView() const;
 
-        virtual void makeRepresentation(WebCore::DocumentLoader*);
+        virtual void makeRepresentation(WebCore::DocumentLoader*) { }
         virtual void forceLayout();
         virtual void forceLayoutForNonHTML();
 
@@ -105,7 +105,7 @@
         virtual void dispatchWillSendSubmitEvent(WTF::PassRefPtr<WebCore::FormState>) { }
         virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, WTF::PassRefPtr<WebCore::FormState>);
 
-        virtual void revertToProvisionalState(WebCore::DocumentLoader*);
+        virtual void revertToProvisionalState(WebCore::DocumentLoader*) { }
         virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
 
         virtual void postProgressStartedNotification();
@@ -198,8 +198,6 @@
         // Plugin view to redirect data to
         WebCore::PluginView* m_pluginView;
         bool m_hasSentResponseToPlugin;
-
-        bool m_hasRepresentation;
     };
 
 }

Modified: trunk/Source/WebKit/mac/ChangeLog (116120 => 116121)


--- trunk/Source/WebKit/mac/ChangeLog	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-05-04 17:31:03 UTC (rev 116121)
@@ -1,3 +1,14 @@
+2012-05-04  Nate Chapin  <jap...@chromium.org>
+
+        Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+        https://bugs.webkit.org/show_bug.cgi?id=85533
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebView/WebHTMLRepresentation.mm:
+        (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Calling commitData when finishing is no longer necessary,
+            as WebCore will take care of simulating the receipt of data and ensuring the requisite work gets done in the blank document case.
+
 2012-05-03  Anders Carlsson  <ander...@apple.com>
 
         useWebKitWebInspector should be more robust against missing files

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm (116120 => 116121)


--- trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm	2012-05-04 17:31:03 UTC (rev 116121)
@@ -214,14 +214,6 @@
 
     if (!webFrame)
         return;
-
-    if (![self _isDisplayingWebArchive]) {
-        // Telling the frame we received some data and passing nil as the data 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).
-        [webFrame _commitData:nil];
-    }
-
     WebView *webView = [webFrame webView];
     if ([webView mainFrame] == webFrame && [webView isEditable])
         core(webFrame)->editor()->applyEditingStyleToBodyElement();

Modified: trunk/Source/WebKit/qt/ChangeLog (116120 => 116121)


--- trunk/Source/WebKit/qt/ChangeLog	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-05-04 17:31:03 UTC (rev 116121)
@@ -1,3 +1,19 @@
+2012-05-04  Nate Chapin  <jap...@chromium.org>
+
+        Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+        https://bugs.webkit.org/show_bug.cgi?id=85533
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::FrameLoaderClientQt):
+        (WebCore):
+        (WebCore::FrameLoaderClientQt::finishedLoading):
+        * WebCoreSupport/FrameLoaderClientQt.h:
+        (WebCore::FrameLoaderClientQt::makeRepresentation):
+        (WebCore::FrameLoaderClientQt::revertToProvisionalState):
+        (FrameLoaderClientQt):
+
 2012-05-03  Fady Samuel  <fsam...@chromium.org>
 
         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport

Modified: trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (116120 => 116121)


--- trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp	2012-05-04 17:31:03 UTC (rev 116121)
@@ -212,7 +212,6 @@
     , m_webFrame(0)
     , m_pluginView(0)
     , m_hasSentResponseToPlugin(false)
-    , m_hasRepresentation(false)
     , m_isOriginatingLoad(false)
 {
 }
@@ -312,12 +311,7 @@
 {
 }
 
-void FrameLoaderClientQt::makeRepresentation(DocumentLoader*)
-{
-    m_hasRepresentation = true;
-}
 
-
 void FrameLoaderClientQt::forceLayout()
 {
     FrameView* view = m_frame->view();
@@ -567,12 +561,6 @@
 }
 
 
-void FrameLoaderClientQt::revertToProvisionalState(DocumentLoader*)
-{
-    m_hasRepresentation = true;
-}
-
-
 void FrameLoaderClientQt::postProgressStartedNotification()
 {
     if (m_webFrame && m_frame->page())
@@ -626,16 +614,10 @@
 }
 
 
-void FrameLoaderClientQt::finishedLoading(DocumentLoader* loader)
+void FrameLoaderClientQt::finishedLoading(DocumentLoader*)
 {
-    if (!m_pluginView) {
-        // This is necessary to create an empty document. See bug 634004.
-        // However, we only want to do this if makeRepresentation has been called,
-        // to match the behavior on the Mac.
-        if (m_hasRepresentation)
-            loader->writer()->setEncoding("", false);
+    if (!m_pluginView)
         return;
-    }
     if (m_pluginView->isPluginView())
         m_pluginView->didFinishLoading();
     m_pluginView = 0;

Modified: trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h (116120 => 116121)


--- trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h	2012-05-04 17:31:03 UTC (rev 116121)
@@ -83,7 +83,7 @@
 
     virtual bool hasWebView() const; // mainly for assertions
 
-    virtual void makeRepresentation(DocumentLoader*);
+    virtual void makeRepresentation(DocumentLoader*) { }
     virtual void forceLayout();
     virtual void forceLayoutForNonHTML();
 
@@ -138,7 +138,7 @@
     virtual void dispatchWillSendSubmitEvent(PassRefPtr<FormState>) { }
     virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
 
-    virtual void revertToProvisionalState(DocumentLoader*);
+    virtual void revertToProvisionalState(DocumentLoader*) { }
     virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
 
     virtual void postProgressStartedNotification();
@@ -272,11 +272,6 @@
     WebCore::PluginView* m_pluginView;
     bool m_hasSentResponseToPlugin;
 
-    // True if makeRepresentation was called.  We don't actually have a concept
-    // of a "representation", but we need to know when we're expected to have one.
-    // See finishedLoading().
-    bool m_hasRepresentation;
-
     KURL m_lastRequestedUrl;
     bool m_isOriginatingLoad;
 };

Modified: trunk/Source/WebKit/win/ChangeLog (116120 => 116121)


--- trunk/Source/WebKit/win/ChangeLog	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/win/ChangeLog	2012-05-04 17:31:03 UTC (rev 116121)
@@ -1,3 +1,13 @@
+2012-05-04  Nate Chapin  <jap...@chromium.org>
+
+        Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+        https://bugs.webkit.org/show_bug.cgi?id=85533
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::finishedLoading):
+
 2012-04-27  Jon Lee  <jon...@apple.com>
 
         Migrate permission functions to Notification from NotificationCenter

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (116120 => 116121)


--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2012-05-04 17:31:03 UTC (rev 116121)
@@ -517,13 +517,8 @@
     m_manualLoader->didReceiveData(data, length);
 }
 
-void WebFrameLoaderClient::finishedLoading(DocumentLoader* loader)
+void WebFrameLoaderClient::finishedLoading(DocumentLoader*)
 {
-    // Telling the frame we received some data and passing 0 as the data 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)
-    committedLoad(loader, 0, 0);
-
     if (!m_manualLoader)
         return;
 

Modified: trunk/Source/WebKit/wince/ChangeLog (116120 => 116121)


--- trunk/Source/WebKit/wince/ChangeLog	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/wince/ChangeLog	2012-05-04 17:31:03 UTC (rev 116121)
@@ -1,3 +1,13 @@
+2012-05-04  Nate Chapin  <jap...@chromium.org>
+
+        Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+        https://bugs.webkit.org/show_bug.cgi?id=85533
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebCoreSupport/FrameLoaderClientWinCE.cpp:
+        (WebKit::FrameLoaderClientWinCE::finishedLoading):
+
 2012-04-18  Jon Honeycutt  <jhoneyc...@apple.com>
 
         FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more

Modified: trunk/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp (116120 => 116121)


--- trunk/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp	2012-05-04 17:31:03 UTC (rev 116121)
@@ -443,12 +443,10 @@
     return String();
 }
 
-void FrameLoaderClientWinCE::finishedLoading(DocumentLoader* documentLoader)
+void FrameLoaderClientWinCE::finishedLoading(DocumentLoader*)
 {
-    if (!m_pluginView) {
-        documentLoader->writer()->setEncoding(m_response.textEncodingName(), false);
+    if (!m_pluginView)
         return;
-    }
 
     m_pluginView->didFinishLoading();
     m_pluginView = 0;

Modified: trunk/Source/WebKit/wx/ChangeLog (116120 => 116121)


--- trunk/Source/WebKit/wx/ChangeLog	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/wx/ChangeLog	2012-05-04 17:31:03 UTC (rev 116121)
@@ -1,3 +1,18 @@
+2012-05-04  Nate Chapin  <jap...@chromium.org>
+
+        Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+        https://bugs.webkit.org/show_bug.cgi?id=85533
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebKitSupport/FrameLoaderClientWx.cpp:
+        (WebCore::FrameLoaderClientWx::finishedLoading):
+        (WebCore::FrameLoaderClientWx::setMainDocumentError):
+        (WebCore::FrameLoaderClientWx::dispatchDidReceiveResponse):
+        (WebCore::FrameLoaderClientWx::dispatchDidFailLoading):
+        * WebKitSupport/FrameLoaderClientWx.h:
+        (FrameLoaderClientWx):
+
 2012-04-18  Jon Honeycutt  <jhoneyc...@apple.com>
 
         FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more

Modified: trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp (116120 => 116121)


--- trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp	2012-05-04 17:31:03 UTC (rev 116121)
@@ -444,14 +444,9 @@
 }
 
 
-void FrameLoaderClientWx::finishedLoading(DocumentLoader* loader)
+void FrameLoaderClientWx::finishedLoading(DocumentLoader*)
 {
-    if (!m_pluginView) {
-        if (m_firstData) {
-            loader->writer()->setEncoding(m_response.textEncodingName(), false);
-            m_firstData = false;
-        }
-    } else {
+    if (m_pluginView) {
         m_pluginView->didFinishLoading();
         m_pluginView = 0;
         m_hasSentResponseToPlugin = false;
@@ -651,10 +646,7 @@
 
 void FrameLoaderClientWx::setMainDocumentError(WebCore::DocumentLoader* loader, const WebCore::ResourceError&)
 {
-    if (m_firstData) {
-        loader->writer()->setEncoding(m_response.textEncodingName(), false);
-        m_firstData = false;
-    }
+    notImplemented();
 }
 
 // FIXME: This function should be moved into WebCore.
@@ -761,7 +753,6 @@
 {
     notImplemented();
     m_response = response;
-    m_firstData = true;
 }
 
 void FrameLoaderClientWx::dispatchDidReceiveContentLength(DocumentLoader* loader, unsigned long id, int length)
@@ -776,10 +767,6 @@
 
 void FrameLoaderClientWx::dispatchDidFailLoading(DocumentLoader* loader, unsigned long, const ResourceError&)
 {
-    if (m_firstData) {
-        loader->writer()->setEncoding(m_response.textEncodingName(), false);
-        m_firstData = false;
-    }
     if (m_webView) {
         WebKit::WebViewLoadEvent wkEvent(m_webView);
         wkEvent.SetState(WEBVIEW_LOAD_FAILED);

Modified: trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h (116120 => 116121)


--- trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h	2012-05-04 17:31:03 UTC (rev 116121)
@@ -241,7 +241,6 @@
         PluginView* m_pluginView;
         bool m_hasSentResponseToPlugin;
         ResourceResponse m_response;
-        bool m_firstData;
     };
 
 }

Modified: trunk/Source/WebKit2/ChangeLog (116120 => 116121)


--- trunk/Source/WebKit2/ChangeLog	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-04 17:31:03 UTC (rev 116121)
@@ -1,3 +1,13 @@
+2012-05-04  Nate Chapin  <jap...@chromium.org>
+
+        Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+        https://bugs.webkit.org/show_bug.cgi?id=85533
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::finishedLoading):
+
 2012-05-04  Kent Hansen <kent.han...@nokia.com>
 
         [Qt] Update Qt bridge after changes to QMetaMethod

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (116120 => 116121)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2012-05-04 17:23:58 UTC (rev 116120)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2012-05-04 17:31:03 UTC (rev 116121)
@@ -879,8 +879,6 @@
 void WebFrameLoaderClient::finishedLoading(DocumentLoader* loader)
 {
     if (!m_pluginView) {
-        committedLoad(loader, 0, 0);
-
         if (m_frameHasCustomRepresentation) {
             WebPage* webPage = m_frame->page();
             if (!webPage)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to