Bug 131783

Summary: [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
Product: WebKit Reporter: mitz
Component: WebKit2Assignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, japhet
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Add and use a processionUserGesture flag on NavigationAction thorton: review+

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>.