[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
weinig at apple.com
weinig at apple.com
Wed Dec 22 14:52:26 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 140e06f016a9d5019520895445e4f51dda98ad94
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 22 20:59:02 2010 +0000
WebKit2 needs to pass the current event modifier flags when requesting a new window
https://bugs.webkit.org/show_bug.cgi?id=48140
Reviewed by Anders Carlsson.
WebCore:
Store the NavigationAction used for the newWindowPolicyDecision in the PolicyCallback
so that it can be used after the decision has been made in further callbacks.
* WebCore.exp.in: Fix export name for new function signature.
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::createWindow):
(WebCore::EmptyFrameLoaderClient::dispatchCreatePage):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::callContinueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::createWindow):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
* loader/PolicyCallback.cpp:
(WebCore::PolicyCallback::set):
(WebCore::PolicyCallback::call):
(WebCore::PolicyCallback::cancel):
* loader/PolicyCallback.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNewWindowPolicy):
* page/Chrome.cpp:
(WebCore::Chrome::createWindow):
* page/Chrome.h:
* page/ChromeClient.h:
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
WebKit/chromium:
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::createWindow):
* src/ChromeClientImpl.h:
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::dispatchCreatePage):
* src/FrameLoaderClientImpl.h:
Add NavigationAction parameter.
WebKit/efl:
* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::createWindow):
* WebCoreSupport/ChromeClientEfl.h:
* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::dispatchCreatePage):
* WebCoreSupport/FrameLoaderClientEfl.h:
Add NavigationAction parameter.
WebKit/gtk:
* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::createWindow):
* WebCoreSupport/ChromeClientGtk.h:
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchCreatePage):
* WebCoreSupport/FrameLoaderClientGtk.h:
Add NavigationAction parameter.
WebKit/haiku:
* WebCoreSupport/ChromeClientHaiku.cpp:
(WebCore::ChromeClientHaiku::createWindow):
* WebCoreSupport/ChromeClientHaiku.h:
* WebCoreSupport/FrameLoaderClientHaiku.cpp:
(WebCore::FrameLoaderClientHaiku::dispatchCreatePage):
* WebCoreSupport/FrameLoaderClientHaiku.h:
Add NavigationAction parameter.
WebKit/mac:
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::createWindow):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchCreatePage):
Add NavigationAction parameter.
WebKit/qt:
* Api/qwebpage.cpp:
(openNewWindow):
* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::createWindow):
* WebCoreSupport/ChromeClientQt.h:
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::dispatchCreatePage):
* WebCoreSupport/FrameLoaderClientQt.h:
Add NavigationAction parameter.
WebKit/win:
* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::createWindow):
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchCreatePage):
* WebCoreSupport/WebFrameLoaderClient.h:
Add NavigationAction parameter.
WebKit/wince:
* WebCoreSupport/ChromeClientWinCE.cpp:
(WebKit::ChromeClientWinCE::createWindow):
* WebCoreSupport/ChromeClientWinCE.h:
* WebCoreSupport/FrameLoaderClientWinCE.cpp:
(WebKit::FrameLoaderClientWinCE::dispatchCreatePage):
* WebCoreSupport/FrameLoaderClientWinCE.h:
Add NavigationAction parameter.
WebKit/wx:
* WebKitSupport/ChromeClientWx.cpp:
(WebCore::ChromeClientWx::createWindow):
* WebKitSupport/ChromeClientWx.h:
* WebKitSupport/FrameLoaderClientWx.cpp:
(WebCore::FrameLoaderClientWx::dispatchCreatePage):
* WebKitSupport/FrameLoaderClientWx.h:
Add NavigationAction parameter.
WebKit2:
In addition to passing modifier flags from the now passed NavigationAction, also pass
the WindowFeatures to the UIProcess.
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
* Shared/WebCoreArgumentCoders.h:
* Shared/WebEvent.h:
(WebKit::WebEvent::modifiers):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::createNewPage):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::createNewPage):
* UIProcess/WebUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchCreatePage):
(WebKit::modifiersForNavigationAction):
(WebKit::mouseButtonForNavigationAction):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
WebKitTools:
* MiniBrowser/mac/BrowserWindowController.m:
(createNewPage):
* WebKitTestRunner/TestController.cpp:
(WTR::createOtherPage):
Update for new signature for the WKPageCreateNewPageCallback.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 66de413..819fa39 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,37 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ Store the NavigationAction used for the newWindowPolicyDecision in the PolicyCallback
+ so that it can be used after the decision has been made in further callbacks.
+
+ * WebCore.exp.in: Fix export name for new function signature.
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::createWindow):
+ (WebCore::EmptyFrameLoaderClient::dispatchCreatePage):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::callContinueLoadAfterNewWindowPolicy):
+ (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
+ (WebCore::createWindow):
+ * loader/FrameLoader.h:
+ * loader/FrameLoaderClient.h:
+ * loader/PolicyCallback.cpp:
+ (WebCore::PolicyCallback::set):
+ (WebCore::PolicyCallback::call):
+ (WebCore::PolicyCallback::cancel):
+ * loader/PolicyCallback.h:
+ * loader/PolicyChecker.cpp:
+ (WebCore::PolicyChecker::checkNewWindowPolicy):
+ * page/Chrome.cpp:
+ (WebCore::Chrome::createWindow):
+ * page/Chrome.h:
+ * page/ChromeClient.h:
+ * page/ContextMenuController.cpp:
+ (WebCore::openNewWindow):
+
2010-10-22 David Hyatt <hyatt at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 19b6e86..a58699f 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -1050,7 +1050,7 @@ __ZNK7WebCore5Range14startContainerERi
__ZNK7WebCore5Range19boundaryPointsValidEv
__ZNK7WebCore5Range9endOffsetERi
__ZNK7WebCore5Range9firstNodeEv
-__ZNK7WebCore6Chrome12createWindowEPNS_5FrameERKNS_16FrameLoadRequestERKNS_14WindowFeaturesE
+__ZNK7WebCore6Chrome12createWindowEPNS_5FrameERKNS_16FrameLoadRequestERKNS_14WindowFeaturesERKNS_16NavigationActionE
__ZNK7WebCore6Cursor14platformCursorEv
__ZNK7WebCore6Editor12selectedTextEv
__ZNK7WebCore6Editor13canEditRichlyEv
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index fd20258..f37cbf3 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -103,7 +103,7 @@ public:
virtual void focusedNodeChanged(Node*) { }
- virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&) { return 0; }
+ virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) { return 0; }
virtual void show() { }
virtual bool canRunModal() { return false; }
@@ -259,7 +259,7 @@ public:
virtual void dispatchDidFirstLayout() { }
virtual void dispatchDidFirstVisuallyNonEmptyLayout() { }
- virtual Frame* dispatchCreatePage() { return 0; }
+ virtual Frame* dispatchCreatePage(const NavigationAction&) { return 0; }
virtual void dispatchShow() { }
virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction, const String&, const ResourceRequest&) { }
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index a3c5eeb..377e5f0 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -2964,20 +2964,20 @@ void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, Pass
}
void FrameLoader::callContinueLoadAfterNewWindowPolicy(void* argument,
- const ResourceRequest& request, PassRefPtr<FormState> formState, const String& frameName, bool shouldContinue)
+ const ResourceRequest& request, PassRefPtr<FormState> formState, const String& frameName, const NavigationAction& action, bool shouldContinue)
{
FrameLoader* loader = static_cast<FrameLoader*>(argument);
- loader->continueLoadAfterNewWindowPolicy(request, formState, frameName, shouldContinue);
+ loader->continueLoadAfterNewWindowPolicy(request, formState, frameName, action, shouldContinue);
}
void FrameLoader::continueLoadAfterNewWindowPolicy(const ResourceRequest& request,
- PassRefPtr<FormState> formState, const String& frameName, bool shouldContinue)
+ PassRefPtr<FormState> formState, const String& frameName, const NavigationAction& action, bool shouldContinue)
{
if (!shouldContinue)
return;
RefPtr<Frame> frame = m_frame;
- RefPtr<Frame> mainFrame = m_client->dispatchCreatePage();
+ RefPtr<Frame> mainFrame = m_client->dispatchCreatePage(action);
if (!mainFrame)
return;
@@ -3476,7 +3476,8 @@ Frame* createWindow(Frame* openerFrame, Frame* lookupFrame, const FrameLoadReque
if (!oldPage)
return 0;
- Page* page = oldPage->chrome()->createWindow(openerFrame, requestWithReferrer, features);
+ NavigationAction action;
+ Page* page = oldPage->chrome()->createWindow(openerFrame, requestWithReferrer, features, action);
if (!page)
return 0;
diff --git a/WebCore/loader/FrameLoader.h b/WebCore/loader/FrameLoader.h
index 70faa47..9e11fd0 100644
--- a/WebCore/loader/FrameLoader.h
+++ b/WebCore/loader/FrameLoader.h
@@ -364,11 +364,11 @@ private:
void setLoadType(FrameLoadType);
static void callContinueLoadAfterNavigationPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue);
- static void callContinueLoadAfterNewWindowPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, bool shouldContinue);
+ static void callContinueLoadAfterNewWindowPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, const NavigationAction&, bool shouldContinue);
static void callContinueFragmentScrollAfterNavigationPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue);
void continueLoadAfterNavigationPolicy(const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue);
- void continueLoadAfterNewWindowPolicy(const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, bool shouldContinue);
+ void continueLoadAfterNewWindowPolicy(const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, const NavigationAction&, bool shouldContinue);
void continueFragmentScrollAfterNavigationPolicy(const ResourceRequest&, bool shouldContinue);
bool shouldScrollToAnchor(bool isFormSubmission, FrameLoadType, const KURL&);
diff --git a/WebCore/loader/FrameLoaderClient.h b/WebCore/loader/FrameLoaderClient.h
index 2e08223..eeead4a 100644
--- a/WebCore/loader/FrameLoaderClient.h
+++ b/WebCore/loader/FrameLoaderClient.h
@@ -140,7 +140,7 @@ namespace WebCore {
virtual void dispatchDidFirstLayout() = 0;
virtual void dispatchDidFirstVisuallyNonEmptyLayout() = 0;
- virtual Frame* dispatchCreatePage() = 0;
+ virtual Frame* dispatchCreatePage(const NavigationAction&) = 0;
virtual void dispatchShow() = 0;
virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction, const String& MIMEType, const ResourceRequest&) = 0;
diff --git a/WebCore/loader/PolicyCallback.cpp b/WebCore/loader/PolicyCallback.cpp
index 14799cf..4ec2c84 100644
--- a/WebCore/loader/PolicyCallback.cpp
+++ b/WebCore/loader/PolicyCallback.cpp
@@ -71,11 +71,12 @@ void PolicyCallback::set(const ResourceRequest& request, PassRefPtr<FormState> f
}
void PolicyCallback::set(const ResourceRequest& request, PassRefPtr<FormState> formState,
- const String& frameName, NewWindowPolicyDecisionFunction function, void* argument)
+ const String& frameName, const NavigationAction& navigationAction, NewWindowPolicyDecisionFunction function, void* argument)
{
m_request = request;
m_formState = formState;
m_frameName = frameName;
+ m_navigationAction = navigationAction;
m_navigationFunction = 0;
m_newWindowFunction = function;
@@ -100,7 +101,7 @@ void PolicyCallback::call(bool shouldContinue)
if (m_navigationFunction)
m_navigationFunction(m_argument, m_request, m_formState.get(), shouldContinue);
if (m_newWindowFunction)
- m_newWindowFunction(m_argument, m_request, m_formState.get(), m_frameName, shouldContinue);
+ m_newWindowFunction(m_argument, m_request, m_formState.get(), m_frameName, m_navigationAction, shouldContinue);
ASSERT(!m_contentFunction);
}
@@ -125,7 +126,7 @@ void PolicyCallback::cancel()
if (m_navigationFunction)
m_navigationFunction(m_argument, m_request, m_formState.get(), false);
if (m_newWindowFunction)
- m_newWindowFunction(m_argument, m_request, m_formState.get(), m_frameName, false);
+ m_newWindowFunction(m_argument, m_request, m_formState.get(), m_frameName, m_navigationAction, false);
if (m_contentFunction)
m_contentFunction(m_argument, PolicyIgnore);
}
diff --git a/WebCore/loader/PolicyCallback.h b/WebCore/loader/PolicyCallback.h
index 757fff8..415a3e3 100644
--- a/WebCore/loader/PolicyCallback.h
+++ b/WebCore/loader/PolicyCallback.h
@@ -31,9 +31,10 @@
#define PolicyCallback_h
#include "FrameLoaderTypes.h"
-#include "PlatformString.h"
+#include "NavigationAction.h"
#include "ResourceRequest.h"
#include <wtf/RefPtr.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
@@ -42,7 +43,7 @@ class FormState;
typedef void (*NavigationPolicyDecisionFunction)(void* argument,
const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue);
typedef void (*NewWindowPolicyDecisionFunction)(void* argument,
- const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, bool shouldContinue);
+ const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, const NavigationAction&, bool shouldContinue);
typedef void (*ContentPolicyDecisionFunction)(void* argument, PolicyAction);
class PolicyCallback {
@@ -53,7 +54,7 @@ public:
void clear();
void set(const ResourceRequest&, PassRefPtr<FormState>,
NavigationPolicyDecisionFunction, void* argument);
- void set(const ResourceRequest&, PassRefPtr<FormState>, const String& frameName,
+ void set(const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, const NavigationAction&,
NewWindowPolicyDecisionFunction, void* argument);
void set(ContentPolicyDecisionFunction, void* argument);
@@ -68,6 +69,7 @@ private:
ResourceRequest m_request;
RefPtr<FormState> m_formState;
String m_frameName;
+ NavigationAction m_navigationAction;
NavigationPolicyDecisionFunction m_navigationFunction;
NewWindowPolicyDecisionFunction m_newWindowFunction;
diff --git a/WebCore/loader/PolicyChecker.cpp b/WebCore/loader/PolicyChecker.cpp
index 196ab4f..2680386 100644
--- a/WebCore/loader/PolicyChecker.cpp
+++ b/WebCore/loader/PolicyChecker.cpp
@@ -92,7 +92,7 @@ void PolicyChecker::checkNavigationPolicy(const ResourceRequest& request, Docume
void PolicyChecker::checkNewWindowPolicy(const NavigationAction& action, NewWindowPolicyDecisionFunction function,
const ResourceRequest& request, PassRefPtr<FormState> formState, const String& frameName, void* argument)
{
- m_callback.set(request, formState, frameName, function, argument);
+ m_callback.set(request, formState, frameName, action, function, argument);
m_frame->loader()->client()->dispatchDecidePolicyForNewWindowAction(&PolicyChecker::continueAfterNewWindowPolicy,
action, request, formState, frameName);
}
diff --git a/WebCore/page/Chrome.cpp b/WebCore/page/Chrome.cpp
index 944f32f..762b087 100644
--- a/WebCore/page/Chrome.cpp
+++ b/WebCore/page/Chrome.cpp
@@ -163,9 +163,9 @@ void Chrome::focusedNodeChanged(Node* node) const
m_client->focusedNodeChanged(node);
}
-Page* Chrome::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features) const
+Page* Chrome::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction& action) const
{
- Page* newPage = m_client->createWindow(frame, request, features);
+ Page* newPage = m_client->createWindow(frame, request, features, action);
#if ENABLE(DOM_STORAGE)
if (newPage) {
diff --git a/WebCore/page/Chrome.h b/WebCore/page/Chrome.h
index 1897b79..9f43b11 100644
--- a/WebCore/page/Chrome.h
+++ b/WebCore/page/Chrome.h
@@ -45,6 +45,7 @@ namespace WebCore {
class Geolocation;
class HitTestResult;
class IntRect;
+ class NavigationAction;
class Node;
class Page;
class PopupMenuClient;
@@ -94,7 +95,7 @@ namespace WebCore {
void focusedNodeChanged(Node*) const;
- Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&) const;
+ Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) const;
void show() const;
bool canRunModal() const;
diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h
index bf634d1..abeabf9 100644
--- a/WebCore/page/ChromeClient.h
+++ b/WebCore/page/ChromeClient.h
@@ -56,11 +56,12 @@ namespace WebCore {
class HTMLParserQuirks;
class HitTestResult;
class IntRect;
+ class NavigationAction;
class Node;
class Page;
+ class PopupMenuClient;
class SecurityOrigin;
class SharedGraphicsContext3D;
- class PopupMenuClient;
class Widget;
struct FrameLoadRequest;
@@ -98,7 +99,7 @@ namespace WebCore {
// Frame wants to create the new Page. Also, the newly created window
// should not be shown to the user until the ChromeClient of the newly
// created Page has its show method called.
- virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&) = 0;
+ virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) = 0;
virtual void show() = 0;
virtual bool canRunModal() = 0;
diff --git a/WebCore/page/ContextMenuController.cpp b/WebCore/page/ContextMenuController.cpp
index de64988..08c3d2e 100644
--- a/WebCore/page/ContextMenuController.cpp
+++ b/WebCore/page/ContextMenuController.cpp
@@ -50,6 +50,7 @@
#include "HitTestResult.h"
#include "InspectorController.h"
#include "MouseEvent.h"
+#include "NavigationAction.h"
#include "Node.h"
#include "Page.h"
#include "RenderLayer.h"
@@ -139,7 +140,7 @@ static void openNewWindow(const KURL& urlToLoad, Frame* frame)
{
if (Page* oldPage = frame->page()) {
WindowFeatures features;
- if (Page* newPage = oldPage->chrome()->createWindow(frame, FrameLoadRequest(ResourceRequest(urlToLoad, frame->loader()->outgoingReferrer())), features))
+ if (Page* newPage = oldPage->chrome()->createWindow(frame, FrameLoadRequest(ResourceRequest(urlToLoad, frame->loader()->outgoingReferrer())), features, NavigationAction()))
newPage->chrome()->show();
}
}
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 5c7c25f..a0df1fd 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::createWindow):
+ * src/ChromeClientImpl.h:
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchCreatePage):
+ * src/FrameLoaderClientImpl.h:
+ Add NavigationAction parameter.
+
2010-10-22 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r70301.
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index bb54b57..df13b29 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -52,6 +52,7 @@
#include "HTMLNames.h"
#include "HitTestResult.h"
#include "IntRect.h"
+#include "NavigationAction.h"
#include "Node.h"
#include "NotificationPresenterImpl.h"
#include "Page.h"
@@ -252,7 +253,7 @@ void ChromeClientImpl::focusedNodeChanged(Node* node)
}
Page* ChromeClientImpl::createWindow(
- Frame* frame, const FrameLoadRequest& r, const WindowFeatures& features)
+ Frame* frame, const FrameLoadRequest& r, const WindowFeatures& features, const NavigationAction&)
{
if (!m_webView->client())
return 0;
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index b1208f7..039fc1b 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -71,7 +71,7 @@ public:
virtual void takeFocus(WebCore::FocusDirection);
virtual void focusedNodeChanged(WebCore::Node*);
virtual WebCore::Page* createWindow(
- WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&);
+ WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
virtual void show();
virtual bool canRunModal();
virtual void runModal();
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index b4c62f4..e433d86 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -812,11 +812,11 @@ void FrameLoaderClientImpl::dispatchDidFirstVisuallyNonEmptyLayout()
m_webFrame->client()->didFirstVisuallyNonEmptyLayout(m_webFrame);
}
-Frame* FrameLoaderClientImpl::dispatchCreatePage()
+Frame* FrameLoaderClientImpl::dispatchCreatePage(const NavigationAction& action)
{
struct WindowFeatures features;
Page* newPage = m_webFrame->frame()->page()->chrome()->createWindow(
- m_webFrame->frame(), FrameLoadRequest(), features);
+ m_webFrame->frame(), FrameLoadRequest(), features, action);
// Make sure that we have a valid disposition. This should have been set in
// the preceeding call to dispatchDecidePolicyForNewWindowAction.
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h
index 0b15db6..483a722 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -112,7 +112,7 @@ public:
virtual void dispatchDidFinishLoad();
virtual void dispatchDidFirstLayout();
virtual void dispatchDidFirstVisuallyNonEmptyLayout();
- virtual WebCore::Frame* dispatchCreatePage();
+ virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction function, const WTF::String& mime_type, const WebCore::ResourceRequest&);
virtual void dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState> form_state, const WTF::String& frame_name);
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index 1795645..46a80df 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::createWindow):
+ * WebCoreSupport/ChromeClientEfl.h:
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchCreatePage):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+ Add NavigationAction parameter.
+
2010-10-19 Ryuan Choi <ryuan.choi at samsung.com>
Reviewed by Eric Seidel.
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index 257e824..d99f0bc 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -46,6 +46,7 @@
#include "HitTestResult.h"
#include "IntRect.h"
#include "KURL.h"
+#include "NavigationAction.h"
#include "NotImplemented.h"
#include "PlatformString.h"
#include "SecurityOrigin.h"
@@ -143,7 +144,7 @@ void ChromeClientEfl::unfocus()
evas_object_focus_set(m_view, EINA_FALSE);
}
-Page* ChromeClientEfl::createWindow(Frame*, const FrameLoadRequest& frameLoadRequest, const WindowFeatures& features)
+Page* ChromeClientEfl::createWindow(Frame*, const FrameLoadRequest& frameLoadRequest, const WindowFeatures& features, const NavigationAction&)
{
Evas_Object* newView = ewk_view_window_create(m_view, EINA_TRUE, &features);
if (!newView)
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
index 4339b9a..f0aeb8d 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
@@ -54,7 +54,7 @@ public:
virtual void focusedNodeChanged(Node*);
- virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&);
+ virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
virtual void show();
virtual bool canRunModal();
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
index 1b82239..8264a1d 100644
--- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
@@ -860,7 +860,7 @@ bool FrameLoaderClientEfl::canCachePage() const
return false;
}
-Frame* FrameLoaderClientEfl::dispatchCreatePage()
+Frame* FrameLoaderClientEfl::dispatchCreatePage(const NavigationAction&)
{
if (!m_view)
return 0;
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
index 1b880e6..e8c7e0c 100644
--- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
@@ -111,7 +111,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
virtual void dispatchDidFirstLayout();
virtual void dispatchDidFirstVisuallyNonEmptyLayout();
- virtual Frame* dispatchCreatePage();
+ virtual Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction, const String& MIMEType, const ResourceRequest&);
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index cde04c9..d130766 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::createWindow):
+ * WebCoreSupport/ChromeClientGtk.h:
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchCreatePage):
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+ Add NavigationAction parameter.
+
2010-10-20 Philippe Normand <pnormand at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index 7e4090b..b872b30 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -35,6 +35,7 @@
#include "HitTestResult.h"
#include "Icon.h"
#include "KURL.h"
+#include "NavigationAction.h"
#include "PlatformString.h"
#include "PopupMenuClient.h"
#include "PopupMenuGtk.h"
@@ -137,7 +138,7 @@ void ChromeClient::unfocus()
gtk_window_set_focus(GTK_WINDOW(window), NULL);
}
-Page* ChromeClient::createWindow(Frame* frame, const FrameLoadRequest& frameLoadRequest, const WindowFeatures& coreFeatures)
+Page* ChromeClient::createWindow(Frame* frame, const FrameLoadRequest& frameLoadRequest, const WindowFeatures& coreFeatures, const NavigationAction&)
{
WebKitWebView* webView = 0;
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
index 21c4677..b925313 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
@@ -56,7 +56,7 @@ namespace WebKit {
virtual void focusedNodeChanged(WebCore::Node*);
- virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&);
+ virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
virtual void show();
virtual bool canRunModal();
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index fa17632..54e5ae2 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -1200,7 +1200,7 @@ bool FrameLoaderClient::canCachePage() const
return true;
}
-Frame* FrameLoaderClient::dispatchCreatePage()
+Frame* FrameLoaderClient::dispatchCreatePage(const NavigationAction&)
{
WebKitWebView* webView = getViewFromFrame(m_frame);
WebKitWebView* newWebView = 0;
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
index 206e780..f063eb8 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
@@ -91,7 +91,7 @@ namespace WebKit {
virtual void dispatchDidFirstLayout();
virtual void dispatchDidFirstVisuallyNonEmptyLayout();
- virtual WebCore::Frame* dispatchCreatePage();
+ virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction, const WTF::String& MIMEType, const WebCore::ResourceRequest&);
diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog
index d55ce71..172e9ce 100644
--- a/WebKit/haiku/ChangeLog
+++ b/WebKit/haiku/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * WebCoreSupport/ChromeClientHaiku.cpp:
+ (WebCore::ChromeClientHaiku::createWindow):
+ * WebCoreSupport/ChromeClientHaiku.h:
+ * WebCoreSupport/FrameLoaderClientHaiku.cpp:
+ (WebCore::FrameLoaderClientHaiku::dispatchCreatePage):
+ * WebCoreSupport/FrameLoaderClientHaiku.h:
+ Add NavigationAction parameter.
+
2010-09-28 Jenn Braithwaite <jennb at chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
index 6c54424..134cabe 100644
--- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
+++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
@@ -34,6 +34,7 @@
#include "FrameView.h"
#include "HitTestResult.h"
#include "Icon.h"
+#include "NavigationAction.h"
#include "NotImplemented.h"
#include "PlatformString.h"
#include "SecurityOrigin.h"
@@ -107,7 +108,7 @@ void ChromeClientHaiku::focusedNodeChanged(Node*)
{
}
-Page* ChromeClientHaiku::createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&)
+Page* ChromeClientHaiku::createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&)
{
notImplemented();
return 0;
diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
index 6a5b381..9409c69 100644
--- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
+++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
@@ -60,7 +60,7 @@ namespace WebCore {
void focusedNodeChanged(Node*);
- Page* createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&);
+ Page* createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
Page* createModalDialog(Frame*, const FrameLoadRequest&);
void show();
diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
index cae0ed1..2db9422 100644
--- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
+++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
@@ -645,7 +645,7 @@ void FrameLoaderClientHaiku::dispatchDidFailLoad(const ResourceError&)
notImplemented();
}
-Frame* FrameLoaderClientHaiku::dispatchCreatePage()
+Frame* FrameLoaderClientHaiku::dispatchCreatePage(const WebCore::NavigationAction&)
{
notImplemented();
return false;
diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
index 1701cb0..b2f89c7 100644
--- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
+++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
@@ -199,7 +199,7 @@ namespace WebCore {
virtual void dispatchDidFailProvisionalLoad(const ResourceError&);
virtual void dispatchDidFailLoad(const ResourceError&);
- virtual Frame* dispatchCreatePage();
+ virtual Frame* dispatchCreatePage(const NavigationAction&);
virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction,
const String&,
const ResourceRequest&);
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index dd21c3b..af45a63 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::createWindow):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchCreatePage):
+ Add NavigationAction parameter.
+
2010-10-21 Andy Estes <aestes at apple.com>
Reviewed by Eric Carlson.
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index 5f3b727..209c2b9 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -55,7 +55,7 @@ public:
virtual void focusedNodeChanged(WebCore::Node*);
- virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&);
+ virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
virtual void show();
virtual bool canRunModal();
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 68e17be..ad36e0e 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -60,6 +60,7 @@
#import <WebCore/HitTestResult.h>
#import <WebCore/Icon.h>
#import <WebCore/IntRect.h>
+#import <WebCore/NavigationAction.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformScreen.h>
#import <WebCore/PlatformString.h>
@@ -199,7 +200,7 @@ void WebChromeClient::focusedNodeChanged(Node*)
{
}
-Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features)
+Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction&)
{
NSURLRequest *URLRequest = nil;
if (!request.isEmpty())
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
index 0baa55c..37bb861 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -111,7 +111,7 @@ private:
virtual void dispatchDidFirstLayout();
virtual void dispatchDidFirstVisuallyNonEmptyLayout();
- virtual WebCore::Frame* dispatchCreatePage();
+ virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction,
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index af9d50d..b3329cd 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -697,7 +697,7 @@ void WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout()
CallFrameLoadDelegate(implementations->didFirstVisuallyNonEmptyLayoutInFrameFunc, webView, @selector(webView:didFirstVisuallyNonEmptyLayoutInFrame:), m_webFrame.get());
}
-Frame* WebFrameLoaderClient::dispatchCreatePage()
+Frame* WebFrameLoaderClient::dispatchCreatePage(const NavigationAction&)
{
WebView *currentWebView = getWebView(m_webFrame.get());
NSDictionary *features = [[NSDictionary alloc] init];
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 2255617..2177b41 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -67,6 +67,7 @@
#include "FocusController.h"
#include "Editor.h"
#include "Scrollbar.h"
+#include "NavigationAction.h"
#include "NetworkingContext.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformWheelEvent.h"
@@ -2088,8 +2089,9 @@ static void openNewWindow(const QUrl& url, WebCore::Frame* frame)
{
if (Page* oldPage = frame->page()) {
WindowFeatures features;
+ NavigationAction action;
if (Page* newPage = oldPage->chrome()->createWindow(frame,
- frameLoadRequest(url, frame), features))
+ frameLoadRequest(url, frame), features, action))
newPage->chrome()->show();
}
}
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 7c219e6..970b09d 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * Api/qwebpage.cpp:
+ (openNewWindow):
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::createWindow):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchCreatePage):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ Add NavigationAction parameter.
+
2010-10-22 Yi Shen <yi.4.shen at nokia.com>
Reviewed by Andreas Kling.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 3bcc8f8..bfe29a9 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -44,6 +44,7 @@
#include "GeolocationPermissionClientQt.h"
#include "HitTestResult.h"
#include "Icon.h"
+#include "NavigationAction.h"
#include "NetworkingContext.h"
#include "NotImplemented.h"
#include "NotificationPresenterClientQt.h"
@@ -169,7 +170,7 @@ void ChromeClientQt::focusedNodeChanged(WebCore::Node*)
}
-Page* ChromeClientQt::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features)
+Page* ChromeClientQt::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction&)
{
QWebPage* newPage = m_webPage->createWindow(features.dialog ? QWebPage::WebModalDialog : QWebPage::WebBrowserWindow);
if (!newPage)
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 0a449f6..bbd2452 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -73,7 +73,7 @@ namespace WebCore {
virtual void focusedNodeChanged(Node*);
- virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&);
+ virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
virtual void show();
virtual bool canRunModal();
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 4ebc7e1..a0b2330 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -1102,7 +1102,7 @@ void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError& erro
callErrorPageExtension(error);
}
-WebCore::Frame* FrameLoaderClientQt::dispatchCreatePage()
+WebCore::Frame* FrameLoaderClientQt::dispatchCreatePage(const WebCore::NavigationAction&)
{
if (!m_webFrame)
return 0;
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index ec6a3b6..8aef069 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -120,7 +120,7 @@ public:
virtual void dispatchDidFirstLayout();
virtual void dispatchDidFirstVisuallyNonEmptyLayout();
- virtual WebCore::Frame* dispatchCreatePage();
+ virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const WTF::String&, const WebCore::ResourceRequest&);
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 4756e7a..0b7a34b 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::createWindow):
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::dispatchCreatePage):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ Add NavigationAction parameter.
+
2010-10-21 MORITA Hajime <morrita at google.com>
Unreviewed, touched it to fix the build.
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
index 7a025a7..b1332ed 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
@@ -38,7 +38,6 @@
#include "WebDesktopNotificationsDelegate.h"
#include "WebSecurityOrigin.h"
#include "WebView.h"
-#pragma warning(push, 0)
#include <WebCore/BString.h>
#include <WebCore/Console.h>
#include <WebCore/ContextMenu.h>
@@ -48,23 +47,23 @@
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/FrameView.h>
#include <WebCore/Geolocation.h>
-#if USE(ACCELERATED_COMPOSITING)
-#include <WebCore/GraphicsLayer.h>
-#endif
#include <WebCore/HTMLNames.h>
#include <WebCore/Icon.h>
#include <WebCore/LocalWindowsContext.h>
#include <WebCore/LocalizedStrings.h>
+#include <WebCore/NavigationAction.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
#include <WebCore/SecurityOrigin.h>
#include <WebCore/PopupMenuWin.h>
#include <WebCore/SearchPopupMenuWin.h>
#include <WebCore/WindowFeatures.h>
-#pragma warning(pop)
-
#include <tchar.h>
+#if USE(ACCELERATED_COMPOSITING)
+#include <WebCore/GraphicsLayer.h>
+#endif
+
using namespace WebCore;
// When you call GetOpenFileName, if the size of the buffer is too small,
@@ -195,7 +194,7 @@ static COMPtr<IPropertyBag> createWindowFeaturesPropertyBag(const WindowFeatures
return COMPtr<IPropertyBag>(AdoptCOM, COMPropertyBag<COMVariant>::adopt(map));
}
-Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest& frameLoadRequest, const WindowFeatures& features)
+Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest& frameLoadRequest, const WindowFeatures& features, const NavigationAction&)
{
COMPtr<IWebUIDelegate> delegate = uiDelegate();
if (!delegate)
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index ffc41b2..e75b984 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -426,7 +426,7 @@ void WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout()
frameLoadDelegatePrivate->didFirstVisuallyNonEmptyLayoutInFrame(webView, m_webFrame);
}
-Frame* WebFrameLoaderClient::dispatchCreatePage()
+Frame* WebFrameLoaderClient::dispatchCreatePage(const NavigationAction&)
{
WebView* webView = m_webFrame->webView();
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
index 7ec344c..d4f1523 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
@@ -78,7 +78,7 @@ public:
virtual void dispatchDidFirstLayout();
virtual void dispatchDidFirstVisuallyNonEmptyLayout();
- virtual WebCore::Frame* dispatchCreatePage();
+ virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
diff --git a/WebKit/wince/ChangeLog b/WebKit/wince/ChangeLog
index 5387685..2e0585d 100644
--- a/WebKit/wince/ChangeLog
+++ b/WebKit/wince/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * WebCoreSupport/ChromeClientWinCE.cpp:
+ (WebKit::ChromeClientWinCE::createWindow):
+ * WebCoreSupport/ChromeClientWinCE.h:
+ * WebCoreSupport/FrameLoaderClientWinCE.cpp:
+ (WebKit::FrameLoaderClientWinCE::dispatchCreatePage):
+ * WebCoreSupport/FrameLoaderClientWinCE.h:
+ Add NavigationAction parameter.
+
2010-10-22 Patrick Gansterer <paroga at webkit.org>
Reviewed by Adam Roben.
diff --git a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
index 468d86c..c99635a 100644
--- a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
+++ b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
@@ -28,6 +28,7 @@
#include "FileChooser.h"
#include "Icon.h"
#include "NotImplemented.h"
+#include "NavigationAction.h"
#include "PopupMenuWin.h"
#include "SearchPopupMenuWin.h"
#include "WebView.h"
@@ -83,7 +84,7 @@ void ChromeClientWinCE::unfocus()
notImplemented();
}
-Page* ChromeClientWinCE::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&)
+Page* ChromeClientWinCE::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&)
{
notImplemented();
return 0;
diff --git a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
index be9f643..3818ce0 100644
--- a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
+++ b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
@@ -56,7 +56,7 @@ public:
// Frame wants to create the new Page. Also, the newly created window
// should not be shown to the user until the ChromeClient of the newly
// created Page has its show method called.
- virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&);
+ virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
virtual void show();
virtual bool canRunModal();
diff --git a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
index e841ab9..fe34ab4 100644
--- a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
+++ b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
@@ -557,7 +557,7 @@ bool FrameLoaderClientWinCE::canCachePage() const
return true;
}
-Frame* FrameLoaderClientWinCE::dispatchCreatePage()
+Frame* FrameLoaderClientWinCE::dispatchCreatePage(const NavigationAction&)
{
notImplemented();
return 0;
diff --git a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
index b64efed..bf5eafb 100644
--- a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
+++ b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
@@ -85,7 +85,7 @@ public:
virtual void dispatchDidFirstLayout();
virtual void dispatchDidFirstVisuallyNonEmptyLayout();
- virtual WebCore::Frame* dispatchCreatePage();
+ virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction, const WTF::String& MIMEType, const WebCore::ResourceRequest&);
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index b7ec1f6..6aa9ce4 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * WebKitSupport/ChromeClientWx.cpp:
+ (WebCore::ChromeClientWx::createWindow):
+ * WebKitSupport/ChromeClientWx.h:
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+ (WebCore::FrameLoaderClientWx::dispatchCreatePage):
+ * WebKitSupport/FrameLoaderClientWx.h:
+ Add NavigationAction parameter.
+
2010-10-13 Gavin Barraclough <barraclough at apple.com>
Reviewed by Oliver Hunt.
diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
index 11c5643..97b98cf 100644
--- a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
@@ -37,6 +37,7 @@
#include "Frame.h"
#include "FrameLoadRequest.h"
#include "Icon.h"
+#include "NavigationAction.h"
#include "NotImplemented.h"
#include "PlatformString.h"
#include "SecurityOrigin.h"
@@ -136,7 +137,7 @@ void ChromeClientWx::focusedNodeChanged(Node*)
{
}
-Page* ChromeClientWx::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features)
+Page* ChromeClientWx::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction&)
{
Page* myPage = 0;
wxWebViewNewWindowEvent wkEvent(m_webView);
diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.h b/WebKit/wx/WebKitSupport/ChromeClientWx.h
index 5b60446..755beb7 100644
--- a/WebKit/wx/WebKitSupport/ChromeClientWx.h
+++ b/WebKit/wx/WebKitSupport/ChromeClientWx.h
@@ -57,7 +57,7 @@ public:
virtual void focusedNodeChanged(Node*);
- virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&);
+ virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
virtual Page* createModalDialog(Frame*, const FrameLoadRequest&);
virtual void show();
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
index 7963ef9..41f0f8f 100644
--- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
@@ -766,7 +766,7 @@ void FrameLoaderClientWx::dispatchDidFailLoad(const ResourceError&)
notImplemented();
}
-Frame* FrameLoaderClientWx::dispatchCreatePage()
+Frame* FrameLoaderClientWx::dispatchCreatePage(const NavigationAction&)
{
notImplemented();
return false;
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
index 9c260fe..bb83784 100644
--- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
+++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
@@ -190,7 +190,7 @@ namespace WebCore {
virtual void dispatchDidFailProvisionalLoad(const ResourceError&);
virtual void dispatchDidFailLoad(const ResourceError&);
- virtual Frame* dispatchCreatePage();
+ virtual Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const String&, const ResourceRequest&);
virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const String&);
virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>);
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 7e31255..d93d85c 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,35 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ In addition to passing modifier flags from the now passed NavigationAction, also pass
+ the WindowFeatures to the UIProcess.
+
+ * Platform/CoreIPC/HandleMessage.h:
+ (CoreIPC::callMemberFunction):
+ * Shared/WebCoreArgumentCoders.h:
+ * Shared/WebEvent.h:
+ (WebKit::WebEvent::modifiers):
+ * UIProcess/API/C/WKPage.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::createNewPage):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/WebUIClient.cpp:
+ (WebKit::WebUIClient::createNewPage):
+ * UIProcess/WebUIClient.h:
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::createWindow):
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::dispatchCreatePage):
+ (WebKit::modifiersForNavigationAction):
+ (WebKit::mouseButtonForNavigationAction):
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+
2010-10-22 Anders Carlsson <andersca at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebKit2/Platform/CoreIPC/HandleMessage.h b/WebKit2/Platform/CoreIPC/HandleMessage.h
index 0f09682..3a564fb 100644
--- a/WebKit2/Platform/CoreIPC/HandleMessage.h
+++ b/WebKit2/Platform/CoreIPC/HandleMessage.h
@@ -103,6 +103,12 @@ void callMemberFunction(const Arguments3<P1, P2, P3>& args, Arguments1<R1>& repl
(object->*function)(args.argument1, args.argument2, args.argument3, replyArgs.argument1);
}
+template<typename C, typename MF, typename P1, typename P2, typename P3, typename R1, typename R2>
+void callMemberFunction(const Arguments3<P1, P2, P3>& args, Arguments2<R1, R2>& replyArgs, C* object, MF function)
+{
+ (object->*function)(args.argument1, args.argument2, args.argument3, replyArgs.argument1, replyArgs.argument2);
+}
+
template<typename C, typename MF, typename P1, typename P2, typename P3, typename P4, typename R1>
void callMemberFunction(const Arguments4<P1, P2, P3, P4>& args, Arguments1<R1>& replyArgs, C* object, MF function)
{
diff --git a/WebKit2/Shared/WebCoreArgumentCoders.h b/WebKit2/Shared/WebCoreArgumentCoders.h
index 16abc8b..2055991 100644
--- a/WebKit2/Shared/WebCoreArgumentCoders.h
+++ b/WebKit2/Shared/WebCoreArgumentCoders.h
@@ -37,6 +37,7 @@
#include <WebCore/ResourceError.h>
#include <WebCore/ResourceRequest.h>
#include <WebCore/ViewportArguments.h>
+#include <WebCore/WindowFeatures.h>
#include <limits>
namespace CoreIPC {
@@ -168,6 +169,66 @@ template<> struct ArgumentCoder<WebCore::ResourceError> {
}
};
+
+template<> struct ArgumentCoder<WebCore::WindowFeatures> {
+ static void encode(ArgumentEncoder* encoder, const WebCore::WindowFeatures& windowFeatures)
+ {
+ encoder->encode(windowFeatures.x);
+ encoder->encode(windowFeatures.y);
+ encoder->encode(windowFeatures.width);
+ encoder->encode(windowFeatures.height);
+ encoder->encode(windowFeatures.xSet);
+ encoder->encode(windowFeatures.ySet);
+ encoder->encode(windowFeatures.widthSet);
+ encoder->encode(windowFeatures.heightSet);
+ encoder->encode(windowFeatures.menuBarVisible);
+ encoder->encode(windowFeatures.statusBarVisible);
+ encoder->encode(windowFeatures.toolBarVisible);
+ encoder->encode(windowFeatures.locationBarVisible);
+ encoder->encode(windowFeatures.scrollbarsVisible);
+ encoder->encode(windowFeatures.resizable);
+ encoder->encode(windowFeatures.fullscreen);
+ encoder->encode(windowFeatures.dialog);
+ }
+
+ static bool decode(ArgumentDecoder* decoder, WebCore::WindowFeatures& windowFeatures)
+ {
+ if (!decoder->decode(windowFeatures.x))
+ return false;
+ if (!decoder->decode(windowFeatures.y))
+ return false;
+ if (!decoder->decode(windowFeatures.width))
+ return false;
+ if (!decoder->decode(windowFeatures.height))
+ return false;
+ if (!decoder->decode(windowFeatures.xSet))
+ return false;
+ if (!decoder->decode(windowFeatures.ySet))
+ return false;
+ if (!decoder->decode(windowFeatures.widthSet))
+ return false;
+ if (!decoder->decode(windowFeatures.heightSet))
+ return false;
+ if (!decoder->decode(windowFeatures.menuBarVisible))
+ return false;
+ if (!decoder->decode(windowFeatures.statusBarVisible))
+ return false;
+ if (!decoder->decode(windowFeatures.toolBarVisible))
+ return false;
+ if (!decoder->decode(windowFeatures.locationBarVisible))
+ return false;
+ if (!decoder->decode(windowFeatures.scrollbarsVisible))
+ return false;
+ if (!decoder->decode(windowFeatures.resizable))
+ return false;
+ if (!decoder->decode(windowFeatures.fullscreen))
+ return false;
+ if (!decoder->decode(windowFeatures.dialog))
+ return false;
+ return true;
+ }
+};
+
} // namespace CoreIPC
#endif // WebCoreArgumentCoders_h
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 534a343..db32243 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -129,7 +129,7 @@ struct WKPageFormClient {
typedef struct WKPageFormClient WKPageFormClient;
// UI Client
-typedef WKPageRef (*WKPageCreateNewPageCallback)(WKPageRef page, const void *clientInfo);
+typedef WKPageRef (*WKPageCreateNewPageCallback)(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
typedef void (*WKPageShowPageCallback)(WKPageRef page, const void *clientInfo);
typedef void (*WKPageCloseCallback)(WKPageRef page, const void *clientInfo);
typedef void (*WKPageRunJavaScriptAlertCallback)(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void *clientInfo);
diff --git a/WebKit2/UIProcess/API/qt/ClientImpl.cpp b/WebKit2/UIProcess/API/qt/ClientImpl.cpp
index 38d2199..865e365 100644
--- a/WebKit2/UIProcess/API/qt/ClientImpl.cpp
+++ b/WebKit2/UIProcess/API/qt/ClientImpl.cpp
@@ -134,7 +134,7 @@ void qt_wk_didBecomeResponsive(WKPageRef page, const void* clientInfo)
{
}
-WKPageRef qt_wk_createNewPage(WKPageRef page, const void* clientInfo)
+WKPageRef qt_wk_createNewPage(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void* clientInfo)
{
QWKPage* wkPage = toQWKPage(clientInfo);
QWKPagePrivate* d = QWKPagePrivate::get(wkPage);
diff --git a/WebKit2/UIProcess/API/qt/ClientImpl.h b/WebKit2/UIProcess/API/qt/ClientImpl.h
index 4de9182..9f6f3d5 100644
--- a/WebKit2/UIProcess/API/qt/ClientImpl.h
+++ b/WebKit2/UIProcess/API/qt/ClientImpl.h
@@ -45,7 +45,7 @@ void qt_wk_didBecomeUnresponsive(WKPageRef, const void* clientInfo);
void qt_wk_didBecomeResponsive(WKPageRef, const void* clientInfo);
// ui client
-WKPageRef qt_wk_createNewPage(WKPageRef page, const void *clientInfo);
+WKPageRef qt_wk_createNewPage(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
void qt_wk_showPage(WKPageRef page, const void *clientInfo);
void qt_wk_close(WKPageRef page, const void *clientInfo);
void qt_wk_runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo);
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index fd2d705..a0d491c 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -54,6 +54,7 @@
#include "WebProcessProxy.h"
#include "WebURLRequest.h"
#include <WebCore/FloatRect.h>
+#include <WebCore/WindowFeatures.h>
#include <stdio.h>
#ifndef NDEBUG
@@ -829,9 +830,9 @@ void WebPageProxy::willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, cons
// UIClient
-void WebPageProxy::createNewPage(uint64_t& newPageID, WebPageCreationParameters& newPageParameters)
+void WebPageProxy::createNewPage(const WindowFeatures& windowFeatures, uint32_t opaqueModifiers, int32_t opaqueMouseButton, uint64_t& newPageID, WebPageCreationParameters& newPageParameters)
{
- RefPtr<WebPageProxy> newPage = m_uiClient.createNewPage(this);
+ RefPtr<WebPageProxy> newPage = m_uiClient.createNewPage(this, windowFeatures, static_cast<WebEvent::Modifiers>(opaqueModifiers), static_cast<WebMouseEvent::Button>(opaqueMouseButton));
if (newPage) {
// FIXME: Pass the real size.
newPageID = newPage->pageID();
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 343bf39..bfdfd93 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -61,6 +61,7 @@ namespace WebCore {
class FloatRect;
class IntSize;
struct ViewportArguments;
+ struct WindowFeatures;
}
struct WKContextStatistics;
@@ -256,7 +257,7 @@ private:
void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const StringPairVector& textFieldValues, uint64_t listenerID, CoreIPC::ArgumentDecoder*);
// UI client
- void createNewPage(uint64_t& newPageID, WebPageCreationParameters&);
+ void createNewPage(const WebCore::WindowFeatures&, uint32_t modifiers, int32_t mouseButton, uint64_t& newPageID, WebPageCreationParameters&);
void showPage();
void closePage();
void runJavaScriptAlert(uint64_t frameID, const String&);
diff --git a/WebKit2/UIProcess/WebPageProxy.messages.in b/WebKit2/UIProcess/WebPageProxy.messages.in
index 1c4b300..b85342d 100644
--- a/WebKit2/UIProcess/WebPageProxy.messages.in
+++ b/WebKit2/UIProcess/WebPageProxy.messages.in
@@ -22,7 +22,7 @@
messages -> WebPageProxy {
# UI messages.
- CreateNewPage() -> (uint64_t newPageID, WebKit::WebPageCreationParameters newPageParameters)
+ CreateNewPage(WebCore::WindowFeatures windowFeatures, uint32_t modifiers, int32_t mouseButton) -> (uint64_t newPageID, WebKit::WebPageCreationParameters newPageParameters)
ShowPage()
ClosePage()
RunJavaScriptAlert(uint64_t frameID, WTF::String message) -> ()
diff --git a/WebKit2/UIProcess/WebUIClient.cpp b/WebKit2/UIProcess/WebUIClient.cpp
index 6f0bde9..68eb4b9 100644
--- a/WebKit2/UIProcess/WebUIClient.cpp
+++ b/WebKit2/UIProcess/WebUIClient.cpp
@@ -25,8 +25,10 @@
#include "WebUIClient.h"
+#include "ImmutableDictionary.h"
#include "NativeWebKeyboardEvent.h"
#include "WKAPICast.h"
+#include "WebNumber.h"
#include "WebPageProxy.h"
#include <WebCore/FloatRect.h>
#include <WebCore/IntSize.h>
@@ -50,12 +52,30 @@ void WebUIClient::initialize(const WKPageUIClient* client)
memset(&m_pageUIClient, 0, sizeof(m_pageUIClient));
}
-PassRefPtr<WebPageProxy> WebUIClient::createNewPage(WebPageProxy* page)
+PassRefPtr<WebPageProxy> WebUIClient::createNewPage(WebPageProxy* page, const WindowFeatures& windowFeatures, WebEvent::Modifiers modifiers, WebMouseEvent::Button button)
{
if (!m_pageUIClient.createNewPage)
return 0;
-
- return adoptRef(toImpl(m_pageUIClient.createNewPage(toAPI(page), m_pageUIClient.clientInfo)));
+
+ ImmutableDictionary::MapType map;
+ if (windowFeatures.xSet)
+ map.set("x", WebDouble::create(windowFeatures.x));
+ if (windowFeatures.ySet)
+ map.set("y", WebDouble::create(windowFeatures.y));
+ if (windowFeatures.widthSet)
+ map.set("width", WebDouble::create(windowFeatures.width));
+ if (windowFeatures.heightSet)
+ map.set("height", WebDouble::create(windowFeatures.height));
+ map.set("menuBarVisible", WebBoolean::create(windowFeatures.menuBarVisible));
+ map.set("statusBarVisible", WebBoolean::create(windowFeatures.statusBarVisible));
+ map.set("toolBarVisible", WebBoolean::create(windowFeatures.toolBarVisible));
+ map.set("scrollbarsVisible", WebBoolean::create(windowFeatures.scrollbarsVisible));
+ map.set("resizable", WebBoolean::create(windowFeatures.resizable));
+ map.set("fullscreen", WebBoolean::create(windowFeatures.fullscreen));
+ map.set("dialog", WebBoolean::create(windowFeatures.dialog));
+ RefPtr<ImmutableDictionary> featuresMap = ImmutableDictionary::adopt(map);
+
+ return adoptRef(toImpl(m_pageUIClient.createNewPage(toAPI(page), toAPI(featuresMap.get()), toAPI(modifiers), toAPI(button), m_pageUIClient.clientInfo)));
}
void WebUIClient::showPage(WebPageProxy* page)
diff --git a/WebKit2/UIProcess/WebUIClient.h b/WebKit2/UIProcess/WebUIClient.h
index a4b811f..7e32173 100644
--- a/WebKit2/UIProcess/WebUIClient.h
+++ b/WebKit2/UIProcess/WebUIClient.h
@@ -33,6 +33,7 @@
namespace WebCore {
class IntSize;
+struct WindowFeatures;
}
namespace WebKit {
@@ -47,7 +48,7 @@ public:
WebUIClient();
void initialize(const WKPageUIClient*);
- PassRefPtr<WebPageProxy> createNewPage(WebPageProxy*);
+ PassRefPtr<WebPageProxy> createNewPage(WebPageProxy*, const WebCore::WindowFeatures&, WebEvent::Modifiers, WebMouseEvent::Button);
void showPage(WebPageProxy*);
void close(WebPageProxy*);
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
index 5446274..89b3e82 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -112,11 +112,14 @@ void WebChromeClient::focusedNodeChanged(Node*)
notImplemented();
}
-Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&)
+Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures& windowFeatures, const NavigationAction& navigationAction)
{
+ uint32_t modifiers = modifiersForNavigationAction(navigationAction);
+ int32_t mouseButton = mouseButtonForNavigationAction(navigationAction);
+
uint64_t newPageID = 0;
WebPageCreationParameters parameters;
- if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::CreateNewPage(),
+ if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::CreateNewPage(windowFeatures, modifiers, mouseButton),
Messages::WebPageProxy::CreateNewPage::Reply(newPageID, parameters),
m_page->pageID(), CoreIPC::Connection::NoTimeout)) {
return 0;
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
index ad488f9..be8a7ab 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
+++ b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
@@ -65,7 +65,7 @@ private:
// Frame wants to create the new Page. Also, the newly created window
// should not be shown to the user until the ChromeClient of the newly
// created Page has its show method called.
- virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&);
+ virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
virtual void show();
virtual bool canRunModal();
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index 01379f0..8b8892f 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -443,14 +443,14 @@ void WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout()
WebProcess::shared().connection()->send(Messages::WebPageProxy::DidFirstVisuallyNonEmptyLayoutForFrame(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get())), webPage->pageID());
}
-Frame* WebFrameLoaderClient::dispatchCreatePage()
+Frame* WebFrameLoaderClient::dispatchCreatePage(const NavigationAction& navigationAction)
{
WebPage* webPage = m_frame->page();
if (!webPage)
return 0;
// Just call through to the chrome client.
- Page* newPage = webPage->corePage()->chrome()->createWindow(m_frame->coreFrame(), FrameLoadRequest(), WindowFeatures());
+ Page* newPage = webPage->corePage()->chrome()->createWindow(m_frame->coreFrame(), FrameLoadRequest(), WindowFeatures(), navigationAction);
if (!newPage)
return 0;
@@ -466,7 +466,7 @@ void WebFrameLoaderClient::dispatchShow()
webPage->show();
}
-static uint32_t modifiersForNavigationAction(const NavigationAction& navigationAction)
+uint32_t modifiersForNavigationAction(const NavigationAction& navigationAction)
{
uint32_t modifiers = 0;
if (const UIEventWithKeyState* keyStateEvent = findEventWithKeyState(const_cast<Event*>(navigationAction.event()))) {
@@ -492,7 +492,7 @@ static const MouseEvent* findMouseEvent(const Event* event)
return 0;
}
-static int32_t mouseButtonForNavigationAction(const NavigationAction& navigationAction)
+int32_t mouseButtonForNavigationAction(const NavigationAction& navigationAction)
{
const MouseEvent* mouseEvent = findMouseEvent(navigationAction.event());
if (!mouseEvent)
@@ -504,7 +504,6 @@ static int32_t mouseButtonForNavigationAction(const NavigationAction& navigation
return mouseEvent->button();
}
-
void WebFrameLoaderClient::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const String& MIMEType, const ResourceRequest& request)
{
if (m_frame->coreFrame()->loader()->documentLoader()->url().isEmpty() && request.url() == blankURL()) {
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
index 0b97ed0..1abdaf7 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
@@ -92,7 +92,7 @@ private:
virtual void dispatchDidFirstLayout();
virtual void dispatchDidFirstVisuallyNonEmptyLayout();
- virtual WebCore::Frame* dispatchCreatePage();
+ virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction, const String& MIMEType, const WebCore::ResourceRequest&);
@@ -211,6 +211,9 @@ private:
bool m_hasSentResponseToPluginView;
};
+uint32_t modifiersForNavigationAction(const WebCore::NavigationAction&);
+int32_t mouseButtonForNavigationAction(const WebCore::NavigationAction&);
+
} // namespace WebKit
#endif // WebFrameLoaderClient_h
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 372aed1..61ffce1 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-22 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (createNewPage):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::createOtherPage):
+ Update for new signature for the WKPageCreateNewPageCallback.
+
2010-10-22 Eric Seidel <eric at webkit.org>
Unreviewed. Just adding a test case.
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
index 6fad41a..ca871e9 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
@@ -361,7 +361,7 @@ static void decidePolicyForMIMEType(WKPageRef page, WKStringRef MIMEType, WKURLR
#pragma mark UI Client Callbacks
-static WKPageRef createNewPage(WKPageRef page, const void* clientInfo)
+static WKPageRef createNewPage(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton button, const void* clientInfo)
{
LOG(@"createNewPage");
BrowserWindowController *controller = [[BrowserWindowController alloc] initWithPageNamespace:WKPageGetPageNamespace(page)];
diff --git a/WebKitTools/WebKitTestRunner/TestController.cpp b/WebKitTools/WebKitTestRunner/TestController.cpp
index aff8798..495712b 100644
--- a/WebKitTools/WebKitTestRunner/TestController.cpp
+++ b/WebKitTools/WebKitTestRunner/TestController.cpp
@@ -98,7 +98,7 @@ static void closeOtherPage(WKPageRef page, const void* clientInfo)
delete view;
}
-static WKPageRef createOtherPage(WKPageRef oldPage, const void*)
+static WKPageRef createOtherPage(WKPageRef oldPage, WKDictionaryRef, WKEventModifiers, WKEventMouseButton, const void*)
{
PlatformWebView* view = new PlatformWebView(WKPageGetPageNamespace(oldPage));
WKPageRef newPage = view->page();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list