[webkit-dev] Re: Embedded WebView & autoscroll
piet
piet.webkit at yahoo.com
Tue Aug 14 11:32:36 PDT 2007
I posted some sample code based on Developer/Examples/WebKit/MiniBrowser to
illustrate better what I'm trying to do, if you'd like to take a peek. It's at
http://www.yourfilelink.com/get.php?fid=373281 (sorry for the ads)
Is there any open-source application that does something similar?
Or do you know anybody in the Apple Mail team?
Thanks,
Piet
--- piet <piet.webkit at yahoo.com> wrote:
> I need help!
>
> What I'm trying to do is very similar to the Message Pane in the Apple Mail
> application, ie. put a WebView together with one other view into a
> NSScrollView. In the case of Apple Mail, the WebView displays HTML messages,
> the other view displays the message headers, and a single set of scrollbars
> make them scroll both at the same time.
>
> To do so, I have a TilingView that contains a NSBoxView and a WebView. The
> WebView doesn't have scrollbars: instead, it adjusts its size to the size of
> the HTML document. The TilingView listens to
> NSViewFrameDidChangeNotification, adjusts its size to the size of the
> WebView, makes additional space for the NSBoxView, and is included into a
> NSScrollView.
>
> All that works fine as long as I'm using the scrollbars of my NSScrollView:
> the NSBoxView and the WebView scroll together and allow to see the entire
> document, and the scrollbars are shown/hidden correctly if the NSScrollView
> is large enough to display both views simultaneously.
>
> The problem is: auto-scroll does not work. When I click into the WebView,
> the mouseDown event is captured and handled by the WebView, and is not
> propagated up the view hierarchy into my NSScrollView.
>
> What can I do to make the TilingView auto-scroll inside the NSScrollView?
>
> ---
>
> Here are more details to put you on track maybe...
>
> The view hierarchy of my application, as displayed by F-Script, is:
> WebHTMLView
> WebClipView
> WebDynamicScrollBarsView
> WebFrameView
> WebView
> MyTilingView
> NSClipView
> NSScrollView
> MyComposedView
> etc...
>
> The view hierarchy of Apple Mail (when displaying an HTML mail) is:
> MessageWebHTMLView
> WebClipView
> WebDynamicScrollBarsView
> WebFrameView
> MessageWebView
> TilingView
> NSClipView
> NSScrollView
> ColorBackgroundView
> etc...
>
> How does Apple Mail manage to have the WebView create and use their own
> subclass of WebHTMLView (the "MessageWebHTMLView") instead of a standard
> WebHTMLView?
>
> Thanks a lot,
> Piet
>
____________________________________________________________________________________Ready for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.com/
More information about the webkit-dev
mailing list