Commit 4eea401f authored by sfalken's avatar sfalken

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):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fa2897ed
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.
......
......@@ -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);
}
}
......@@ -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);
......
......@@ -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; }
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment