2006-06-02 Steve Falkenburg <sfalken@apple.com>
authorsfalken <sfalken@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Jun 2006 19:34:27 +0000 (19:34 +0000)
committersfalken <sfalken@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Jun 2006 19:34:27 +0000 (19:34 +0000)
        Reviewed by darin.

        Platform hookup fixes

        * bridge/win/FrameWin.cpp:
        (WebCore::FrameWin::urlSelected):
        (WebCore::FrameWin::setTitle):
        (WebCore::FrameWin::setStatusBarText):
        * bridge/win/FrameWin.h:
        * platform/win/TemporaryLinkStubs.cpp:
        (FrameWin::overrideMediaType):
        * platform/win/TransferJobWin.cpp:
        (WebCore::TransferJobWndProc):
        (WebCore::TransferJob::start):
        (WebCore::TransferJob::fileLoadTimer):
        (WebCore::TransferJob::cancel):

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

WebCore/ChangeLog
WebCore/bridge/win/FrameWin.cpp
WebCore/bridge/win/FrameWin.h
WebCore/platform/win/TemporaryLinkStubs.cpp
WebCore/platform/win/TransferJobWin.cpp

index 1d538f467d6384dd5739e89b19f05660071702ea..bbde7e1099f2efb0ebfa585fb544506bf87cd45b 100644 (file)
@@ -1,3 +1,22 @@
+2006-06-02  Steve Falkenburg  <sfalken@apple.com>
+
+        Reviewed by darin.
+
+        Platform hookup fixes
+
+        * bridge/win/FrameWin.cpp:
+        (WebCore::FrameWin::urlSelected):
+        (WebCore::FrameWin::setTitle):
+        (WebCore::FrameWin::setStatusBarText):
+        * bridge/win/FrameWin.h:
+        * platform/win/TemporaryLinkStubs.cpp:
+        (FrameWin::overrideMediaType):
+        * platform/win/TransferJobWin.cpp:
+        (WebCore::TransferJobWndProc):
+        (WebCore::TransferJob::start):
+        (WebCore::TransferJob::fileLoadTimer):
+        (WebCore::TransferJob::cancel):
+
 2006-06-02  RĂ©mi Zara  <remi_zara@mac.com>
 
         Reviewed by Hyatt.
index 519e678aee9572d02058095b56e63207dcd03878..d1566d2c8ed734652eb8f81f921dbc111c176716 100644 (file)
@@ -66,7 +66,7 @@ FrameWin::~FrameWin()
 void FrameWin::urlSelected(const ResourceRequest& request)
 {
     if (m_client)
-        m_client->openURL(request.url().url());
+        m_client->openURL(request.url().url(), request.lockHistory());
 }
 
 void FrameWin::submitForm(const ResourceRequest& request)
@@ -134,4 +134,21 @@ bool FrameWin::keyPress(const PlatformKeyboardEvent& keyEvent)
     return result;
 }
 
+void FrameWin::setTitle(const String &title)
+{
+    String text = title;
+    text.replace('\\', backslashAsCurrencySymbol());
+
+    m_client->setTitle(text);
+}
+
+void FrameWin::setStatusBarText(const String& status)
+{
+    String text = status;
+    text.replace('\\', backslashAsCurrencySymbol());
+
+    m_client->setStatusText(text);
+}
+
+
 }
index 590d2dc262e0b8dab86cdc54c4b564698233e1d8..8120bea96c48f0cbb24d18e3f7bdcbadf5a8c4f0 100644 (file)
@@ -33,8 +33,10 @@ namespace WebCore {
 class FrameWinClient
 {
 public:
-    virtual void openURL(const DeprecatedString&) = 0;
+    virtual void openURL(const DeprecatedString&, bool lockHistory) = 0;
     virtual void submitForm(const String& method, const KURL&, const FormData*) = 0;
+    virtual void setTitle(const String& title) = 0;
+    virtual void setStatusText(const String& statusText) = 0;
 };
 
 class FrameWin : public Frame
@@ -49,6 +51,7 @@ public:
     virtual void urlSelected(const ResourceRequest&);
 
     virtual void setTitle(const String&);
+    virtual void setStatusBarText(const String&);
 
     virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
     virtual Plugin* createPlugin(Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType);
index 31b73e88c9d4d1e87f5bd290d54e09a9fbe95f9a..9c87dbff7067789ca281c1d914f6d55f3fb1e6fa 100644 (file)
@@ -233,7 +233,6 @@ void FrameWin::restoreDocumentState() { }
 void FrameWin::partClearedInBegin() { }
 void FrameWin::createEmptyDocument() { }
 String FrameWin::overrideMediaType() const { return String(); }
-void FrameWin::setTitle(String const&) { }
 void FrameWin::handledOnloadEvents() { }
 Range* FrameWin::markedTextRange() const { return 0; }
 bool FrameWin::passSubframeEventToSubframe(WebCore::MouseEventWithHitTestResults&, Frame*) { return false; }
index a69e5c8668fe269fb1781120b39462ae204dcc8c..44437b40b2f92d7ee76ab9fc6bc638a2010157ab 100644 (file)
@@ -168,7 +168,12 @@ LRESULT CALLBACK TransferJobWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
             buffers.lpvBuffer = buffer;
             buffers.dwBufferLength = bufferSize;
 
+            bool receivedAnyData = false;
             while ((ok = InternetReadFileExA(handle, &buffers, IRF_NO_WAIT, (DWORD_PTR)job)) && buffers.dwBufferLength) {
+                if (!receivedAnyData) {
+                    receivedAnyData = true;
+                    job->client()->receivedResponse(job, 0);
+                }
                 job->client()->receivedData(job, buffer, buffers.dwBufferLength);
                 buffers.dwBufferLength = bufferSize;
             }
@@ -330,7 +335,12 @@ void TransferJob::fileLoadTimer(Timer<TransferJob>* timer)
     CloseHandle(d->m_fileHandle);
     d->m_fileHandle = 0;
 
-    d->client->receivedAllData(this, 0);
+    PlatformDataStruct platformData;
+    platformData.errorString = 0;
+    platformData.error = 0;
+    platformData.loaded = TRUE;
+
+    d->client->receivedAllData(this, &platformData);
     d->client->receivedAllData(this);
 }
 
@@ -341,7 +351,12 @@ void TransferJob::cancel()
     else
         d->m_fileLoadTimer.stop();
 
-    d->client->receivedAllData(this, 0);
+    PlatformDataStruct platformData;
+    platformData.errorString = 0;
+    platformData.error = 0;
+    platformData.loaded = FALSE;
+
+    d->client->receivedAllData(this, &platformData);
     d->client->receivedAllData(this);
 
     if (!d->m_resourceHandle)