- Revision
- 167425
- Author
- m...@apple.com
- Date
- 2014-04-17 07:00:17 -0700 (Thu, 17 Apr 2014)
Log Message
Source/WebCore: WebCore part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
https://bugs.webkit.org/show_bug.cgi?id=131783
Reviewed by Tim Horton.
* loader/NavigationAction.cpp:
(WebCore::NavigationAction::NavigationAction): Initialize m_processingUserGesture to
ScriptController::processingUserGesture() at the time the NavigationAction is constructed.
* loader/NavigationAction.h:
Added boolean member variable m_processionUserGesture
(WebCore::NavigationAction::processingUserGesture): Added this getter.
Source/WebKit2: WebKit2 part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
https://bugs.webkit.org/show_bug.cgi?id=131783
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow): Set the isProcessingUserGesture field of
the NavigationActionData to the corresponding value in the NavigationAction.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (167424 => 167425)
--- trunk/Source/WebCore/ChangeLog 2014-04-17 08:42:53 UTC (rev 167424)
+++ trunk/Source/WebCore/ChangeLog 2014-04-17 14:00:17 UTC (rev 167425)
@@ -1,3 +1,17 @@
+2014-04-17 Dan Bernstein <m...@apple.com>
+
+ WebCore part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
+ https://bugs.webkit.org/show_bug.cgi?id=131783
+
+ Reviewed by Tim Horton.
+
+ * loader/NavigationAction.cpp:
+ (WebCore::NavigationAction::NavigationAction): Initialize m_processingUserGesture to
+ ScriptController::processingUserGesture() at the time the NavigationAction is constructed.
+ * loader/NavigationAction.h:
+ Added boolean member variable m_processionUserGesture
+ (WebCore::NavigationAction::processingUserGesture): Added this getter.
+
2014-04-17 Ion Rosca <ro...@adobe.com>
[CSS Blending] Isolation descendant dependent flags are not updated correctly
Modified: trunk/Source/WebCore/loader/NavigationAction.cpp (167424 => 167425)
--- trunk/Source/WebCore/loader/NavigationAction.cpp 2014-04-17 08:42:53 UTC (rev 167424)
+++ trunk/Source/WebCore/loader/NavigationAction.cpp 2014-04-17 14:00:17 UTC (rev 167425)
@@ -31,6 +31,7 @@
#include "Event.h"
#include "FrameLoader.h"
+#include "ScriptController.h"
namespace WebCore {
@@ -49,18 +50,21 @@
NavigationAction::NavigationAction()
: m_type(NavigationTypeOther)
+ , m_processingUserGesture(ScriptController::processingUserGesture())
{
}
NavigationAction::NavigationAction(const ResourceRequest& resourceRequest)
: m_resourceRequest(resourceRequest)
, m_type(NavigationTypeOther)
+ , m_processingUserGesture(ScriptController::processingUserGesture())
{
}
NavigationAction::NavigationAction(const ResourceRequest& resourceRequest, NavigationType type)
: m_resourceRequest(resourceRequest)
, m_type(type)
+ , m_processingUserGesture(ScriptController::processingUserGesture())
{
}
@@ -68,6 +72,7 @@
bool isFormSubmission)
: m_resourceRequest(resourceRequest)
, m_type(navigationType(frameLoadType, isFormSubmission, 0))
+ , m_processingUserGesture(ScriptController::processingUserGesture())
{
}
@@ -75,6 +80,7 @@
: m_resourceRequest(resourceRequest)
, m_type(type)
, m_event(event)
+ , m_processingUserGesture(ScriptController::processingUserGesture())
{
}
@@ -83,6 +89,7 @@
: m_resourceRequest(resourceRequest)
, m_type(navigationType(frameLoadType, isFormSubmission, event))
, m_event(event)
+ , m_processingUserGesture(ScriptController::processingUserGesture())
{
}
Modified: trunk/Source/WebCore/loader/NavigationAction.h (167424 => 167425)
--- trunk/Source/WebCore/loader/NavigationAction.h 2014-04-17 08:42:53 UTC (rev 167424)
+++ trunk/Source/WebCore/loader/NavigationAction.h 2014-04-17 14:00:17 UTC (rev 167425)
@@ -54,10 +54,13 @@
NavigationType type() const { return m_type; }
const Event* event() const { return m_event.get(); }
+ bool processingUserGesture() const { return m_processingUserGesture; }
+
private:
ResourceRequest m_resourceRequest;
NavigationType m_type;
RefPtr<Event> m_event;
+ bool m_processingUserGesture;
};
}
Modified: trunk/Source/WebKit2/ChangeLog (167424 => 167425)
--- trunk/Source/WebKit2/ChangeLog 2014-04-17 08:42:53 UTC (rev 167424)
+++ trunk/Source/WebKit2/ChangeLog 2014-04-17 14:00:17 UTC (rev 167425)
@@ -1,3 +1,17 @@
+2014-04-17 Dan Bernstein <m...@apple.com>
+
+ WebKit2 part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
+ https://bugs.webkit.org/show_bug.cgi?id=131783
+
+ Reviewed by Tim Horton.
+
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::createWindow): Set the isProcessingUserGesture field of
+ the NavigationActionData to the corresponding value in the NavigationAction.
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
+ (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
+
2014-04-16 Benjamin Poulain <bpoul...@apple.com>
[iOS][WK2] Fix the DidCommitLoad initial scrolling position
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (167424 => 167425)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2014-04-17 08:42:53 UTC (rev 167424)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2014-04-17 14:00:17 UTC (rev 167425)
@@ -210,7 +210,7 @@
navigationActionData.navigationType = navigationAction.type();
navigationActionData.modifiers = InjectedBundleNavigationAction::modifiersForNavigationAction(navigationAction);
navigationActionData.mouseButton = InjectedBundleNavigationAction::mouseButtonForNavigationAction(navigationAction);
- navigationActionData.isProcessingUserGesture = ScriptController::processingUserGesture();
+ navigationActionData.isProcessingUserGesture = navigationAction.processingUserGesture();
uint64_t newPageID = 0;
WebPageCreationParameters parameters;
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (167424 => 167425)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2014-04-17 08:42:53 UTC (rev 167424)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2014-04-17 14:00:17 UTC (rev 167425)
@@ -690,7 +690,7 @@
navigationActionData.navigationType = action->navigationType();
navigationActionData.modifiers = action->modifiers();
navigationActionData.mouseButton = action->mouseButton();
- navigationActionData.isProcessingUserGesture = ScriptController::processingUserGesture();
+ navigationActionData.isProcessingUserGesture = navigationAction.processingUserGesture();
webPage->send(Messages::WebPageProxy::DecidePolicyForNewWindowAction(m_frame->frameID(), navigationActionData, request, frameName, listenerID, InjectedBundleUserMessageEncoder(userData.get())));
}
@@ -744,7 +744,7 @@
navigationActionData.navigationType = action->navigationType();
navigationActionData.modifiers = action->modifiers();
navigationActionData.mouseButton = action->mouseButton();
- navigationActionData.isProcessingUserGesture = ScriptController::processingUserGesture();
+ navigationActionData.isProcessingUserGesture = navigationAction.processingUserGesture();
// Notify the UIProcess.
if (!webPage->sendSync(Messages::WebPageProxy::DecidePolicyForNavigationAction(m_frame->frameID(), navigationActionData, originatingFrame ? originatingFrame->frameID() : 0, navigationAction.resourceRequest(), request, listenerID, InjectedBundleUserMessageEncoder(userData.get())), Messages::WebPageProxy::DecidePolicyForNavigationAction::Reply(receivedPolicyAction, policyAction, downloadID)))