Skip to content

Commit

Permalink
Roll out r44269
Browse files Browse the repository at this point in the history
It contained some changes I didn't mean to have landed, and squashed
some distinct patches into a single commit.

Canonical link: https://commits.webkit.org/36106@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@44270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aroben committed May 29, 2009
1 parent 8ed705d commit 0d92ab8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 65 deletions.
17 changes: 0 additions & 17 deletions WebCore/ChangeLog
@@ -1,20 +1,3 @@
2009-05-29 Adam Roben <aroben@apple.com>

Make sure PlatformMouseEvent::modifierFlags contains MK_ALT when the
Alt key is pressed

First part of fixing Bug 25729: Alt-clicking a link doesn't start a
download
<https://bugs.webkit.org/show_bug.cgi?id=25729>

Reviewed by Darin Adler.

No test possible.

* platform/win/PlatformMouseEventWin.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent): Add MK_ALT to the
modifier flags when the Alt key is pressed.

2009-05-29 Alexander Macdonald <alexmac@adobe.com>

Reviewed by Darin Adler.
Expand Down
5 changes: 0 additions & 5 deletions WebCore/platform/win/PlatformMouseEventWin.cpp
Expand Up @@ -85,11 +85,6 @@ PlatformMouseEvent::PlatformMouseEvent(HWND hWnd, UINT message, WPARAM wParam, L
, m_eventType(messageToEventType(message))
, m_modifierFlags(wParam)
{
// The modifier flags Windows gives us never contain MK_ALT, but we need it to be present (see
// <https://bugs.webkit.org/show_bug.cgi?id=25729>).
if (m_altKey)
m_modifierFlags |= MK_ALT;

m_timestamp = ::GetTickCount()*0.001; // GetTickCount returns milliseconds

switch (message) {
Expand Down
29 changes: 0 additions & 29 deletions WebKit/win/ChangeLog
@@ -1,32 +1,3 @@
2009-05-29 Adam Roben <aroben@apple.com>

Implement WebFrame::startDownload

Fixes Bug 25729: Alt-clicking a link doesn't start a download
<https://bugs.webkit.org/show_bug.cgi?id=25729>

Reviewed by Darin Adler.

* WebFrame.cpp:
(WebFrame::startDownload): Call through to WebView::downloadURL.

2009-05-29 Adam Roben <aroben@apple.com>

Move WebContextMenuClient's downloading code to WebView

This will allow other code to trigger downloads using this code, and
matches Mac.

Reviewed by Darin Adler.

* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::downloadURL): Moved code from here...
* WebView.cpp:
(WebView::downloadURL): ...to here. Also tightened up the code a
little bit and removed an unnecessary LOG_ERROR.

* WebView.h: Added downloadURL.

2009-05-29 Brent Fulgham <bfulgham@webkit.org>

Reviewed by Darin Adler.
Expand Down
15 changes: 14 additions & 1 deletion WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
Expand Up @@ -26,6 +26,7 @@
#include "config.h"
#include "WebContextMenuClient.h"

#include "WebDownload.h"
#include "WebElementPropertyBag.h"
#include "WebLocalizableStrings.h"
#include "WebView.h"
Expand Down Expand Up @@ -132,7 +133,19 @@ void WebContextMenuClient::contextMenuItemSelected(ContextMenuItem* item, const

void WebContextMenuClient::downloadURL(const KURL& url)
{
m_webView->downloadURL(url);
COMPtr<IWebDownloadDelegate> downloadDelegate;
if (FAILED(m_webView->downloadDelegate(&downloadDelegate))) {
// If the WebView doesn't successfully provide a download delegate we'll pass a null one
// into the WebDownload - which may or may not decide to use a DefaultDownloadDelegate
LOG_ERROR("Failed to get downloadDelegate from WebView");
downloadDelegate = 0;
}

// Its the delegate's job to ref the WebDownload to keep it alive - otherwise it will be destroyed
// when this method returns
COMPtr<WebDownload> download;
download.adoptRef(WebDownload::createInstance(url, downloadDelegate.get()));
download->start();
}

void WebContextMenuClient::searchWithGoogle(const Frame* frame)
Expand Down
4 changes: 2 additions & 2 deletions WebKit/win/WebFrame.cpp
Expand Up @@ -1605,9 +1605,9 @@ void WebFrame::dispatchDidFailLoad(const ResourceError& error)
}
}

void WebFrame::startDownload(const ResourceRequest& request)
void WebFrame::startDownload(const ResourceRequest&)
{
d->webView->downloadURL(request.url());
notImplemented();
}

Widget* WebFrame::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const KURL& /*baseURL*/, const Vector<String>& paramNames, const Vector<String>& paramValues)
Expand Down
9 changes: 0 additions & 9 deletions WebKit/win/WebView.cpp
Expand Up @@ -32,7 +32,6 @@
#include "MarshallingHelpers.h"
#include "WebDatabaseManager.h"
#include "WebDocumentLoader.h"
#include "WebDownload.h"
#include "WebEditorClient.h"
#include "WebElementPropertyBag.h"
#include "WebFrame.h"
Expand Down Expand Up @@ -5191,14 +5190,6 @@ HRESULT WebView::setJavaScriptURLsAreAllowed(BOOL areAllowed)
return S_OK;
}

void WebView::downloadURL(const KURL& url)
{
// Its the delegate's job to ref the WebDownload to keep it alive - otherwise it will be destroyed
// when this function returns.
COMPtr<WebDownload> download(AdoptCOM, WebDownload::createInstance(url, m_downloadDelegate.get()));
download->start();
}

class EnumTextMatches : public IEnumTextMatches
{
long m_ref;
Expand Down
2 changes: 0 additions & 2 deletions WebKit/win/WebView.h
Expand Up @@ -817,8 +817,6 @@ class WebView
bool onGetObject(WPARAM, LPARAM, LRESULT&) const;
static STDMETHODIMP AccessibleObjectFromWindow(HWND, DWORD objectID, REFIID, void** ppObject);

void downloadURL(const WebCore::KURL&);

private:
void setZoomMultiplier(float multiplier, bool isTextOnly);
float zoomMultiplier(bool isTextOnly);
Expand Down

0 comments on commit 0d92ab8

Please sign in to comment.