Bug 131783 - [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
Summary: [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: mitz
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-04-16 19:53 PDT by mitz
Modified: 2014-04-17 07:00 PDT (History)
2 users (show)

See Also:


Attachments
Add and use a processionUserGesture flag on NavigationAction (7.34 KB, patch)
2014-04-16 19:59 PDT, mitz
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2014-04-16 19:53:02 PDT
<rdar://problem/16601336>

_userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:

The reason it’s NO is that the value is decided based on ScriptController::processingUserGesture() at the time WebChromeClient::createWindow() is called, which is only after the policy decision has been made. By then, processingUserGesture() is false.
Comment 1 mitz 2014-04-16 19:59:02 PDT
Created attachment 229516 [details]
Add and use a processionUserGesture flag on NavigationAction
Comment 2 WebKit Commit Bot 2014-04-16 20:01:01 PDT
Attachment 229516 [details] did not pass style-queue:


ERROR: Source/WebCore/loader/NavigationAction.cpp:75:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/loader/NavigationAction.cpp:92:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 mitz 2014-04-17 07:00:55 PDT
Fixed in <http://trac.webkit.org/r167425>.