Bug 128280 - Add sourceFrame to WKNavigationAction
Summary: Add sourceFrame to WKNavigationAction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-05 16:43 PST by Anders Carlsson
Modified: 2014-02-05 17:44 PST (History)
2 users (show)

See Also:


Attachments
Patch (18.21 KB, patch)
2014-02-05 16:43 PST, Anders Carlsson
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2014-02-05 16:43:06 PST
Add sourceFrame to WKNavigationAction
Comment 1 Anders Carlsson 2014-02-05 16:43:46 PST
Created attachment 223279 [details]
Patch
Comment 2 WebKit Commit Bot 2014-02-05 16:45:31 PST
Attachment 223279 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h:32:  Missing spaces around =  [whitespace/operators] [4]
ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.h:34:  Missing spaces around =  [whitespace/operators] [4]
Total errors found: 2 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 mitz 2014-02-05 16:48:04 PST
Comment on attachment 223279 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223279&action=review

> Source/WebKit2/UIProcess/Cocoa/NavigationState.mm:137
> +static RetainPtr<WKFrameInfo> frameInfoFromWebFrameProxy(WebFrameProxy& webFrameProxy)
> +{
> +    auto frameInfo = adoptNS([[WKFrameInfo alloc] init]);
> +
> +    [frameInfo setMainFrame:webFrameProxy.isMainFrame()];
> +
> +    return frameInfo;
> +}

I would have made this an internal WKFrameInfo method (either an initializer or a class method) so that we don’t have to repeat it if we end up vending WKFrameInfo instances from other files.
Comment 4 Anders Carlsson 2014-02-05 17:44:12 PST
Committed r163501: <http://trac.webkit.org/changeset/163501>