Bug 167535

Summary: [Cocoa] No way to get the text from a WKWebProcessPlugInRangeHandle
Product: WebKit Reporter: mitz
Component: WebKit APIAssignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: sam, thorton
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Add a text property to WKWebProcessPlugInRangeHandle sam: review+

Description mitz 2017-01-27 16:25:17 PST
WKWebProcessPlugInRangeHandle doesn’t expose any way to get at the result of Range::text.
Comment 1 mitz 2017-01-27 18:03:18 PST
Created attachment 299988 [details]
Add a text property to WKWebProcessPlugInRangeHandle
Comment 2 Sam Weinig 2017-01-27 20:36:44 PST
Comment on attachment 299988 [details]
Add a text property to WKWebProcessPlugInRangeHandle

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

> Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h:41
> +@property (nonatomic, readonly) NSString *text WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));

Do we usually make NSString getter's copy?
Comment 3 mitz 2017-01-27 20:43:05 PST
(In reply to comment #2)
> Comment on attachment 299988 [details]
> Add a text property to WKWebProcessPlugInRangeHandle
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=299988&action=review
> 
> > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h:41
> > +@property (nonatomic, readonly) NSString *text WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
> 
> Do we usually make NSString getter's copy?

Yes, I’ll make this one copy as well.

Thanks for the review!
Comment 4 mitz 2017-01-27 20:52:20 PST
Fixed in <https://trac.webkit.org/r211321>.