To be more flexible with the host application, we should support attaching to a view other than the WKView.
<rdar://problem/20234342>
Created attachment 249078 [details] Patch
Comment on attachment 249078 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249078&action=review Looks good to me. Needs a WK2 Owner's approval. > Source/WebKit2/ChangeLog:19 > + Use platformCanAttach as a final check incase there is a different Typo: "incase" => "in case" > Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h:102 > +@property (retain, nonatomic, setter=_setInspectorAttachmentView:) NSView *_inspectorAttachmentView; Interesting that one of the above new properties has WK_AVAILABLE. That said, I don't really think those are needed, especially in *Private.h, so what you have looks fine to me. > Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm:597 > + unsigned maximumAttachedHeight = NSHeight(inspectedViewFrame) * maximumAttachedHeightRatio; Should this be "float" instead of unsigned? You're dealing with two floats on the right.
Sam, Anders, or Tim, please review.
Comment on attachment 249078 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249078&action=review >> Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h:102 >> +@property (retain, nonatomic, setter=_setInspectorAttachmentView:) NSView *_inspectorAttachmentView; > > Interesting that one of the above new properties has WK_AVAILABLE. That said, I don't really think those are needed, especially in *Private.h, so what you have looks fine to me. I don't see the point for private API. I can add it if needed. >> Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm:597 >> + unsigned maximumAttachedHeight = NSHeight(inspectedViewFrame) * maximumAttachedHeightRatio; > > Should this be "float" instead of unsigned? You're dealing with two floats on the right. Yeah, I'll fix that up.
Comment on attachment 249078 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249078&action=review > Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm:41 > #import "WKViewInternal.h" > +#import "WKViewPrivate.h" I thought WKViewInternal imported WKViewPrivate? (it does)
Comment on attachment 249078 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249078&action=review >>> Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h:102 >>> +@property (retain, nonatomic, setter=_setInspectorAttachmentView:) NSView *_inspectorAttachmentView; >> >> Interesting that one of the above new properties has WK_AVAILABLE. That said, I don't really think those are needed, especially in *Private.h, so what you have looks fine to me. > > I don't see the point for private API. I can add it if needed. Please add them, and use strong instead of retain.
https://trac.webkit.org/r181881
32-bit build fixes: https://trac.webkit.org/changeset/181884 https://trac.webkit.org/changeset/181885
Thanks Joe. Sorry about that.