Bug 124431 - Give the policy client the originating frame of a navigation action
Summary: Give the policy client the originating frame of a navigation action
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:
Depends on:
Blocks:
 
Reported: 2013-11-15 13:17 PST by mitz
Modified: 2013-11-15 14:21 PST (History)
1 user (show)

See Also:


Attachments
Add originatingFrame to decidePolicyForNavigationAction (34.99 KB, patch)
2013-11-15 13:31 PST, mitz
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2013-11-15 13:17:51 PST
For link activations and form submissions, the frame being navigated is not necessarily the frame where the navigation action occurred. Give the policy delegate access to the latter as well.
Comment 1 mitz 2013-11-15 13:31:14 PST
Created attachment 217075 [details]
Add originatingFrame to decidePolicyForNavigationAction
Comment 2 WebKit Commit Bot 2013-11-15 13:33:59 PST
Attachment 217075 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Platform/CoreIPC/HandleMessage.h', u'Source/WebKit2/Shared/APIClientTraits.cpp', u'Source/WebKit2/Shared/APIClientTraits.h', u'Source/WebKit2/UIProcess/API/C/WKPage.h', u'Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm', u'Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h', u'Source/WebKit2/UIProcess/WebInspectorProxy.cpp', u'Source/WebKit2/UIProcess/WebPageProxy.cpp', u'Source/WebKit2/UIProcess/WebPageProxy.h', u'Source/WebKit2/UIProcess/WebPageProxy.messages.in', u'Source/WebKit2/UIProcess/WebPolicyClient.cpp', u'Source/WebKit2/UIProcess/WebPolicyClient.h', u'Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp', u'Tools/ChangeLog', u'Tools/MiniBrowser/mac/WK2BrowserWindowController.m', u'Tools/TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp', u'Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp', u'Tools/WebKitTestRunner/TestController.cpp', u'Tools/WebKitTestRunner/TestController.h']" exit_code: 1
Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h:31:  One space before end of line comments  [whitespace/comments] [5]
Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h:32:  One space before end of line comments  [whitespace/comments] [5]
Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h:33:  One space before end of line comments  [whitespace/comments] [5]
Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h:34:  One space before end of line comments  [whitespace/comments] [5]
Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h:35:  One space before end of line comments  [whitespace/comments] [5]
Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h:36:  One space before end of line comments  [whitespace/comments] [5]
Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h:37:  One space before end of line comments  [whitespace/comments] [5]
Total errors found: 7 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 mitz 2013-11-15 13:37:58 PST
Comment on attachment 217075 [details]
Add originatingFrame to decidePolicyForNavigationAction

Actually, we want this in the new window policy callback as well. Updated patch forthcoming.
Comment 4 mitz 2013-11-15 13:58:47 PST
Comment on attachment 217075 [details]
Add originatingFrame to decidePolicyForNavigationAction

On second thought, for the new window policy, the originating frame is the frame we already have.
Comment 5 mitz 2013-11-15 14:21:15 PST
Committed <http://trac.webkit.org/r159358>.