Re: How to draw a NSView on top of a WebView and don't get overriden trying
Re: How to draw a NSView on top of a WebView and don't get overriden trying
- Subject: Re: How to draw a NSView on top of a WebView and don't get overriden trying
- From: Jens Alfke <email@hidden>
- Date: Tue, 12 May 2015 15:31:56 -0700
> On May 12, 2015, at 1:44 PM, Juanjo Conti <email@hidden> wrote:
>
> If I add it as a subView of WebView or if I add it as a subView of the
> WebView's superView, it's shown for a while but if the WebView gets
> scrolled or if I load sites gmail.com <http://gmail.com/> or twitter (without logging in), the
> website hides my NSView.
In general this technique works, but some types of views use drawing optimizations that override the display of subviews. That might be happening with the WebView, especially since they render in an oddball way (the content is drawn in a separate sandboxed process.)
A child window will always draw correctly, but you’ll have to move it yourself when the web view scrolls, because its coordinates are relative to the parent window’s origin, not to the web view’s scroll position.
(You might also want to ask on the webkitsdk-dev mailing list, where the real WebKit experts can be found.)
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden