Bug 105262 - Add SPI to WebKit1 WebFrame for node conversion to JSValueRef
Summary: Add SPI to WebKit1 WebFrame for node conversion to JSValueRef
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac Unspecified
: P2 Normal
Assignee: Alice Liu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 00:25 PST by Alice Liu
Modified: 2012-12-18 17:47 PST (History)
4 users (show)

See Also:


Attachments
patch (10.84 KB, patch)
2012-12-18 01:18 PST, Alice Liu
no flags Details | Formatted Diff | Diff
patch (10.83 KB, patch)
2012-12-18 01:27 PST, Alice Liu
no flags Details | Formatted Diff | Diff
patch (12.98 KB, patch)
2012-12-18 01:44 PST, Alice Liu
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alice Liu 2012-12-18 00:25:54 PST
WebFrame could use some SPI for converting DOMNode to a JSValueRef.
Comment 1 Alice Liu 2012-12-18 01:18:03 PST
Created attachment 179898 [details]
patch
Comment 2 Alice Liu 2012-12-18 01:27:21 PST
Created attachment 179901 [details]
patch
Comment 3 Build Bot 2012-12-18 01:33:04 PST
Comment on attachment 179901 [details]
patch

Attachment 179901 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15399125
Comment 4 Alice Liu 2012-12-18 01:44:52 PST
Created attachment 179906 [details]
patch
Comment 5 Anders Carlsson 2012-12-18 17:47:18 PST
Comment on attachment 179906 [details]
patch

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

> Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm:54
> +    RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);

You can use the adoptNS function instead for clarity.

> Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm:55
> +    RetainPtr<JSWrapperForNodeFrameLoadDelegate> frameLoadDelegate(AdoptNS, [JSWrapperForNodeFrameLoadDelegate new]);

Ditto. Also use alloc/init instead of new.

> Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm:82
> +    JSStringRef isolatedPropertyJSString = JSStringCreateWithUTF8CString("isolatedProperty");

I think you can use a JSRetainPtr here, then you don't need to use JSStringRelease.

> Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm:88
> +    JSStringRef normalPropertyJSString = JSStringCreateWithUTF8CString("normalProperty");

I think you can use a JSRetainPtr here, then you don't need to use JSStringRelease.