Thanks everyone for all the great suggestions. I'll try it out and report back 
how it went. The clipping path method seems promising. 

> Except that would still rely on inserting a custom view in the
> WebView's private scrollview hierarchy.

It doesn't really. Inserting a NSBee as a subview of the WebView would produce 
the same results as creating an overlay Window. 

To justify a bit why I decided to just insert it in the WebView. If you draw an 
overlay on top (what I was doing at first), you still need to access the 
WebView's scrollview in order to observe its contentView's frame (so your 
overlay can match the content size and exclude any scrollbars from the overlay) 
and its documentView's bounds (so you can account for the scrolling and 
reposition your drawing). 
Drawing an overlay does in fact tend to save you some memory, but on the other 
hand requires a lot of redrawing when you resize or scroll your WebView. Since 
both methods basically rely on the WebView's main scroll view being where it 
is, I don't think that inserting a view is much more dangerous than doing an 
overlay on top. 

And for those who just tuned in, NSBee is of course a NSView. 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to