Commit 140e06f0 authored by weinig@apple.com's avatar weinig@apple.com

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
parent 6301a966
2010-10-22 Sam Weinig <sam@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@apple.com>
Reviewed by Sam Weinig.
......@@ -1050,7 +1050,7 @@ __ZNK7WebCore5Range14startContainerERi
__ZNK7WebCore5Range19boundaryPointsValidEv
__ZNK7WebCore5Range9endOffsetERi
__ZNK7WebCore5Range9firstNodeEv
__ZNK7WebCore6Chrome12createWindowEPNS_5FrameERKNS_16FrameLoadRequestERKNS_14WindowFeaturesE
__ZNK7WebCore6Chrome12createWindowEPNS_5FrameERKNS_16FrameLoadRequestERKNS_14WindowFeaturesERKNS_16NavigationActionE
__ZNK7WebCore6Cursor14platformCursorEv
__ZNK7WebCore6Editor12selectedTextEv
__ZNK7WebCore6Editor13canEditRichlyEv
......
......@@ -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&) { }
......
......@@ -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;
......
......@@ -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&);
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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) {
......
......@@ -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;
......
......@@ -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;
......
......@@ -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();
}
}
......
2010-10-22 Sam Weinig <sam@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@gmail.com>
Unreviewed, rolling out r70301.
......
......@@ -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;
......
......@@ -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();
......
......@@ -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.
......
......@@ -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);
......
2010-10-22 Sam Weinig <sam@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@samsung.com>
Reviewed by Eric Seidel.
......
......@@ -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)
......
......@@ -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();
......
......@@ -860,7 +860,7 @@ bool FrameLoaderClientEfl::canCachePage() const
return false;
}
Frame* FrameLoaderClientEfl::dispatchCreatePage()
Frame* FrameLoaderClientEfl::dispatchCreatePage(const NavigationAction&)
{
if (!m_view)
return 0;
......
......@@ -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&);
......
2010-10-22 Sam Weinig <sam@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@igalia.com>
Reviewed by Xan Lopez.
......
......@@ -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;
......
......@@ -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();
......
......@@ -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;
......
......@@ -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&);
......
2010-10-22 Sam Weinig <sam@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@chromium.org>
Reviewed by Dmitry Titov.
......
......@@ -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;
......
......@@ -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();
......
......@@ -645,7 +645,7 @@ void FrameLoaderClientHaiku::dispatchDidFailLoad(const ResourceError&)
notImplemented();
}
Frame* FrameLoaderClientHaiku::dispatchCreatePage()
Frame* FrameLoaderClientHaiku::dispatchCreatePage(const WebCore::NavigationAction&)
{
notImplemented();
return false;
......
......@@ -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&);
......
2010-10-22 Sam Weinig <sam@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@apple.com>
Reviewed by Eric Carlson.
......
......@@ -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();
......
......@@ -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())
......
......@@ -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,
......
......@@ -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];
......
......@@ -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();
}
}
......
2010-10-22 Sam Weinig <sam@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