Bug 167535 - [Cocoa] No way to get the text from a WKWebProcessPlugInRangeHandle
Summary: [Cocoa] No way to get the text from a WKWebProcessPlugInRangeHandle
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: mitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-27 16:25 PST by mitz
Modified: 2017-01-27 20:52 PST (History)
2 users (show)

See Also:


Attachments
Add a text property to WKWebProcessPlugInRangeHandle (3.73 KB, patch)
2017-01-27 18:03 PST, mitz
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.