Expose whether WKWebProcessPlugInNodeHandle is a select element to clients
rdar://problem/45031469
Created attachment 351653 [details] Patch v1
Comment on attachment 351653 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=351653&action=review > Tools/TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsSelectElement.mm:45 > + WKDOMElement *htmlElement = [document createElement:htmlElementTag]; I don’t know this API well enough; what’s the ownership story for this object returned from a -create method?
(In reply to Tim Horton from comment #3) > Comment on attachment 351653 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=351653&action=review > > > Tools/TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsSelectElement.mm:45 > > + WKDOMElement *htmlElement = [document createElement:htmlElementTag]; > > I don’t know this API well enough; what’s the ownership story for this > object returned from a -create method? `htmlElement` holds a reference to the object and once the method returns, nothing holds a reference to the object and the object gets deallocated.
Comment on attachment 351653 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=351653&action=review >>> Tools/TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsSelectElement.mm:45 >>> + WKDOMElement *htmlElement = [document createElement:htmlElementTag]; >> >> I don’t know this API well enough; what’s the ownership story for this object returned from a -create method? > > `htmlElement` holds a reference to the object and once the method returns, nothing holds a reference to the object and the object gets deallocated. No, that's not right, because this project doesn't build with ARC. However, I think the code is fine, because createElement returns an autoreleased object.
Comment on attachment 351653 [details] Patch v1 Clearing flags on attachment: 351653 Committed r236869: <https://trac.webkit.org/changeset/236869>
All reviewed patches have been landed. Closing bug.
(In reply to Tim Horton from comment #5) > Comment on attachment 351653 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=351653&action=review > > >>> Tools/TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsSelectElement.mm:45 > >>> + WKDOMElement *htmlElement = [document createElement:htmlElementTag]; > >> > >> I don’t know this API well enough; what’s the ownership story for this object returned from a -create method? > > > > `htmlElement` holds a reference to the object and once the method returns, nothing holds a reference to the object and the object gets deallocated. > > No, that's not right, because this project doesn't build with ARC. Oh, I didn't know that is the case. Why is that? > > However, I think the code is fine, because createElement returns an > autoreleased object.